/* McGuire's booking - self-contained stylesheet (no Tailwind CDN). */

:root {
    --gold: #c99f4f;
    --gold-bright: #e0bd76;
    --gold-dark: #a8823a;
    --ink: #0d1117;
    --panel: #171c24;
    --panel-2: #1f2630;
    --line: #2c3542;
    --text: #e8eaed;
    --muted: #9aa4b2;
    --danger: #ef6b6b;
    --ok: #55b98a;
    --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    padding: 2.5rem 1rem 3rem;
    min-height: 100vh;
    background: radial-gradient(ellipse at top, #1b2330 0%, var(--ink) 55%);
    color: var(--text);
    font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.55;
}

#snow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }

.shell { position: relative; z-index: 1; width: 100%; max-width: 640px; margin: 0 auto; }

/* --- masthead --------------------------------------------------------- */

.masthead { text-align: center; margin-bottom: 1.75rem; }
.logo { width: min(230px, 62vw); height: auto; margin-bottom: 1rem; }

.masthead h1 {
    font-family: 'Roboto', sans-serif;
    font-size: clamp(1.5rem, 5vw, 2.1rem);
    font-weight: 700;
    color: var(--gold);
    margin: 0 0 .25rem;
    letter-spacing: .01em;
}

.subtitle { margin: 0; color: var(--muted); font-size: .95rem; }

.test-banner {
    display: inline-block;
    margin-top: .85rem;
    padding: .35rem .8rem;
    border: 1px solid var(--gold);
    border-radius: 999px;
    font-size: .78rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--gold);
}

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

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(1.25rem, 4vw, 2rem);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
}

.sold-out { text-align: center; }
.sold-out h2 { color: var(--gold); margin-top: 0; }
.sold-out a { color: var(--gold); }

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

.progress { margin-bottom: 1.5rem; }

.progress-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: .55rem;
    font-size: .82rem;
}

.progress-step { color: var(--muted); letter-spacing: .05em; text-transform: uppercase; }
.progress-name { color: var(--gold); font-weight: 600; }

.progress-track { height: 5px; background: var(--panel-2); border-radius: 999px; overflow: hidden; }

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold-bright));
    border-radius: 999px;
    transition: width .4s cubic-bezier(.4, 0, .2, 1);
}

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

fieldset.step { border: 0; margin: 0; padding: 0; }

legend {
    font-family: 'Roboto', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    padding: 0;
    margin-bottom: 1rem;
}

label { display: block; margin-bottom: 1rem; font-size: .9rem; color: var(--muted); font-weight: 500; }
label small { font-weight: 400; opacity: .8; }

input[type="text"], input[type="email"], input[type="tel"], input[type="number"] {
    display: block;
    width: 100%;
    margin-top: .4rem;
    padding: .7rem .8rem;
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--text);
    font: inherit;
    font-size: 1rem;     /* 16px stops iOS zooming on focus */
    transition: border-color .15s, box-shadow .15s;
}

input:focus-visible {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 159, 79, .25);
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.hint { margin: .35rem 0 0; font-size: .84rem; color: var(--muted); line-height: 1.5; }
.hint strong { color: var(--gold); }

/* --- sittings --------------------------------------------------------- */

.sittings { display: grid; gap: .7rem; }

.sitting {
    display: flex;
    align-items: center;
    gap: .85rem;
    margin: 0;
    padding: .9rem 1rem;
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 11px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

.sitting:hover:not(.is-full) { border-color: var(--gold-dark); }
.sitting input { accent-color: var(--gold); width: 18px; height: 18px; margin: 0; flex: none; }
.sitting:has(input:checked) { border-color: var(--gold); background: rgba(201, 159, 79, .09); }
.sitting.is-full { opacity: .45; cursor: not-allowed; }

.sitting-body { display: flex; flex-direction: column; flex: 1 1 auto; }
.sitting-time { color: var(--text); font-weight: 600; font-size: 1rem; }
.sitting-label { color: var(--muted); font-size: .8rem; }
.sitting-note { color: var(--muted); font-size: .78rem; text-align: right; flex: none; }
.sitting:has(input:checked) .sitting-note { color: var(--gold); }

/* --- menu courses ----------------------------------------------------- */

#menuCourses { margin-top: 1.35rem; }
.course { margin-bottom: 1.4rem; }

.course-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-bottom: .5rem;
    margin-bottom: .6rem;
    border-bottom: 1px solid var(--line);
}

.course-head h3 {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--gold);
}

.course-tally {
    font-size: .8rem;
    font-variant-numeric: tabular-nums;
    color: var(--muted);
    padding: .15rem .5rem;
    border-radius: 999px;
    background: var(--panel-2);
}

.course-tally.is-ok { color: var(--ok); }
.course-tally.is-over { color: var(--danger); }

.choice {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: .55rem;
    color: var(--text);
    font-size: .9rem;
    font-weight: 400;
}

.choice-name { flex: 1 1 auto; min-width: 0; }

/* Needs to out-specify the generic input[type="number"] rule above, which
   otherwise stretches the box to 100% and crushes the dish name. */
input[type="number"].choice-qty {
    flex: 0 0 5.25rem;
    width: 5.25rem;
    margin-top: 0;
    padding: .5rem;
    text-align: center;
}

/* --- summary ---------------------------------------------------------- */

.summary { display: grid; grid-template-columns: minmax(6.5rem, auto) 1fr; gap: .5rem 1rem; margin: 0 0 1.25rem; }
.summary dt { color: var(--muted); font-size: .84rem; }
.summary dd { margin: 0; color: var(--text); font-size: .9rem; }

.deposit {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .9rem 1rem;
    background: var(--panel-2);
    border: 1px solid var(--gold-dark);
    border-radius: 11px;
}

.deposit span { color: var(--muted); font-size: .88rem; }
.deposit strong { color: var(--gold); font-size: 1.4rem; font-family: 'Roboto', sans-serif; }

.check { display: flex; align-items: flex-start; gap: .65rem; margin: 1.1rem 0; color: var(--muted); font-size: .86rem; }
.check input { width: 18px; height: 18px; margin: .15rem 0 0; accent-color: var(--gold); flex: none; }

.linkish {
    background: none;
    border: 0;
    padding: 0;
    color: var(--gold);
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

/* --- buttons ---------------------------------------------------------- */

.btn {
    padding: .75rem 1.5rem;
    border: 1px solid transparent;
    border-radius: 10px;
    font: inherit;
    font-weight: 600;
    font-size: .95rem;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s, opacity .15s;
}

.btn:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
.btn-primary { background: var(--gold); color: #1a1205; }
.btn-primary:hover:not(:disabled) { background: var(--gold-bright); }
.btn-primary:disabled { opacity: .6; cursor: progress; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--muted); }
.btn-ghost:hover { border-color: var(--muted); color: var(--text); }
.btn-outline { background: transparent; border-color: var(--gold-dark); color: var(--gold); }
.btn-outline:hover { background: rgba(201, 159, 79, .12); }
.btn-block { display: block; width: 100%; padding: .9rem; font-size: 1.02rem; }

.nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; }
.nav .btn-primary { margin-left: auto; }

.actions { display: flex; justify-content: center; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

/* --- error ------------------------------------------------------------ */

.error {
    margin-bottom: 1.1rem;
    padding: .8rem 1rem;
    background: rgba(239, 107, 107, .12);
    border: 1px solid rgba(239, 107, 107, .4);
    border-radius: 10px;
    color: #ffb3b3;
    font-size: .88rem;
}

/* --- dialogs ---------------------------------------------------------- */

.dialog {
    width: min(640px, calc(100vw - 2rem));
    max-height: min(86vh, 900px);
    padding: 0;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--text);
    overflow: hidden;
}

.dialog::backdrop { background: rgba(0, 0, 0, .72); backdrop-filter: blur(2px); }

.dialog-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.3rem;
    border-bottom: 1px solid var(--line);
}

.dialog-head h2 { margin: 0; font-family: 'Roboto', sans-serif; font-size: 1.15rem; color: var(--gold); }

.dialog-close {
    background: none;
    border: 0;
    color: var(--muted);
    font-size: 1.7rem;
    line-height: 1;
    padding: 0 .25rem;
    cursor: pointer;
}

.dialog-close:hover { color: var(--text); }

.dialog-body { padding: 1.3rem; overflow-y: auto; max-height: calc(86vh - 66px); }
.dialog-body h3 {
    margin: 1.3rem 0 .5rem;
    font-family: 'Roboto', sans-serif;
    font-size: .8rem;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--gold);
}

.menu-flourish {
    margin: 0;
    padding: .75rem 1rem;
    background: rgba(201, 159, 79, .1);
    border-radius: 10px;
    text-align: center;
    color: var(--gold-bright);
    font-size: .9rem;
}

.menu-list { margin: 0; padding-left: 1.1rem; color: var(--text); font-size: .92rem; }
.menu-list li { margin-bottom: .3rem; }
.menu-note { color: var(--muted); font-size: .85rem; font-style: italic; }
.menu-price { margin-top: 1.2rem; text-align: center; color: var(--gold); font-weight: 600; }
.menu-image { display: block; width: 100%; height: auto; margin-top: 1.2rem; border-radius: 10px; }

.terms p, .terms li { color: var(--muted); font-size: .88rem; }
.terms ul { padding-left: 1.1rem; }

/* --- footer ----------------------------------------------------------- */

.footnote { margin-top: 2rem; text-align: center; color: var(--muted); font-size: .84rem; }
.footnote a { color: var(--gold); }

/* --- small screens ---------------------------------------------------- */

@media (max-width: 460px) {
    body { padding: 1.5rem .75rem 2rem; }
    .grid-2 { grid-template-columns: 1fr; gap: 0; }
    .nav { flex-direction: column-reverse; }
    .nav .btn { width: 100%; margin-left: 0; }
    .actions .btn { flex: 1 1 100%; }
    .summary { grid-template-columns: 1fr; gap: .15rem; }
    .summary dd { margin-bottom: .6rem; }
    .sitting { flex-wrap: wrap; }
    .choice { gap: .75rem; }
    input[type="number"].choice-qty { flex: 0 0 4.5rem; width: 4.5rem; }
    .sitting-note { width: 100%; text-align: left; padding-left: 2.6rem; }
}

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