/**
 * Shared form foot — CASL opt-in → legal notice → submit → anti-spam fineprint.
 * Classes used by rwl_el_render_form_foot() across enroll, contact, find-provider, volunteer, DPO.
 */

.renewal-enroll__foot,
.rwl-form-foot {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 0.35rem;
}

.renewal-enroll__casl,
.rwl-form-foot .renewal-enroll__casl,
.rwl-form-foot .rwl-casl-consent,
.form-volunteer .renewal-enroll__casl,
.rwl-dpo-modal .renewal-enroll__casl {
  margin: 0;
  padding: 0.8rem 0.95rem;
  border-radius: 0.85rem;
  border: 1px solid rgb(110 135 140 / 0.28);
  background: linear-gradient(145deg, rgb(247 250 251 / 0.98) 0%, rgb(237 243 245 / 0.95) 100%);
  font-size: 0.84rem;
  line-height: 1.45;
  color: #3a4f58;
  text-align: left;
}

.renewal-enroll__casl label,
.rwl-form-foot .renewal-enroll__casl label,
.rwl-form-foot .rwl-casl-consent label,
.form-volunteer .renewal-enroll__casl label,
.rwl-dpo-modal .renewal-enroll__casl label {
  display: grid;
  grid-template-columns: 1.1rem 1fr;
  column-gap: 0.7rem;
  align-items: start;
  cursor: pointer;
  font-weight: 400;
  color: inherit;
}

.renewal-enroll__casl input[type="checkbox"],
.rwl-form-foot .renewal-enroll__casl input[type="checkbox"],
.rwl-form-foot .rwl-casl-consent input[type="checkbox"],
.form-volunteer .renewal-enroll__casl input[type="checkbox"],
.rwl-dpo-modal .renewal-enroll__casl input[type="checkbox"] {
  margin: 0.2rem 0 0;
  width: 1.05rem;
  height: 1.05rem;
  flex: none;
  accent-color: #567279;
}

.renewal-enroll__casl-text {
  display: block;
  min-width: 0;
}

.renewal-enroll__legal,
.renewal-enroll__foot .renewal-enroll__fineprint,
.rwl-form-foot .renewal-enroll__legal,
.rwl-form-foot .renewal-enroll__fineprint,
.form-volunteer .renewal-enroll__legal,
.form-volunteer .renewal-enroll__fineprint,
.rwl-dpo-modal .renewal-enroll__legal,
.rwl-dpo-modal .renewal-enroll__fineprint {
  margin: 0;
  font-family: Area, Arial, sans-serif;
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgb(47 72 80 / 0.78);
  text-align: left;
}

.renewal-enroll__legal.renewal-enroll__consent {
  padding: 0 0.1rem;
}

.renewal-enroll__foot .renewal-enroll__submit,
.rwl-form-foot .renewal-enroll__submit,
.rwl-form-foot .btn--ct-submit,
.form-volunteer .renewal-enroll__foot .form-volunteer__submit {
  margin-top: 0.15rem;
}

/* Dual submit buttons (contact patient/provider) inside foot */
.renewal-enroll__foot .renewal-enroll__submit[hidden],
.rwl-form-foot .renewal-enroll__submit[hidden] {
  display: none !important;
}

.renewal-enroll__foot .renewal-enroll__fineprint,
.rwl-form-foot .renewal-enroll__fineprint,
.form-volunteer .renewal-enroll__fineprint {
  text-align: center;
  color: rgb(47 72 80 / 0.7);
}

.renewal-enroll__consent a,
.rwl-form-foot a,
.ct-consent a {
  color: #2b64f5;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.renewal-enroll__consent a:hover,
.rwl-form-foot a:hover,
.ct-consent a:hover {
  color: #0073ff;
}

.renewal-enroll__consent a:focus-visible,
.rwl-form-foot a:focus-visible,
.ct-consent a:focus-visible {
  outline: 2px solid rgb(0 115 255 / 0.4);
  outline-offset: 2px;
  border-radius: 0.15rem;
}

/* Contact DS2 enroll inherits foot; blue accents on contact page */
.renewal-enroll--contact .renewal-enroll__casl {
  border-color: rgb(0 115 255 / 0.14);
  background: linear-gradient(145deg, rgb(255 255 255 / 0.98) 0%, rgb(239 246 255 / 0.92) 100%);
  color: #3a4f58;
}

.renewal-enroll--contact .renewal-enroll__casl input[type="checkbox"] {
  accent-color: var(--renewal-blue, #0073ff);
}

/* Legacy ct_form consent block aligns with foot hierarchy */
.ct-form .rwl-form-foot,
.ct-main .rwl-form-foot {
  margin-top: 0.5rem;
}

.ct-consent {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgb(47 72 80 / 0.78);
  text-align: left;
}

.ct-consent p {
  margin: 0;
}

/* Volunteer form foot sits above stepper actions when final step */
.form-volunteer .renewal-enroll__foot {
  margin-top: 1rem;
}

.form-volunteer .renewal-enroll__foot + .form-volunteer__actions {
  margin-top: 0.5rem;
}

/* DPO modal foot */
.rwl-dpo-modal__foot {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 0.15rem;
}

.rwl-dpo-modal__foot .rwl-dpo-modal__actions {
  margin-top: 0;
  justify-content: stretch;
}

.rwl-dpo-modal__foot .rwl-dpo-modal__actions .btn--primary {
  flex: 1 1 auto;
}

.rwl-dpo-modal .renewal-enroll__casl {
  border-color: rgb(0 115 255 / 0.14);
  background: linear-gradient(145deg, rgb(255 255 255 / 0.98) 0%, rgb(239 246 255 / 0.9) 100%);
}

.rwl-dpo-modal .renewal-enroll__casl input[type="checkbox"] {
  accent-color: var(--renewal-blue, #0073ff);
}

.rwl-dpo-modal .renewal-enroll__fineprint {
  text-align: center;
}
