/* ==========================================================================
   FitBox International — public booking pages (/book, /book/callback) — Phase 4b
   Loaded after style.css + page.css. Colours only through tokens (tests/contrast.php checks every pair).
   Inputs ≥ 16px (no zoom on iOS), tap targets ≥ 44px, visible focus, works without JS.
   ========================================================================== */

.book-hero__title { font-size: clamp(2rem, 1.2rem + 3.2vw, 3.75rem); }

.book-wrap { max-width: 46rem; }

.book-h2 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: var(--fs-h3);
    line-height: 1.2;
    color: var(--ink);
    margin-bottom: var(--s-4);
}

.book-pick,
.book-form,
.book-done {
    padding: clamp(1.375rem, 4vw, 2.25rem);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
}

.book-form,
.book-alt { margin-top: var(--s-6); }

.book-fieldset {
    margin: 0 0 var(--s-5);
    padding: 0;
    border: 0;
    min-width: 0;
}

.book-legend,
.book-label {
    display: block;
    margin-bottom: var(--s-2);
    font-weight: 600;
    color: var(--ink);
}

.book-legend { padding: 0; font-size: 1.0625rem; }

.book-req,
.book-opt {
    font-weight: 400;
    font-size: var(--fs-sm);
    color: var(--text-muted);
}

.book-hint {
    margin-bottom: var(--s-2);
    font-size: var(--fs-sm);
    color: var(--text-muted);
}

/* Option cards (location, coach) and time chips: real radios, visible focus, 44px+ targets. */
.book-options,
.book-times {
    display: grid;
    gap: var(--s-2);
}

/* 16rem keeps 4 location cards in two even rows on tablets instead of 3 + 1. */
.book-options { grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.book-times { grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr)); }

.book-option,
.book-time { position: relative; }

.book-option__input {
    /* The real radio covers its card (invisible), so it is the tap target and keeps native keyboard behaviour. */
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    font-size: 1rem;
    cursor: pointer;
}

.book-option__label,
.book-time__label {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 3.25rem;
    padding: var(--s-2) var(--s-4);
    border: 1.5px solid var(--field-border);
    border-radius: var(--r-md);
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
    transition: border-color var(--dur-fast) ease, background-color var(--dur-fast) ease;
}

.book-option__input:hover + .book-option__label,
.book-option__input:hover + .book-time__label {
    border-color: var(--ink);
    background: var(--mist);
}

.book-time__label {
    align-items: center;
    font-family: var(--font-mono);
    font-weight: 500;
}

.book-option__label { height: 100%; }
.book-option__name { font-weight: 600; }
.book-option__sub { font-size: var(--fs-sm); color: var(--text-muted); }

.book-option__input:checked + .book-option__label,
.book-option__input:checked + .book-time__label {
    border-color: var(--teal-dark);
    border-width: 2px;
    background: var(--mist);
    box-shadow: inset 0 0 0 1px var(--teal-dark);
}

.book-option__input:focus-visible + .book-option__label,
.book-option__input:focus-visible + .book-time__label {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.book-day {
    margin: 0 0 var(--s-4);
    padding: 0;
    border: 0;
    min-width: 0;
}

.book-day__legend {
    padding: 0;
    margin-bottom: var(--s-2);
    font-family: var(--font-mono);
    font-size: var(--fs-sm);
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

/* Text fields */
.book-field { margin-bottom: var(--s-4); }

.book-input {
    display: block;
    width: 100%;
    min-height: 3rem;
    padding: 0.625rem 0.875rem;
    border: 1.5px solid var(--field-border);
    border-radius: var(--r-input);
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-size: 1rem;
    line-height: 1.5;
}

.book-input:hover { border-color: var(--ink); }
.book-input:focus-visible { border-color: var(--teal); outline: 3px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 4px var(--focus-ring); }

textarea.book-input { resize: vertical; }

.book-check {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--s-1) var(--s-3);
    align-items: start;
}

.book-check .book-inline-error { grid-column: 1 / -1; }

.book-check__input {
    width: var(--tap);
    height: var(--tap);
    margin: 0;
    font-size: 1rem;
    accent-color: var(--teal-dark);
}

.book-check__label { align-self: center; color: var(--ink); }
.book-check .book-hint { grid-column: 2; }

/* Errors */
.book-field--error { padding-left: var(--s-3); border-left: 4px solid var(--danger); border-radius: 2px; }
.book-field--error .book-input { border-color: var(--danger); border-width: 2px; }

.book-inline-error {
    margin-bottom: var(--s-2);
    font-weight: 600;
    color: var(--danger);
}

.book-errors {
    margin-bottom: var(--s-6);
    padding: var(--s-4) var(--s-5);
    border: 2px solid var(--danger);
    border-radius: var(--r-md);
    background: var(--danger-bg);
    color: var(--ink);
}

.book-errors:focus-visible { outline: 3px solid var(--danger); outline-offset: 2px; }
.book-errors__title { font-size: 1.0625rem; font-weight: 700; margin-bottom: var(--s-2); color: var(--ink); }
.book-errors__list { display: grid; gap: 0; }
.book-errors__list a { display: inline-flex; align-items: center; min-height: var(--tap); color: var(--danger); font-weight: 600; }

/* Notices */
.book-notice {
    margin-bottom: var(--s-5);
    padding: var(--s-3) var(--s-4);
    border-left: 4px solid var(--notice-ink);
    border-radius: var(--r-md);
    background: var(--notice-bg);
    color: var(--notice-ink);
}

.book-notice strong { color: var(--notice-ink); }

.book-empty,
.book-alt { color: var(--text); }
.book-empty a,
.book-alt a {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap);
    color: var(--teal-dark);
    font-weight: 600;
}

/* Honeypot: off-screen for people, still in the form for bots. */
.book-hp {
    position: absolute !important;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.book-hp input { min-height: var(--tap); min-width: var(--tap); font-size: 1rem; }

/* Confirmation */
.book-ref {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: clamp(1.5rem, 1rem + 2vw, 2.25rem);
    letter-spacing: 0.06em;
    color: var(--ink);
    margin-bottom: var(--s-4);
    overflow-wrap: anywhere;
}

.book-summary {
    display: grid;
    gap: var(--s-2);
    margin: var(--s-5) 0;
}

.book-summary__row { display: grid; grid-template-columns: minmax(6rem, 10rem) 1fr; gap: var(--s-3); }
.book-summary dt { font-weight: 600; color: var(--ink); }
.book-summary dd { color: var(--text); }

.book-submit { margin-top: var(--s-5); }

/* Phase 4c: online locations ("Online session") */
.book-h2__sub { font-family: var(--font-body); font-weight: 500; font-size: var(--fs-sm); color: var(--text-muted); white-space: nowrap; }
.book-online-note { margin-top: var(--s-4); color: var(--ink); }
