/* MF Creative Bookings — [mfc_signup] form. Mobile-first. */

/* Design tokens. Defined on BOTH wrappers because the v0.11 wizard renders
   inside .mfc-wizard (no .mfc-signup parent). Without this, every
   var(--mfc-*) reference resolved to nothing — inputs lost their border,
   the primary button lost its black/white colour, and the policy box
   disappeared. */
.mfc-signup,
.mfc-wizard {
    --mfc-border: #e5e7eb;
    --mfc-border-strong: #d1d5db;
    --mfc-bg-soft: #fafafb;
    /* Soft accent tint (was the warm orange #fff7ed) — section underlines,
       nested-row borders and highlight fills follow the blue accent. */
    --mfc-bg-warm: #e8f0fb;
    /* v0.33 friendly refresh (owner request 2026-08): studio blue accent,
       soft corners. Filled = primary action, outlined = secondary. */
    --mfc-accent: #03469F;
    --mfc-accent-hover: #02356f;
    --mfc-accent-fg: #ffffff;
    --mfc-text: #111111;
    --mfc-text-soft: #1f2937;
    --mfc-muted: #6b7280;
    --mfc-danger: #b91c1c;
    --mfc-danger-bg: #fef2f2;
    --mfc-danger-border: #fecaca;
    --mfc-radius: 5px;
    --mfc-radius-card: 8px;

    font-family: inherit;
    color: var(--mfc-text);
    /* No outer margin or horizontal padding — the host page section is
       expected to provide both. Drop [mfc_signup] inside a column/row that
       already has its frame. Width is owned by the host column too. */
    margin: 0;
    padding: 0;
}

/* Hero and card wrappers intentionally removed — the host page section
   provides the heading, intro copy, and any framing. The form renders
   bare inside .mfc-signup. */

/* ====================== ERROR SUMMARY ====================== */
.mfc-signup__errors {
    display: flex;
    gap: 0.75em;
    background: var(--mfc-danger-bg);
    border: 1px solid var(--mfc-danger-border);
    color: var(--mfc-danger);
    padding: 0.85em 1em;
    border-radius: var(--mfc-radius);
    margin-bottom: 1.5em;
}
.mfc-signup__errors-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 2px;
}
.mfc-signup__errors-body strong { display: block; margin-bottom: 0.25em; }
.mfc-signup__errors-body ul {
    margin: 0;
    padding-left: 1.25em;
    line-height: 1.5;
}

/* ====================== SECTIONS ====================== */
.mfc-signup-section {
    border: 0;
    padding: 0;
    margin: 0 0 1.75em;
}
.mfc-signup-section:last-of-type { margin-bottom: 1em; }
.mfc-signup-section__legend {
    display: flex;
    align-items: baseline;
    gap: 0.6em;
    color: var(--mfc-accent);
    font-weight: 700;
    font-size: 1.15rem;
    padding: 0;
    margin-bottom: 1em;
    border-bottom: 2px solid var(--mfc-bg-warm);
    padding-bottom: 0.5em;
    width: 100%;
}
.mfc-signup-section__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75em;
    height: 1.75em;
    background: var(--mfc-accent);
    color: var(--mfc-accent-fg);
    font-size: 0.85rem;
    font-weight: 700;
}
.mfc-signup-hint {
    color: var(--mfc-muted);
    font-size: 0.9rem;
    margin: -0.5em 0 1em;
    line-height: 1.5;
}

/* ====================== ROWS / FIELDS ====================== */
.mfc-signup-row {
    margin: 0 0 0.85em;
    display: flex;
    flex-direction: column;
}
.mfc-signup-row label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--mfc-text-soft);
    margin-bottom: 0.35em;
}
.mfc-signup-row .required {
    color: var(--mfc-danger);
    font-weight: 700;
    margin-left: 0.15em;
}
.mfc-signup-row input[type="text"],
.mfc-signup-row input[type="email"],
.mfc-signup-row input[type="password"],
.mfc-signup-row input[type="date"] {
    padding: 0.7em 0.85em;
    border: 1px solid var(--mfc-border-strong);
    border-radius: var(--mfc-radius);
    font: inherit;
    font-size: 1rem; /* ≥16px so iOS Safari doesn't zoom on focus */
    background: #fff;
    color: var(--mfc-text);
    transition: border-color 120ms ease, box-shadow 120ms ease;
}
.mfc-signup-row input:hover {
    border-color: var(--mfc-accent);
}
.mfc-signup-row input:focus-visible {
    outline: none;
    border-color: var(--mfc-accent);
    box-shadow: 0 0 0 3px rgba(3, 70, 159, 0.25);
}
.mfc-signup-row input[aria-invalid="true"] {
    border-color: var(--mfc-danger);
    background: #fffafa;
}
.mfc-signup-row input[aria-invalid="true"]:focus-visible {
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.18);
}
.mfc-signup-row__error {
    margin-top: 0.35em;
    color: var(--mfc-danger);
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Two-column name pair on desktop. Other rows stay single-column. */
@media (min-width: 540px) {
    .mfc-signup-row--name-pair {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1em;
    }
    .mfc-signup-row--name-pair .mfc-signup-row {
        margin-bottom: 0;
    }
}

/* ====================== CHECKBOX + DISCLOSURE ====================== */
.mfc-signup-check {
    display: flex;
    align-items: flex-start;
    gap: 0.6em;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--mfc-text-soft);
    margin: 0.5em 0;
    padding: 0.5em 0.75em;
    border-radius: var(--mfc-radius);
    background: var(--mfc-bg-soft);
    border: 1px solid var(--mfc-border);
    transition: background 120ms ease, border-color 120ms ease;
}
.mfc-signup-check:hover { background: #fff; border-color: var(--mfc-border-strong); }
.mfc-signup-check input[type="checkbox"] {
    margin: 2px 0 0;
    accent-color: var(--mfc-accent);
    width: 1.05em;
    height: 1.05em;
    flex-shrink: 0;
    cursor: pointer;
}
.mfc-signup-check input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--mfc-accent);
    outline-offset: 2px;
}

/* DOB row visually nested under its parent checkbox */
.mfc-signup-row--nested {
    margin-left: 1.4em;
    padding: 0.75em 0 0 1em;
    border-left: 2px solid var(--mfc-bg-warm);
}
.mfc-signup-row--nested[hidden] { display: none; }

/* ====================== STUDENT REPEATER ====================== */
.mfc-su-student {
    position: relative;
    border: 1px solid var(--mfc-border);
    border-radius: var(--mfc-radius);
    padding: 1em 1em 0.5em;
    margin-bottom: 0.85em;
    background: #fff;
}
.mfc-su-student__legend {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--mfc-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0;
    margin-bottom: 0.65em;
}
.mfc-su-student__remove {
    position: absolute;
    top: 0.65em;
    right: 0.75em;
    background: none;
    border: 0;
    color: var(--mfc-muted);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.25em 0.5em;
    cursor: pointer;
    border-radius: var(--mfc-radius);
    line-height: 1;
}
.mfc-su-student__remove:hover { color: var(--mfc-danger); background: var(--mfc-danger-bg); }
.mfc-su-student__remove:focus-visible {
    outline: 2px solid var(--mfc-danger);
    outline-offset: 2px;
    color: var(--mfc-danger);
}

/* Every student row gets a Remove affordance. Server-side validation
   enforces the "self_student || children >= 1" rule, so a parent who
   removes the wrong row gets a clear error message and can re-add — the
   previous "permanently hide first row" UX trapped them when a typo
   landed in the anchor row after a repop. */

/* When the parent has ticked "I'm a student myself", they ARE the student —
   the always-rendered Student 1 anchor row becomes redundant. Hide it; any
   additional children added via "+ Add another student" stay visible because
   only :first-of-type is hit. JS also clears the hidden row's inputs on
   toggle/submit so stale typing doesn't leak through. */
.mfc-signup-section--students[data-self-student="true"] #mfc_su_students > .mfc-su-student:first-of-type { display: none; }

@media (min-width: 540px) {
    .mfc-su-student__fields {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0 1em;
    }
    .mfc-su-student__fields .mfc-signup-row:last-child {
        grid-column: 1 / -1;
    }
}

.mfc-signup-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4em;
    width: 100%;
    background: transparent;
    border: 1.5px dashed var(--mfc-border-strong);
    color: var(--mfc-accent);
    padding: 0.85em 1em;
    border-radius: var(--mfc-radius);
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}
.mfc-signup-add:hover {
    border-color: var(--mfc-accent);
    background: var(--mfc-bg-warm);
}
.mfc-signup-add:focus-visible {
    outline: none;
    border-color: var(--mfc-accent);
    box-shadow: 0 0 0 3px rgba(3, 70, 159, 0.25);
}
/* ====================== SUBMIT + TERMS ====================== */
.mfc-signup__footer {
    margin-top: 1.5em;
    padding-top: 1.5em;
    border-top: 1px solid var(--mfc-border);
}
.mfc-signup-terms {
    color: var(--mfc-muted);
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0 0 1em;
}
.mfc-signup-terms a {
    color: var(--mfc-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.mfc-signup-terms a:hover { color: var(--mfc-accent-hover); }

.mfc-signup-btn {
    display: block;
    width: 100%;
    background: var(--mfc-accent);
    color: var(--mfc-accent-fg);
    border: 0;
    padding: 0.95em 1.5em;
    border-radius: var(--mfc-radius);
    font: inherit;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    transition: background 120ms ease, transform 80ms ease, box-shadow 120ms ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.mfc-signup-btn:hover {
    background: var(--mfc-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.mfc-signup-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.mfc-signup-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(3, 70, 159, 0.35), 0 4px 14px rgba(0, 0, 0, 0.25);
}
.mfc-signup-reassure {
    text-align: center;
    color: var(--mfc-muted);
    font-size: 0.85rem;
    margin: 0.85em 0 0;
}

.mfc-signup-login {
    text-align: center;
    color: var(--mfc-text-soft);
    font-size: 0.95rem;
    margin: 1.5em 0 0;
}
.mfc-signup-login a {
    color: var(--mfc-accent);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 2px solid var(--mfc-bg-warm);
    padding-bottom: 1px;
}
.mfc-signup-login a:hover { border-bottom-color: var(--mfc-accent); }
.mfc-signup-login a:focus-visible {
    outline: 2px solid var(--mfc-accent);
    outline-offset: 3px;
}

/* ====================== v0.11.0 CONSENT WIZARD ======================
   Multi-step wizard (vertical stepper + per-step layout). Additive on top
   of the existing .mfc-signup token palette — no overrides of legacy rules.
   Mobile-first: stepper stacks above the active step; ≥900px it docks to
   the left in a sidebar layout. Square radii inherited from the base
   .mfc-signup tokens (do not re-declare). */

/* Outer two-pane layout: stepper + active step body. On narrow screens
   the stepper collapses to a horizontal scroll pill row so it never eats
   the viewport height before the form is reachable. */
.mfc-wizard {
    display: flex;
    flex-direction: column;
    gap: 1.5em;
    margin: 0;
}

/* ---------- VERTICAL STEPPER ---------- */
.mfc-wizard__progress {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: row;
    gap: 0.4em;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 0.35em; /* room for the focus ring not to clip */
}

.mfc-wizard__progress-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    flex: 0 0 auto;
    padding: 0.45em 0.85em;
    background: var(--mfc-bg-soft);
    border: 1px solid var(--mfc-border);
    color: var(--mfc-muted);
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
    border-radius: var(--mfc-radius);
    white-space: nowrap;
    /* No transition on background — abrupt state change matches the rest
       of the form's snappy feel. */
}

/* Step index marker. Numeric on incomplete, checkmark on complete. */
.mfc-wizard__progress-item::before {
    content: attr(data-step);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5em;
    height: 1.5em;
    background: #fff;
    border: 1px solid var(--mfc-border-strong);
    color: var(--mfc-muted);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--mfc-radius);
}

.mfc-wizard__progress-item--current {
    background: #fff;
    border-color: var(--mfc-accent);
    color: var(--mfc-accent);
}
.mfc-wizard__progress-item--current::before {
    background: var(--mfc-accent);
    border-color: var(--mfc-accent);
    color: var(--mfc-accent-fg);
}

.mfc-wizard__progress-item--complete {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #047857;
}
.mfc-wizard__progress-item--complete::before {
    content: "\2713"; /* heavy check */
    background: #047857;
    border-color: #047857;
    color: #fff;
}

/* Keyboard / SR users still need a visible focus ring on item anchors
   (steps can be links if the wizard allows back-jump). */
.mfc-wizard__progress-item a,
.mfc-wizard__progress-item button {
    color: inherit;
    text-decoration: none;
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    cursor: pointer;
}
.mfc-wizard__progress-item a:focus-visible,
.mfc-wizard__progress-item button:focus-visible {
    outline: 2px solid var(--mfc-accent);
    outline-offset: 3px;
}

/* ---------- ACTIVE STEP CARD ---------- */
.mfc-wizard__step {
    background: #fff;
    border: 1px solid var(--mfc-border);
    border-radius: var(--mfc-radius);
    padding: 1.25em 1em 1.5em;
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.mfc-wizard__step-title {
    margin: 0;
    color: var(--mfc-accent);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.25;
    padding-bottom: 0.5em;
    border-bottom: 2px solid var(--mfc-bg-warm);
}

.mfc-wizard__step-body {
    display: flex;
    flex-direction: column;
    gap: 1em;
    color: var(--mfc-text);
    line-height: 1.55;
}
.mfc-wizard__step-body > p { margin: 0; }

/* ---------- POLICY BODY PANEL ---------- */
.mfc-wizard__policy-body {
    background: #fff;
    border: 1px solid var(--mfc-border-strong);
    border-radius: var(--mfc-radius);
    padding: 1em 1.1em;
    max-height: 320px;
    overflow-y: auto;
    color: var(--mfc-text);
    font-size: 0.95rem;
    line-height: 1.6;
    /* Subtle inner shadow at the top/bottom so users see "more to scroll" */
    box-shadow: inset 0 -8px 8px -8px rgba(0, 0, 0, 0.08),
                inset 0 8px 8px -8px rgba(0, 0, 0, 0.08);
}
.mfc-wizard__policy-body :first-child { margin-top: 0; }
.mfc-wizard__policy-body :last-child { margin-bottom: 0; }
.mfc-wizard__policy-body h2,
.mfc-wizard__policy-body h3,
.mfc-wizard__policy-body h4 {
    color: var(--mfc-accent);
    margin: 1em 0 0.4em;
    line-height: 1.3;
}
.mfc-wizard__policy-body ul,
.mfc-wizard__policy-body ol {
    padding-left: 1.4em;
    margin: 0.5em 0;
}
.mfc-wizard__policy-body a {
    color: var(--mfc-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ---------- FOOTER DISCLOSURE ---------- */
.mfc-wizard__footer-disclosure {
    color: var(--mfc-muted);
    font-size: 0.8rem;
    line-height: 1.5;
    margin: 0;
    padding-top: 0.5em;
    border-top: 1px dashed var(--mfc-border);
}

/* ---------- NAV ROW ---------- */
.mfc-wizard__nav {
    display: flex;
    flex-direction: column-reverse;
    gap: 0.6em;
    margin-top: 0.5em;
}
.mfc-wizard__nav-back,
.mfc-wizard__nav-next {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.85em 1.25em;
    border-radius: var(--mfc-radius);
    font: inherit;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
    cursor: pointer;
    transition: background 120ms ease, color 120ms ease, border-color 120ms ease, box-shadow 120ms ease, transform 80ms ease;
}

/* Primary — same visual weight as .mfc-signup-btn but doesn't override it. */
.mfc-wizard__nav-next {
    background: var(--mfc-accent);
    color: var(--mfc-accent-fg);
    border: 1px solid var(--mfc-accent);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.mfc-wizard__nav-next:hover {
    background: var(--mfc-accent-hover);
    border-color: var(--mfc-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.mfc-wizard__nav-next:active { transform: translateY(0); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); }
.mfc-wizard__nav-next:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(3, 70, 159, 0.35), 0 4px 14px rgba(0, 0, 0, 0.25);
}
.mfc-wizard__nav-next[disabled] {
    background: var(--mfc-border-strong);
    border-color: var(--mfc-border-strong);
    color: #fff;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Secondary — accent outline (v0.33: outlined = secondary, filled = primary). */
.mfc-wizard__nav-back {
    background: transparent;
    color: var(--mfc-accent);
    border: 1px solid var(--mfc-accent);
}
.mfc-wizard__nav-back:hover {
    border-color: var(--mfc-accent-hover);
    color: var(--mfc-accent-hover);
    background: #f0f5fc;
}
.mfc-wizard__nav-back:focus-visible {
    outline: none;
    border-color: var(--mfc-accent);
    box-shadow: 0 0 0 3px rgba(3, 70, 159, 0.25);
}

/* ---------- REPEATER ROW LAYOUTS ---------- */
.mfc-wizard__contact-row,
.mfc-wizard__medication-row {
    position: relative;
    border: 1px solid var(--mfc-border);
    border-radius: var(--mfc-radius);
    background: var(--mfc-bg-soft);
    padding: 0.85em 0.9em 0.5em;
    margin-bottom: 0.85em;
    display: flex;
    flex-direction: column;
    gap: 0.4em;
}
.mfc-wizard__contact-row .mfc-signup-row,
.mfc-wizard__medication-row .mfc-signup-row { margin-bottom: 0.4em; }

/* Repeater "Remove" button — reuses the student-repeater visual language
   so the wizard feels like part of the same form family. */
.mfc-wizard__contact-row .mfc-wizard__row-remove,
.mfc-wizard__medication-row .mfc-wizard__row-remove {
    position: absolute;
    top: 0.5em;
    right: 0.6em;
    background: none;
    border: 0;
    color: var(--mfc-muted);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.25em 0.5em;
    cursor: pointer;
    border-radius: var(--mfc-radius);
    line-height: 1;
}
.mfc-wizard__contact-row .mfc-wizard__row-remove:hover,
.mfc-wizard__medication-row .mfc-wizard__row-remove:hover {
    color: var(--mfc-danger);
    background: var(--mfc-danger-bg);
}
.mfc-wizard__contact-row .mfc-wizard__row-remove:focus-visible,
.mfc-wizard__medication-row .mfc-wizard__row-remove:focus-visible {
    outline: 2px solid var(--mfc-danger);
    outline-offset: 2px;
    color: var(--mfc-danger);
}

/* ---------- DESKTOP LAYOUT ----------
   At ≥900px the stepper docks to the left as a true vertical rail; the
   active step card flows in the remaining column. The horizontal scroll
   behaviour is dropped because the rail no longer needs to fit on one row. */
@media (min-width: 900px) {
    .mfc-wizard {
        display: grid;
        grid-template-columns: 220px 1fr;
        align-items: start;
        gap: 2em;
    }

    .mfc-wizard__progress {
        flex-direction: column;
        gap: 0.35em;
        overflow: visible;
        padding-bottom: 0;
        position: sticky;
        top: 1em;
    }

    .mfc-wizard__progress-item {
        width: 100%;
        white-space: normal;
        font-size: 0.9rem;
        padding: 0.6em 0.85em;
    }

    .mfc-wizard__step {
        padding: 1.75em 1.75em 2em;
    }

    .mfc-wizard__nav {
        flex-direction: row;
        justify-content: space-between;
        gap: 1em;
    }
    .mfc-wizard__nav-back,
    .mfc-wizard__nav-next {
        width: auto;
        min-width: 9em;
    }
    /* When only "Next" is rendered (first step), push it to the right. */
    .mfc-wizard__nav-next:only-child {
        margin-left: auto;
    }

    /* Repeater rows can fit two fields side-by-side on desktop. */
    .mfc-wizard__contact-row,
    .mfc-wizard__medication-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5em 1em;
        align-items: end;
        padding: 1em 1.1em 0.5em;
    }
    .mfc-wizard__contact-row .mfc-signup-row--full,
    .mfc-wizard__medication-row .mfc-signup-row--full {
        grid-column: 1 / -1;
    }
}

/* ======================================================================
   WIZARD — v0.11.0 step templates use a parallel vocabulary
   (mfc-wizard-row, mfc-wizard-btn, mfc-wizard-radio, mfc-wizard-check,
   mfc-wizard__actions, mfc-wizard__policy, etc.) that was added by the
   template build agents independently of the stepper-CSS agent. The
   rules below restore visual treatment for that vocabulary. Mirrors
   the .mfc-signup-* equivalents so the wizard looks like the rest of
   the signup surface — square radii, black accent, mobile-first.
   ====================================================================== */

/* Base step container — the same .mfc-wizard wrapper used everywhere.
   Force a vertical stack so the host column (often narrow) can't push
   sibling children (title / policy box / form / footer) sideways. */
.mfc-wizard {
    display: flex;
    flex-direction: column;
    gap: 1em;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
}
.mfc-wizard * { box-sizing: border-box; }
.mfc-wizard > h2,
.mfc-wizard__step-title {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--mfc-text);
}

/* Progress indicator injected above every step by SignupShortcode::renderProgress. */
.mfc-wizard__progress {
    display: flex;
    flex-direction: column;
    gap: 0.4em;
    margin: 0 0 0.25em;
}
.mfc-wizard__progress-label {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--mfc-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.mfc-wizard__progress-bar {
    position: relative;
    width: 100%;
    height: 6px;
    background: var(--mfc-border);
    border-radius: 0;
    overflow: hidden;
}
.mfc-wizard__progress-fill {
    display: block;
    height: 100%;
    background: var(--mfc-accent);
    transition: width 250ms ease;
}
.mfc-wizard__intro {
    margin: 0 0 1.25em;
    color: var(--mfc-text-soft);
    font-size: 0.95rem;
    line-height: 1.5;
}
.mfc-wizard__hint {
    margin: 0 0 1em;
    color: var(--mfc-text-soft);
    font-size: 0.9rem;
    line-height: 1.45;
}
.mfc-wizard__hint--quiet {
    color: var(--mfc-muted);
    font-size: 0.85rem;
    margin-top: -0.25em;
    margin-bottom: 1em;
}

/* Inline error envelope on a step. Mirrors .mfc-signup__errors. */
.mfc-wizard__errors {
    display: flex;
    gap: 0.75em;
    background: var(--mfc-danger-bg);
    border: 1px solid var(--mfc-danger-border);
    color: var(--mfc-danger);
    border-radius: var(--mfc-radius);
    padding: 0.85em 1em;
    margin: 0 0 1.25em;
    font-size: 0.9rem;
    line-height: 1.4;
}
.mfc-wizard__errors ul {
    margin: 0.25em 0 0;
    padding-left: 1.2em;
}
.mfc-wizard__errors li {
    margin: 0;
}

/* Policy accordion (v0.33) — native <details>, collapsed by default so the
   step leads with the decision; the full wording is one tap away. */
.mfc-wizard__policy-accordion {
    border: 1px solid var(--mfc-border-strong);
    border-radius: var(--mfc-radius-card);
    background: #fff;
    margin: 0 0 1.25em;
    overflow: hidden;
}
.mfc-wizard__policy-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75em;
    padding: 0.9em 1.1em;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--mfc-accent);
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: background 120ms ease;
}
.mfc-wizard__policy-summary::-webkit-details-marker { display: none; }
.mfc-wizard__policy-summary::after {
    content: "";
    width: 0.5em;
    height: 0.5em;
    border-right: 2px solid var(--mfc-accent);
    border-bottom: 2px solid var(--mfc-accent);
    transform: rotate(45deg);
    transition: transform 150ms ease;
    flex: none;
    margin-top: -0.2em;
}
.mfc-wizard__policy-accordion[open] > .mfc-wizard__policy-summary::after {
    transform: rotate(225deg);
    margin-top: 0.15em;
}
.mfc-wizard__policy-summary:hover { background: #f0f5fc; }
.mfc-wizard__policy-summary:focus-visible {
    outline: 2px solid var(--mfc-accent);
    outline-offset: -2px;
}
/* Inside the accordion the policy panel loses its own frame — the accordion
   provides it. Standalone panels (policy-body on My Account) keep theirs. */
.mfc-wizard__policy-accordion .mfc-wizard__policy {
    border: 0;
    border-top: 1px solid var(--mfc-border);
    border-radius: 0;
    margin: 0;
}

/* Policy display block — scrolls if the body is long. */
.mfc-wizard__policy,
.mfc-wizard__policy-body {
    background: #ffffff;
    border: 1px solid var(--mfc-border);
    border-radius: var(--mfc-radius-card);
    padding: 1em 1.1em;
    margin: 0 0 1.25em;
    max-height: 18em;
    overflow-y: auto;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--mfc-text-soft);
}
.mfc-wizard__policy:focus,
.mfc-wizard__policy:focus-visible {
    outline: 2px solid var(--mfc-accent);
    outline-offset: 2px;
}
.mfc-wizard__policy p,
.mfc-wizard__policy-body p { margin: 0 0 0.75em; }
.mfc-wizard__policy p:last-child,
.mfc-wizard__policy-body p:last-child { margin-bottom: 0; }

/* Form wrapper. */
.mfc-wizard-form {
    display: flex;
    flex-direction: column;
    gap: 1em;
    margin: 0;
}
.mfc-wizard-form--inline {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: end;
    gap: 0.75em 1em;
}

/* Form rows — labelled input pair, mirrors .mfc-signup-row. */
.mfc-wizard-row {
    display: flex;
    flex-direction: column;
    gap: 0.3em;
}
/* The hidden attribute's UA display:none loses to any author display rule
   (like the flex above) — without this, conditionally-revealed rows such as
   the "Your date of birth" field on the account step rendered on page load
   despite being marked hidden. Blanket rule so every current and future
   hidden-toggled element inside the wizard actually hides. */
.mfc-wizard [hidden] {
    display: none !important;
}
.mfc-wizard-row label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--mfc-text-soft);
    display: flex;
    gap: 0.25em;
}
.mfc-wizard-row .required {
    color: var(--mfc-danger);
}
.mfc-wizard-row input[type="text"],
.mfc-wizard-row input[type="email"],
.mfc-wizard-row input[type="password"],
.mfc-wizard-row input[type="tel"],
.mfc-wizard-row input[type="number"],
.mfc-wizard-row input[type="date"],
.mfc-wizard-row select,
.mfc-wizard-row textarea {
    width: 100%;
    border: 1px solid var(--mfc-border-strong);
    border-radius: var(--mfc-radius);
    padding: 0.55em 0.7em;
    font: inherit;
    font-size: 0.95rem;
    color: var(--mfc-text);
    background: #fff;
    transition: border-color 100ms ease, box-shadow 100ms ease;
}
.mfc-wizard-row textarea {
    min-height: 4.5em;
    line-height: 1.45;
    resize: vertical;
}
.mfc-wizard-row input:hover,
.mfc-wizard-row select:hover,
.mfc-wizard-row textarea:hover {
    border-color: var(--mfc-text-soft);
}
.mfc-wizard-row input:focus-visible,
.mfc-wizard-row select:focus-visible,
.mfc-wizard-row textarea:focus-visible {
    border-color: var(--mfc-accent);
    box-shadow: 0 0 0 2px rgba(0,0,0,0.08);
    outline: none;
}
.mfc-wizard-row input[aria-invalid="true"],
.mfc-wizard-row select[aria-invalid="true"],
.mfc-wizard-row textarea[aria-invalid="true"] {
    border-color: var(--mfc-danger);
}
.mfc-wizard-row input[aria-invalid="true"]:focus-visible,
.mfc-wizard-row select[aria-invalid="true"]:focus-visible,
.mfc-wizard-row textarea[aria-invalid="true"]:focus-visible {
    box-shadow: 0 0 0 2px rgba(185,28,28,0.18);
}
.mfc-wizard-row__hint,
.mfc-wizard-row__help {
    color: var(--mfc-muted);
    font-size: 0.8rem;
    line-height: 1.4;
}
.mfc-wizard-row__error {
    color: var(--mfc-danger);
    font-size: 0.8rem;
    line-height: 1.4;
    font-weight: 600;
}
/* Nested conditional row (e.g. self-student DOB). Hidden by default
   via the `hidden` HTML attribute; the wizard JS toggles it on the
   parent checkbox change. No visual rail — the conditional cue is
   the show/hide itself, not a left border. */
.mfc-wizard-row--nested {
    padding-left: 0;
    border-left: 0;
}

/* Checkbox row — plain inline label, no card treatment. */
.mfc-wizard-check {
    display: inline-flex;
    gap: 0.5em;
    padding: 0;
    background: transparent;
    border: 0;
    align-items: center;
    cursor: pointer;
}
.mfc-wizard-check input[type="checkbox"] {
    accent-color: var(--mfc-accent);
    width: 1em;
    height: 1em;
}
.mfc-wizard-check input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--mfc-accent);
    outline-offset: 2px;
}

/* Radio choices for yes/no consent steps. */
.mfc-wizard__choice {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    border: 0;
    margin: 0;
    padding: 0;
}
.mfc-wizard-radio {
    display: flex;
    gap: 0.6em;
    padding: 0.7em 0.85em;
    border: 1px solid var(--mfc-border);
    border-radius: var(--mfc-radius);
    background: #fff;
    align-items: center;
    cursor: pointer;
    transition: border-color 100ms ease, background 100ms ease;
}
.mfc-wizard-radio:hover {
    border-color: var(--mfc-border-strong);
    background: var(--mfc-bg-soft);
}
.mfc-wizard-radio input[type="radio"] {
    accent-color: var(--mfc-accent);
    width: 1em;
    height: 1em;
}
.mfc-wizard-radio input[type="radio"]:focus-visible {
    outline: 2px solid var(--mfc-accent);
    outline-offset: 2px;
}
.mfc-wizard-radio:has(input[type="radio"]:checked) {
    border-color: var(--mfc-accent);
    background: var(--mfc-bg-soft);
}

/* Primary submit button — mirrors .mfc-signup-btn. */
.mfc-wizard-btn {
    align-self: flex-start;
    background: var(--mfc-accent);
    color: var(--mfc-accent-fg);
    border: 1px solid var(--mfc-accent);
    border-radius: var(--mfc-radius);
    padding: 0.7em 1.5em;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 100ms ease, border-color 100ms ease;
    margin-top: 0.25em;
}
.mfc-wizard-btn:hover {
    background: var(--mfc-accent-hover);
    border-color: var(--mfc-accent-hover);
}
.mfc-wizard-btn:focus-visible {
    outline: 2px solid var(--mfc-accent);
    outline-offset: 2px;
}
.mfc-wizard-btn[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Secondary button — "Add another contact" etc. */
.mfc-wizard-btn-secondary {
    align-self: flex-start;
    background: #fff;
    color: var(--mfc-text);
    border: 1px solid var(--mfc-border-strong);
    border-radius: var(--mfc-radius);
    padding: 0.55em 1em;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 100ms ease, background 100ms ease;
}
.mfc-wizard-btn-secondary:hover {
    border-color: var(--mfc-accent);
    background: var(--mfc-bg-soft);
}
.mfc-wizard-btn-secondary:focus-visible {
    outline: 2px solid var(--mfc-accent);
    outline-offset: 2px;
}

/* Inline link-style button (e.g. cancel / start-over). */
.mfc-wizard-btn-link {
    background: none;
    border: 0;
    padding: 0;
    color: var(--mfc-text-soft);
    font: inherit;
    font-size: 0.85rem;
    text-decoration: underline;
    cursor: pointer;
}
.mfc-wizard-btn-link:hover {
    color: var(--mfc-accent);
}

/* Actions row (multiple buttons together — e.g. add_another step). */
.mfc-wizard__actions {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    margin-top: 0.75em;
}
@media (min-width: 480px) {
    .mfc-wizard__actions { flex-direction: row; flex-wrap: wrap; }
}
.mfc-wizard__actions--choice .mfc-wizard-btn,
.mfc-wizard__actions--choice .mfc-wizard-btn-secondary {
    align-self: stretch;
}

/* Repeater containers (templates use the flat naming, not BEM __row). */
.mfc-wizard-contacts,
.mfc-wizard-medications {
    display: flex;
    flex-direction: column;
    gap: 0.75em;
    margin: 0;
    padding: 0;
}
.mfc-wizard-contact,
.mfc-wizard-medication {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6em;
    padding: 0.85em 1em;
    border: 1px solid var(--mfc-border);
    border-radius: var(--mfc-radius-card);
    background: var(--mfc-bg-soft);
    position: relative;
}
.mfc-wizard__contact-row-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.2em;
}
.mfc-wizard__contact-row-remove,
.mfc-wizard-medication__remove {
    background: none;
    border: 1px solid transparent;
    color: var(--mfc-danger);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.25em 0.5em;
    border-radius: var(--mfc-radius);
}
.mfc-wizard__contact-row-remove:hover,
.mfc-wizard-medication__remove:hover {
    border-color: var(--mfc-danger-border);
    background: var(--mfc-danger-bg);
}

/* Existing students roster (review step). */
.mfc-wizard__roster {
    margin: 0 0 1.25em;
    padding: 0.85em 1em;
    border: 1px solid var(--mfc-border);
    border-radius: var(--mfc-radius-card);
    background: var(--mfc-bg-soft);
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4em;
}
.mfc-wizard__roster li {
    font-size: 0.9rem;
    color: var(--mfc-text-soft);
}

/* Contact + medication rows stay single-column / full-width regardless of
   viewport so the narrow host column doesn't have to handle 2-up cells. */

/* Roster list (students added so far). Divi's default theme CSS adds
   bullets and indent to `ul`; scope our reset under .mfc-wizard so we
   only need !important on the bullet override (matches the calendar's
   month-cell list defence). */
.mfc-wizard ul.mfc-wizard__roster,
.mfc-wizard .mfc-wizard__roster {
    list-style: none !important;
    list-style-type: none !important;
    list-style-image: none !important;
    padding: 0.85em 1em;
    padding-inline-start: 1em !important;
    margin: 0 0 1.25em;
    border: 1px solid var(--mfc-border);
    border-radius: var(--mfc-radius-card);
    background: var(--mfc-bg-soft);
    display: flex;
    flex-direction: column;
    gap: 0.4em;
}
.mfc-wizard ul.mfc-wizard__roster > li,
.mfc-wizard .mfc-wizard__roster > li {
    list-style: none !important;
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
    color: var(--mfc-text-soft);
}

/* Back action bar — small left-aligned link, sits between the progress
   indicator and the step body. Rendered by SignupShortcode::renderBack. */
.mfc-wizard__back {
    margin: 0;
}
.mfc-wizard__back-form {
    margin: 0;
    display: inline;
}
.mfc-wizard__back-btn {
    background: none;
    border: 0;
    padding: 0;
    color: var(--mfc-text-soft);
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.mfc-wizard__back-btn:hover { color: var(--mfc-accent); }
.mfc-wizard__back-btn:focus-visible {
    outline: 2px solid var(--mfc-accent);
    outline-offset: 2px;
}
