/* ==================================================================
   Fun-Fair Parent Volunteer Portal – parent-facing styles
   Palette: school navy, festive red, star gold, evergreen on warm cream
   ================================================================== */
:root {
    --ff-navy: #590059;
    --ff-navy-2: #7a1f7a;
    --ff-red: #c8102e;
    --ff-gold: #f5c451;
    --ff-gold-dk: #b7860f;
    --ff-green: #1f7a4d;
    --ff-cream: #faf7f2;
    --ff-ink: #1e293b;
    --ff-muted: #64748b;
    --ff-line: #e7e1d6;
    --ff-card: #ffffff;
    --ff-radius: 18px;
    --ff-shadow: 0 1px 2px rgba(89, 0, 89, .06), 0 8px 24px rgba(89, 0, 89, .07);
    --ff-shadow-hover: 0 2px 4px rgba(89, 0, 89, .08), 0 14px 34px rgba(89, 0, 89, .13);
    --bs-body-font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --bs-body-color: var(--ff-ink);
    --bs-link-color-rgb: 122, 31, 122;
    --bs-border-radius: .65rem;
    --bs-success-rgb: 31, 122, 77;
    --bs-danger-rgb: 200, 16, 46;
}

body.ff-body { background: var(--ff-cream); min-height: 100vh; display: flex; flex-direction: column; }
.ff-main { flex: 1; padding: 28px 0 56px; }
h1, h2, h3, .ff-display { font-family: "Fraunces", Georgia, serif; letter-spacing: -.01em; color: var(--ff-navy); }
.ff-skip { position: absolute; left: 12px; top: 8px; z-index: 2000; background: #fff; padding: 6px 10px; border-radius: 8px; }
.text-muted { color: var(--ff-muted) !important; }

/* ---------- top bar ---------- */
.ff-topbar { background: var(--ff-navy); position: sticky; top: 0; z-index: 1030; }
.ff-topbar .navbar { padding-top: .6rem; padding-bottom: .6rem; }
.ff-brand-title { font-family: "Fraunces", Georgia, serif; font-weight: 700; font-size: 1.02rem; color: #fff; line-height: 1.1; max-width: 15ch; }
@media (min-width: 992px) { .ff-brand-title { font-size: 1.15rem; max-width: none; } }
.ff-brand-sub { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ff-gold); margin-top: 3px; }
.ff-topbar .nav-link { color: rgba(255,255,255,.8); font-weight: 500; border-radius: 999px; padding: .4rem .85rem !important; }
.ff-topbar .nav-link:hover, .ff-topbar .nav-link.active { color: #fff; background: rgba(255,255,255,.1); }
.ff-bunting { height: 6px; background: repeating-linear-gradient(90deg, var(--ff-red) 0 28px, var(--ff-gold) 28px 56px, var(--ff-green) 56px 84px); }

/* ---------- hero ---------- */
.ff-hero {
    background:
        radial-gradient(circle at 12% 30%, rgba(245,196,81,.18) 0 2px, transparent 3px) 0 0/38px 38px,
        radial-gradient(circle at 85% 0%, rgba(200,16,46,.35), transparent 55%),
        linear-gradient(135deg, var(--ff-navy) 0%, var(--ff-navy-2) 100%);
    color: #fff; padding: 48px 0 56px; overflow: hidden;
}
.ff-eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; color: var(--ff-gold); font-weight: 600; }
.ff-hero-title { color: #fff; font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 700; margin: 0; }
.ff-hero-lead { color: rgba(255,255,255,.82); font-size: 1.08rem; max-width: 560px; margin-top: .75rem; }
.ff-date-chip { display: inline-flex; gap: .45rem; align-items: center; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); color: #fff; padding: .4rem .85rem; border-radius: 999px; font-size: .9rem; font-weight: 500; }

/* ---------- cards ---------- */
.ff-card { background: var(--ff-card); border: 1px solid var(--ff-line); border-radius: var(--ff-radius); box-shadow: var(--ff-shadow); }
.ff-card-pad { padding: 24px; }
@media (min-width: 768px) { .ff-card-pad { padding: 32px; } }
.ff-auth-card { max-width: 480px; margin: 0 auto; position: relative; }
.ff-section-title { font-size: 1.55rem; margin-bottom: .25rem; }
.ff-section-sub { color: var(--ff-muted); margin-bottom: 1.4rem; }

/* ---------- step indicator ---------- */
.ff-steps { list-style: none; display: flex; padding: 0; margin: 0 0 24px; gap: 4px; counter-reset: s; overflow-x: auto; scrollbar-width: none; }
.ff-steps::-webkit-scrollbar { display: none; }
.ff-step { flex: 1 0 auto; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 999px; color: var(--ff-muted); font-size: .85rem; font-weight: 600; white-space: nowrap; }
.ff-step-dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 1.5px solid var(--ff-line); flex: 0 0 auto; }
.ff-step.is-done .ff-step-dot { background: var(--ff-green); border-color: var(--ff-green); color: #fff; }
.ff-step.is-current { background: #fff; color: var(--ff-navy); box-shadow: var(--ff-shadow); }
.ff-step.is-current .ff-step-dot { background: var(--ff-navy); border-color: var(--ff-navy); color: var(--ff-gold); }
@media (max-width: 767.98px) {
    .ff-step:not(.is-current) .ff-step-label { display: none; }
    .ff-step { flex: 0 0 auto; padding: 4px; }
    .ff-step.is-current { padding-right: 14px; }
}

/* ---------- selectable choice cards ---------- */
.ff-choice {
    display: block; width: 100%; text-align: left; position: relative; cursor: pointer;
    background: #fff; border: 1.5px solid var(--ff-line); border-radius: var(--ff-radius); padding: 22px;
    box-shadow: var(--ff-shadow); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; color: inherit;
}
.ff-choice:hover:not([disabled]):not(.is-disabled) { transform: translateY(-2px); box-shadow: var(--ff-shadow-hover); border-color: #cfc6b6; }
.ff-choice:focus-visible { outline: 3px solid rgba(245,196,81,.7); outline-offset: 2px; }
.ff-choice.is-selected { border-color: var(--ff-navy); box-shadow: 0 0 0 3px rgba(89, 0, 89,.12), var(--ff-shadow-hover); }
.ff-choice[disabled], .ff-choice.is-disabled { cursor: not-allowed; opacity: .62; box-shadow: none; }
.ff-choice-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; margin-bottom: 14px; }
.ff-icon-food { background: #fde8ea; color: var(--ff-red); }
.ff-icon-games { background: #e6f0fa; color: var(--ff-navy-2); }
.ff-icon-santa { background: #e5f4ec; color: var(--ff-green); }
.ff-choice-title { font-family: "Fraunces", Georgia, serif; font-weight: 700; font-size: 1.3rem; color: var(--ff-navy); margin: 0; }
.ff-choice-meta { color: var(--ff-muted); font-size: .9rem; }

/* date card */
.ff-date-card { padding: 0; overflow: hidden; }
.ff-date-top { background: linear-gradient(135deg, var(--ff-navy), var(--ff-navy-2)); color: #fff; padding: 18px 22px; display: flex; align-items: center; gap: 16px; }
.ff-date-num { font-family: "Fraunces", serif; font-size: 2.6rem; line-height: 1; font-weight: 700; color: var(--ff-gold); }
.ff-date-day { font-weight: 700; font-size: 1.15rem; }
.ff-date-month { font-size: .85rem; color: rgba(255,255,255,.75); text-transform: uppercase; letter-spacing: .08em; }
.ff-date-body { padding: 16px 22px 20px; }

/* activity cards */
.ff-activity { padding: 18px 18px 16px; height: 100%; display: flex; flex-direction: column; }
.ff-activity .ff-choice-title { font-size: 1.08rem; font-family: "Plus Jakarta Sans", sans-serif; letter-spacing: 0; }
.ff-loc { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; font-weight: 600; color: var(--ff-navy-2); background: #eef3f9; border-radius: 999px; padding: 3px 10px; }
.ff-mini-slots { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.ff-mini-slots li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; font-size: .8rem; align-items: center; }
.ff-mini-slots .progress { grid-column: 1 / -1; height: 5px; }
.ff-search { max-width: 360px; }

/* timing rows */
.ff-slot {
    display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; align-items: center; cursor: pointer;
    border: 1.5px solid var(--ff-line); border-radius: 14px; padding: 16px 18px; background: #fff; transition: border-color .15s, box-shadow .15s;
}
.ff-slot:hover:not(.is-disabled) { border-color: #cfc6b6; box-shadow: var(--ff-shadow); }
.ff-slot.is-selected { border-color: var(--ff-navy); box-shadow: 0 0 0 3px rgba(89, 0, 89,.12); }
.ff-slot.is-disabled { cursor: not-allowed; background: #fbfaf8; }
.ff-slot.is-disabled .ff-slot-time { color: var(--ff-muted); }
.ff-slot input[type=radio] { width: 1.25rem; height: 1.25rem; margin: 0; }
.ff-slot-time { font-weight: 700; font-size: 1.05rem; color: var(--ff-navy); }
.ff-slot-stats { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: .86rem; color: var(--ff-muted); }
.ff-slot-stats strong { color: var(--ff-ink); }
.ff-slot .progress { height: 8px; border-radius: 999px; background: #efeae1; }
.ff-slot-note { grid-column: 2; font-size: .82rem; color: var(--ff-red); }
.progress-bar.bg-available { background: var(--ff-green); }
.progress-bar.bg-almost_full { background: #e89b0c; }
.progress-bar.bg-full, .progress-bar.bg-closed { background: #9aa4b2; }

.ff-status { display: inline-flex; align-items: center; gap: 5px; font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }
.ff-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ff-status-available { background: #e3f3ea; color: var(--ff-green); }
.ff-status-almost_full { background: #fdf1d8; color: #a26a00; }
.ff-status-full { background: #fde4e7; color: var(--ff-red); }
.ff-status-closed { background: #eef0f3; color: #5b6574; }
.ff-live { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--ff-muted); white-space: nowrap; }
.ff-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ff-green); box-shadow: 0 0 0 0 rgba(31,122,77,.5); animation: ffpulse 2s infinite; }
@keyframes ffpulse { 0% { box-shadow: 0 0 0 0 rgba(31,122,77,.45); } 70% { box-shadow: 0 0 0 8px rgba(31,122,77,0); } 100% { box-shadow: 0 0 0 0 rgba(31,122,77,0); } }
.ff-flash-update { animation: ffflash 1.2s ease; }
@keyframes ffflash { 0% { background: #fff6d6; } 100% { background: transparent; } }

/* logo */
.ff-logo { border-radius: 50%; object-fit: cover; }

/* simple mode: date cards + modern slot cards */
.ff-date-card.is-selected { border-color: var(--ff-navy); box-shadow: 0 0 0 3px rgba(89,0,89,.18), var(--ff-shadow-hover); }
.ff-slots-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.ff-slotcard {
    position: relative; display: flex; gap: 12px; align-items: flex-start; cursor: pointer;
    background: #fff; border: 1.5px solid var(--ff-line); border-radius: 14px; padding: 16px 16px 14px;
    box-shadow: var(--ff-shadow); transition: border-color .15s, box-shadow .15s, transform .12s;
}
.ff-slotcard:hover:not(.is-disabled) { border-color: #cfc6b6; transform: translateY(-1px); box-shadow: var(--ff-shadow-hover); }
.ff-slotcard.is-selected { border-color: var(--ff-navy); box-shadow: 0 0 0 3px rgba(89,0,89,.15); }
.ff-slotcard.is-disabled { cursor: not-allowed; background: #fbfaf8; opacity: .85; }
.ff-slotcard-radio { position: absolute; opacity: 0; pointer-events: none; }
.ff-slotcard-check {
    flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--ff-line);
    display: grid; place-items: center; color: #fff; background: #fff; margin-top: 2px; transition: .15s;
}
.ff-slotcard-check i { font-size: .9rem; opacity: 0; }
.ff-slotcard.is-selected .ff-slotcard-check { background: var(--ff-navy); border-color: var(--ff-navy); }
.ff-slotcard.is-selected .ff-slotcard-check i { opacity: 1; }
.ff-slotcard-body { flex: 1; min-width: 0; display: block; }
.ff-slotcard-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px; margin-bottom: 4px; }
.ff-slotcard-time { font-weight: 700; font-size: 1.02rem; color: var(--ff-navy); }
.ff-slotcard-meta { display: block; font-size: .85rem; color: var(--ff-muted); margin-bottom: 8px; }
.ff-slotcard-meta strong, .ff-slotcard-meta [data-role] { color: var(--ff-ink); font-weight: 600; }
.ff-slotcard .progress { height: 7px; border-radius: 999px; background: #efeae1; display: flex; }
.ff-slotcard .ff-slot-note { display: block; margin-top: 8px; font-size: .8rem; color: var(--ff-red); }
.ff-slotcard.is-current-slot { border-style: dashed; }
.ff-credit-inline { margin-top: 6px; }

/* simple mode: day blocks (legacy radio layout) */
.ff-day-block { overflow: hidden; height: 100%; }
.ff-day-block.is-locked { opacity: .9; }
.ff-day-head { background: linear-gradient(135deg, var(--ff-navy), var(--ff-navy-2)); color: #fff; padding: 16px 22px; display: flex; align-items: center; gap: 16px; }
.ff-day-body { padding: 16px 18px 18px; }
.ff-simple-intro h1 { margin-bottom: .25rem; }

/* wizard footer bar */
.ff-wizard-bar { position: sticky; bottom: 0; z-index: 10; background: rgba(250,247,242,.94); backdrop-filter: blur(6px); border-top: 1px solid var(--ff-line); padding: 12px 0; margin-top: 24px; }

/* summary */
.ff-summary dt { font-weight: 500; color: var(--ff-muted); font-size: .88rem; }
.ff-summary dd { font-weight: 600; margin-bottom: .85rem; word-break: break-word; }
.ff-summary-hl { background: linear-gradient(135deg, #fff9e8, #fff); border: 1px solid #f1e2b4; border-radius: 14px; padding: 18px; }

/* booking ticket */
.ff-ticket { position: relative; overflow: hidden; }
.ff-ticket-head { background: var(--ff-navy); color: #fff; padding: 16px 22px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.ff-ticket-head .ref { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; letter-spacing: .08em; color: var(--ff-gold); font-weight: 700; }
.ff-ticket.is-cancelled .ff-ticket-head { background: #6b7280; }
.ff-ticket-body { padding: 18px 22px; }
.ff-ticket-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.ff-ticket-grid .k { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ff-muted); }
.ff-ticket-grid .v { font-weight: 700; color: var(--ff-ink); }

.ff-success-icon { width: 76px; height: 76px; border-radius: 50%; background: #e3f3ea; color: var(--ff-green); display: grid; place-items: center; font-size: 2.4rem; margin: 0 auto 14px; }

/* OTP */
.ff-otp-input { font-size: 1.8rem; letter-spacing: .6em; text-align: center; font-weight: 700; font-family: ui-monospace, Menlo, Consolas, monospace; padding-left: .6em; }

/* forms & buttons */
.form-label { font-weight: 600; font-size: .92rem; }
.form-control, .form-select { border-color: #d9d2c5; padding: .65rem .85rem; }
.form-control:focus, .form-select:focus { border-color: var(--ff-navy-2); box-shadow: 0 0 0 .2rem rgba(122, 31, 122,.15); }
.btn { font-weight: 600; border-radius: 999px; padding: .6rem 1.25rem; }
.btn-lg { padding: .8rem 1.7rem; }
.btn-ff { background: var(--ff-red); border-color: var(--ff-red); color: #fff; }
.btn-ff:hover, .btn-ff:focus { background: #a50d26; border-color: #a50d26; color: #fff; }
.btn-ff:disabled, .btn-ff.disabled { background: #d77a89; border-color: #d77a89; color: #fff; opacity: .75; }
@media (max-width: 575.98px) { .ff-wizard-bar .btn-lg { padding: .65rem 1.2rem; font-size: 1rem; } }
.btn-navy { background: var(--ff-navy); border-color: var(--ff-navy); color: #fff; }
.btn-navy:hover { background: var(--ff-navy-2); color: #fff; }
.btn-outline-navy { border: 1.5px solid var(--ff-navy); color: var(--ff-navy); }
.btn-outline-navy:hover { background: var(--ff-navy); color: #fff; }
.alert { border-radius: 14px; }

/* how it works */
.ff-how { counter-reset: how; }
.ff-how-item { display: flex; gap: 14px; }
.ff-how-num { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 50%; background: var(--ff-gold); color: var(--ff-navy); display: grid; place-items: center; font-weight: 800; }

.ff-empty { text-align: center; padding: 40px 20px; color: var(--ff-muted); }
.ff-empty i { font-size: 2.4rem; color: #c9bfae; display: block; margin-bottom: 8px; }

.ff-footer { background: var(--ff-navy); color: #fff; padding: 26px 0; font-size: .92rem; }
.ff-footer a { color: var(--ff-gold); }
.ff-credit { margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.12); text-align: center; font-size: .82rem; color: rgba(255,255,255,.65); }
.ff-credit a { font-weight: 600; }

.ff-skeleton { background: linear-gradient(90deg, #f0ebe2 25%, #f8f5ef 37%, #f0ebe2 63%); background-size: 400% 100%; animation: ffsk 1.4s ease infinite; border-radius: var(--ff-radius); min-height: 120px; }
@keyframes ffsk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
