/* ==========================================================================
   That's My Pan!® — Fundraiser Registration wizard
   assets/css/register.css

   Layers on top of styles.css. Uses only the custom properties already
   defined there (--navy, --teal, --honey, --cream, --shadow, etc.) so a
   palette change in :root still flows through this file untouched.

   Loaded by start.php and registration-complete.php via $page_styles.
   ========================================================================== */

/* ---------------------------------------------------------------- intro */

.reg-intro {
    padding: 56px 0 32px;
}

.reg-intro h1 {
    font-size: clamp(2rem, 6vw, 3rem);
    margin-bottom: .4em;
}

.reg-intro .lede {
    font-size: 19px;
    color: var(--navy-soft);
    max-width: 42rem;
}

.reg-assure {
    list-style: none;
    margin: 28px 0 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.reg-assure li {
    position: relative;
    padding-left: 30px;
    font-size: 16px;
    color: var(--ink);
}

.reg-assure li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: .52em;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--teal);
}

/* ---------------------------------------------------------------- shell */

.reg-wrap {
    padding: 8px 0 84px;
}

/* ---------------------------------------------------------------- alert */

.reg-alert {
    background: #FDF1EC;
    border: 1px solid #E9B39C;
    border-left: 5px solid #C9542A;
    border-radius: var(--r-sm);
    padding: 18px 22px;
    margin: 0 0 28px;
}

.reg-alert:focus { outline: none; }

.reg-alert__h {
    font-size: 18px;
    color: #8E3A18;
    margin: 0 0 4px;
}

.reg-alert p {
    margin: 0;
    font-size: 15.5px;
    color: #7A4229;
}

/* ---------------------------------------------------------------- progress */

.reg-prog {
    margin: 0 0 8px;
}

.reg-prog__list {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.reg-prog__step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    text-align: center;
    cursor: default;
}

.reg-prog__step.is-done { cursor: pointer; }

.reg-prog__dot {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--paper);
    border: 2px solid var(--rule);
    color: var(--navy-soft);
    font-family: var(--body);
    font-weight: 700;
    font-size: 14.5px;
    transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.reg-prog__lbl {
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .04em;
    color: var(--navy-soft);
    transition: color .2s ease;
}

.reg-prog__step.is-current .reg-prog__dot {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}

.reg-prog__step.is-current .reg-prog__lbl {
    color: var(--navy);
}

.reg-prog__step.is-done .reg-prog__dot {
    background: var(--teal);
    border-color: var(--teal);
    color: #06322E;
}

.reg-prog__step.is-done .reg-prog__lbl { color: var(--teal-deep); }

/* checkmark replaces the number on completed steps */
.reg-prog__step.is-done .reg-prog__dot {
    font-size: 0;
}
.reg-prog__step.is-done .reg-prog__dot::after {
    content: "\2713";
    font-size: 17px;
    line-height: 1;
}

.reg-prog__rail {
    height: 5px;
    border-radius: 999px;
    background: var(--rule-soft);
    overflow: hidden;
}

.reg-prog__fill {
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--teal), var(--teal-deep));
    transition: width .32s cubic-bezier(.4, 0, .2, 1);
}

/* The progress dots carry this visually and each step repeats it as a kicker,
   so the live region is for assistive tech only — showing it read as a
   duplicate label sitting above the card. */
.reg-status {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* ---------------------------------------------------------------- form card */

.reg-form {
    background: var(--paper);
    border: 1px solid var(--rule-soft);
    border-radius: var(--r);
    box-shadow: var(--shadow);
    margin-top: 14px;
    overflow: hidden;
}

.reg-step {
    border: 0;
    margin: 0;
    padding: 36px 34px 32px;
    min-inline-size: 0;   /* fieldsets refuse to shrink without this */
}

.reg-step[hidden] { display: none; }

.reg-step__legend {
    display: block;
    width: 100%;
    padding: 0;
    margin: 0 0 6px;
}

.reg-step__kicker {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--teal-deep);
    margin-bottom: 8px;
}

.reg-step__title {
    display: block;
    font-family: var(--display);
    font-size: clamp(1.4rem, 4vw, 1.85rem);
    font-weight: 600;
    color: var(--navy);
    line-height: 1.15;
    letter-spacing: -.015em;
}

.reg-step__title:focus { outline: none; }

.reg-step__intro {
    color: var(--navy-soft);
    font-size: 16px;
    margin: 12px 0 26px;
    max-width: 40rem;
}

/* ---------------------------------------------------------------- fields */

.fld {
    margin: 0 0 22px;
}

.fld[hidden] { display: none; }

.fld__lbl {
    display: block;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--navy);
    margin: 0 0 7px;
}

.fld__opt {
    font-weight: 400;
    font-size: 13px;
    color: var(--navy-soft);
    font-style: italic;
}

.fld__in {
    display: block;
    width: 100%;
    font-family: var(--body);
    font-size: 16.5px;
    color: var(--ink);
    background: var(--paper);
    border: 1.5px solid var(--rule);
    border-radius: var(--r-sm);
    padding: 13px 15px;
    transition: border-color .16s ease, box-shadow .16s ease;
    -webkit-appearance: none;
    appearance: none;
}

/* native select arrow, drawn so it matches the inputs */
select.fld__in {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%236C6E9B' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px 8px;
    padding-right: 42px;
}

.fld__in::placeholder { color: #A6A8C2; }

.fld__in:hover { border-color: rgba(42, 43, 89, .28); }

.fld__in:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px var(--teal-wash);
}

.fld__in:focus-visible {
    outline: none;   /* the ring above already reads clearly */
}

.fld__hint {
    font-size: 13.5px;
    color: var(--navy-soft);
    margin: 7px 0 0;
    line-height: 1.45;
}

.fld__hint strong { color: var(--teal-deep); }

.fld__err {
    font-size: 14px;
    font-weight: 600;
    color: #B4381A;
    margin: 7px 0 0;
    line-height: 1.45;
}

.fld__err a { color: #B4381A; text-decoration: underline; }

.fld.is-invalid .fld__in {
    border-color: #D0644A;
    background: #FEF8F6;
}

.fld.is-invalid .fld__in:focus {
    box-shadow: 0 0 0 3px rgba(208, 100, 74, .16);
}

.fld.is-valid .fld__in {
    border-color: rgba(70, 192, 179, .75);
}

/* spinner while an availability check is in flight */
.fld.is-checking {
    position: relative;
}

.fld.is-checking::after {
    content: "";
    position: absolute;
    right: 14px;
    top: 40px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--rule);
    border-top-color: var(--teal-deep);
    animation: reg-spin .7s linear infinite;
}

@keyframes reg-spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- rows */

.fld-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
}

.fld-row--3 {
    grid-template-columns: 2fr 1.4fr 1fr;
}

/* ---------------------------------------------------------------- honeypot */

.reg-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ---------------------------------------------------------------- notes */

.reg-note {
    background: var(--teal-wash);
    border-left: 4px solid var(--teal);
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
    padding: 15px 18px;
    margin: 0 0 22px;
    font-size: 15px;
    line-height: 1.55;
    color: #0E4B46;
}

.reg-note[hidden] { display: none; }

.reg-note strong { color: var(--teal-deep); }

.reg-note--soft {
    background: var(--cream-2);
    border-left-color: var(--honey);
    color: #5A4A2E;
    margin-top: 12px;
}

.reg-note--soft strong { color: var(--honey-deep); }

/* ---------------------------------------------------------------- nav */

.reg-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 30px 0 0;
    padding-top: 26px;
    border-top: 1px solid var(--rule-soft);
}

.btn--ghost {
    background: transparent;
    color: var(--navy-soft);
    box-shadow: none;
    padding: 13px 20px;
}

.btn--ghost:hover {
    background: var(--cream-2);
    color: var(--navy);
    transform: none;
}

.btn.is-busy {
    opacity: .72;
    cursor: progress;
}

.btn[disabled] { pointer-events: none; }

.reg-aside {
    font-size: 14.5px;
    color: var(--navy-soft);
    margin: 20px 0 0;
    line-height: 1.55;
}

.reg-help {
    text-align: center;
    font-size: 15.5px;
    color: var(--navy-soft);
    margin: 30px auto 0;
    max-width: 34rem;
}

/* ---------------------------------------------------------------- kit cards */

.kits {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 0 0 8px;
}

.kit {
    display: flex;
    flex-direction: column;
    position: relative;
    background: var(--paper);
    border: 2px solid var(--rule);
    border-radius: var(--r);
    padding: 24px 22px 22px;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.kit:hover {
    border-color: rgba(70, 192, 179, .6);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.kit.is-picked {
    border-color: var(--teal);
    background: #F7FDFC;
    box-shadow: 0 0 0 4px var(--teal-wash);
}

/* Keep the radio reachable but let the card do the work visually. */
.kit__radio {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.kit__radio:focus-visible + .kit__head {
    outline: 3px solid var(--honey);
    outline-offset: 4px;
    border-radius: 4px;
}

.kit__head {
    display: block;
    margin: 0 0 12px;
    padding-right: 34px;
}

.kit__name {
    display: block;
    font-family: var(--display);
    font-size: 22px;
    font-weight: 600;
    color: var(--navy);
    line-height: 1.15;
}

.kit__price {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--teal-deep);
    margin-top: 5px;
    line-height: 1.4;
}

/* selected tick, top-right */
.kit::after {
    content: "";
    position: absolute;
    top: 22px;
    right: 20px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--rule);
    transition: background .18s ease, border-color .18s ease;
}

.kit.is-picked::after {
    background: var(--teal) url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23063230' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l3 3 6-6.5'/%3E%3C/svg%3E") center / 15px no-repeat;
    border-color: var(--teal);
}

.kit__blurb {
    display: block;
    font-size: 15px;
    color: var(--navy-soft);
    line-height: 1.55;
    margin: 0 0 16px;
}

.kit__list {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: grid;
    gap: 8px;
    /* The card is a flex column and this list is the growing child, so grid
       rows would otherwise stretch to absorb the slack — making the shorter
       kit's bullets drift apart. Pack them to the top instead. */
    align-content: start;
    flex: 1 1 auto;
}

.kit__list li {
    position: relative;
    padding-left: 24px;
    font-size: 14.5px;
    line-height: 1.45;
    color: var(--ink);
}

.kit__list li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: .42em;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--teal-wash);
    box-shadow: inset 0 0 0 2px var(--teal);
}

.kit__note {
    display: block;
    font-size: 13px;
    font-style: italic;
    color: var(--navy-soft);
    line-height: 1.45;
    padding-top: 14px;
    border-top: 1px solid var(--rule-soft);
}

.kits.is-invalid .kit {
    border-color: #D0644A;
}

/* ==========================================================================
   Completion page
   ========================================================================== */

.reg-done {
    padding: 60px 0 90px;
}

.reg-done__mark {
    color: var(--teal-deep);
    margin: 0 0 22px;
}

.reg-done h1 {
    font-size: clamp(2rem, 6vw, 3rem);
    margin-bottom: .35em;
}

.reg-done .lede {
    font-size: 19px;
    color: var(--navy-soft);
    max-width: 40rem;
}

.reg-done__act {
    background: var(--paper);
    border: 1px solid var(--rule-soft);
    border-left: 5px solid var(--honey);
    border-radius: var(--r);
    box-shadow: var(--shadow);
    padding: 28px 30px;
    margin: 34px 0 46px;
}

.reg-done__act h2 {
    font-size: 22px;
    margin: 0 0 10px;
}

.reg-done__act p { font-size: 16px; margin: 0 0 12px; }
.reg-done__act p:last-child { margin-bottom: 0; }

.reg-done__spam {
    font-size: 14.5px !important;
    color: var(--navy-soft);
    padding-top: 12px;
    border-top: 1px solid var(--rule-soft);
}

.reg-done__h {
    font-size: 26px;
    margin: 0 0 22px;
}

.reg-done__steps {
    list-style: none;
    counter-reset: rdstep;
    margin: 0 0 48px;
    padding: 0;
    display: grid;
    gap: 24px;
}

.reg-done__steps li {
    counter-increment: rdstep;
    position: relative;
    padding-left: 56px;
}

.reg-done__steps li::before {
    content: counter(rdstep);
    position: absolute;
    left: 0;
    top: 0;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    font-family: var(--display);
    font-size: 17px;
    font-weight: 600;
}

.reg-done__steps h3 {
    font-size: 18.5px;
    margin: 6px 0 6px;
}

.reg-done__steps p {
    margin: 0;
    color: var(--navy-soft);
    font-size: 15.5px;
}

.reg-done__prep {
    background: var(--cream-2);
    border-radius: var(--r);
    padding: 32px 32px 26px;
    margin: 0 0 46px;
}

.reg-done__prep h2 { font-size: 24px; margin: 0 0 18px; }

.reg-done__links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 26px;
    margin: 20px 0 0;
}

.reg-done__help {
    text-align: center;
    border-top: 1px solid var(--rule);
    padding-top: 40px;
}

.reg-done__help h2 { font-size: 24px; margin: 0 0 10px; }

.reg-done__help p {
    color: var(--navy-soft);
    max-width: 34rem;
    margin: 0 auto 22px;
}

.reg-done__tel span {
    display: block;
    font-size: 14px;
    color: var(--navy-soft);
    margin-top: 14px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 760px) {

    .reg-intro { padding-top: 40px; }

    .reg-step { padding: 28px 20px 26px; }

    .fld-row,
    .fld-row--3 { grid-template-columns: 1fr; }

    .kits { grid-template-columns: 1fr; }

    .reg-prog__lbl { font-size: 11px; letter-spacing: 0; }

    .reg-prog__dot { width: 30px; height: 30px; font-size: 13.5px; }

    .reg-nav {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .reg-nav .btn { width: 100%; }

    .reg-nav > span { display: none; }

    .reg-done__prep { padding: 24px 20px 20px; }

    .reg-done__act { padding: 22px 20px; }
}

@media (max-width: 420px) {
    .reg-prog__lbl { display: none; }
}

/* ==========================================================================
   Motion / print
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .reg-prog__fill,
    .kit,
    .fld__in { transition: none; }

    .fld.is-checking::after { animation-duration: 2s; }
}

@media print {
    .reg-prog, .reg-nav, .reg-help { display: none; }
    .reg-step[hidden] { display: block !important; }
    .reg-form { box-shadow: none; border: 1px solid #999; }
}
