/* ═══════════════════════════════════════════════════════════════════════════
   Salon CMS — Booking wizard
   Loaded *after* site.css and inherits its tokens, so the wizard themes with
   the rest of the site. Only the step-specific layout lives here.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Shell ─────────────────────────────────────────────────────────────── */

.booking-body {background-image: var(--paper) }

.booking-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: color-mix(in srgb, var(--paper) 92%, transparent);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--line);
}
.booking-bar__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.booking-bar__actions { display: flex; align-items: center; gap: .7rem; }

.booking-exit {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ink-subtle);
}
.booking-exit:hover { color: var(--ink); }

.booking-main { max-width: 1100px; margin: 0 auto; padding: clamp(2rem, 5vw, 3.5rem) var(--gutter) 5rem; }

.booking-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: clamp(2rem, 4vw, 3.5rem);
    align-items: start;
}

/* ─── Step indicator ────────────────────────────────────────────────────── */

.stepper {
    display: flex;
    align-items: flex-start;
    margin-bottom: clamp(2rem, 4vw, 3rem);
    counter-reset: step;
}

.stepper__item {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .6rem;
    text-align: center;
    color: var(--ink-subtle);
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding-top: .2rem;
}

/* Connector line sits behind the dots. */
.stepper__item::before {
    content: "";
    position: absolute;
    top: 15px;
    right: 50%;
    width: 100%;
    height: 2px;
    background: var(--line-strong);
    z-index: 0;
}
.stepper__item:first-child::before { display: none; }
.stepper__item.is-done::before,
.stepper__item.is-active::before { background: var(--gold); }

.stepper__dot {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--paper-warm);
    border: 2px solid var(--line-strong);
    color: var(--ink-subtle);
    font-family: var(--sans);
    font-size: .8rem;
    font-weight: 700;
    transition: background var(--t) var(--ease), border-color var(--t) var(--ease), color var(--t) var(--ease);
}
.stepper__dot svg { width: 15px; height: 15px; }

.stepper__item.is-done .stepper__dot { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.stepper__item.is-active .stepper__dot { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.stepper__item.is-active { color: var(--ink); }

/* Completed steps are links back; upcoming ones are inert spans. */
a.stepper__item:hover .stepper__dot { transform: scale(1.08); }
a.stepper__item:hover { color: var(--ink); }

.stepper__label { display: block; }

/* ─── Panel ─────────────────────────────────────────────────────────────── */

.booking-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    box-shadow: var(--shadow-sm);
}

.booking-panel__eyebrow {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--gold-deep);
    margin-bottom: .8rem;
}
.booking-panel h1 {
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    line-height: 1.15;
    margin-bottom: .7rem;
}
.booking-panel__lede { color: var(--ink-subtle); font-size: .96rem; margin-bottom: 2rem; }

/* ─── Option cards (service / employee) ─────────────────────────────────── */

.option-group + .option-group { margin-top: 2rem; }
.option-group__title {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ink-subtle);
    padding-bottom: .7rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

.option-list { display: flex; flex-direction: column; gap: .7rem; }

.option {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 1.05rem 1.2rem;
    text-align: left;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-md);
    color: var(--ink);
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition: border-color var(--t) var(--ease), background var(--t) var(--ease),
                transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.option:hover {
    border-color: var(--gold);
    background: var(--gold-soft);
    transform: translateX(3px);
    box-shadow: var(--shadow-sm);
}
.option:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.option.is-selected { border-color: var(--ink); background: var(--gold-soft); }

.option__body { flex: 1; min-width: 0; }
.option__title { font-weight: 600; letter-spacing: -.01em; display: block; }
.option__meta { display: block; font-size: .85rem; color: var(--ink-subtle); margin-top: .2rem; }

.option__price {
    font-family: var(--serif);
    font-size: 1.3rem;
    color: var(--ink);
    white-space: nowrap;
}
.option__price small {
    font-family: var(--sans);
    font-size: .62rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink-subtle);
}

.option__avatar {
    width: 52px; height: 52px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--surface-2);
}
.option__avatar--empty {
    display: grid; place-items: center;
    background: var(--gold-soft);
    color: var(--gold-deep);
    font-family: var(--serif);
    font-size: 1.15rem;
}

.option__arrow { flex-shrink: 0; color: var(--ink-subtle); transition: transform var(--t) var(--ease), color var(--t) var(--ease); }
.option__arrow svg { width: 17px; height: 17px; display: block; }
.option:hover .option__arrow { transform: translateX(4px); color: var(--gold-deep); }

/* ─── Date picker ───────────────────────────────────────────────────────── */

.day-strip {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
    gap: .6rem;
    margin-bottom: 1.75rem;
}

.day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .15rem;
    padding: .8rem .3rem;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-md);
    color: var(--ink);
    font-family: inherit;
    cursor: pointer;
    transition: border-color var(--t) var(--ease), background var(--t) var(--ease), transform var(--t) var(--ease);
}
.day:hover { border-color: var(--gold); background: var(--gold-soft); transform: translateY(-2px); }
.day.is-selected { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.day.is-selected .day__weekday, .day.is-selected .day__month { color: rgba(255,255,255,.7); }

.day__weekday { font-size: .66rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-subtle); }
.day__num { font-family: var(--serif); font-size: 1.45rem; line-height: 1.1; }
.day__month { font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-subtle); }
.day__badge { font-size: .6rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-deep); }
.day.is-selected .day__badge { color: var(--gold-light); }

/* "Some other date" — a composed block, not a bare form row, so it reads as
   a deliberate secondary path next to the quick-pick day cards. */
.date-more {
    display: flex;
    align-items: flex-start;
    gap: 1.15rem;
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
}

.date-more__icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--gold-soft);
    border: 1px solid color-mix(in srgb, var(--gold) 28%, transparent);
    color: var(--gold-deep);
}
.date-more__icon svg { width: 19px; height: 19px; }

.date-more__body { flex: 1; min-width: 0; }

.date-more__title {
    font-size: .96rem;
    font-weight: 600;
    letter-spacing: -.01em;
    color: var(--ink);
}
.date-more__hint {
    margin: .3rem 0 0;
    font-size: .85rem;
    color: var(--ink-subtle);
}

.date-more__controls {
    display: flex;
    align-items: center;
    gap: .7rem;
    flex-wrap: wrap;
    margin-top: 1.1rem;
}

/* Override the site's underline-only field style — inside this block a
   proper boxed control sits better next to the button. */
.date-more input[type="date"] {
    flex: 1;
    min-width: 170px;
    width: auto;
    padding: .72rem .9rem;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-md);
    font-family: var(--sans);
    font-size: .95rem;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
    cursor: pointer;
    transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.date-more input[type="date"]:hover { border-color: var(--gold); }
.date-more input[type="date"]:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-ring);
}
.date-more input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: .55;
    transition: opacity var(--t) var(--ease);
}
.date-more input[type="date"]:hover::-webkit-calendar-picker-indicator { opacity: 1; }
:root[data-theme="dark"] .date-more input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(1); }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .date-more input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(1); }
}

.date-more .btn { flex-shrink: 0; }

/* ─── Time slots ────────────────────────────────────────────────────────── */

.slot-group + .slot-group { margin-top: 1.75rem; }
.slot-group__title {
    display: flex; align-items: center; gap: .6rem;
    font-size: .68rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
    color: var(--ink-subtle);
    margin-bottom: .9rem;
}
.slot-group__title svg { width: 15px; height: 15px; color: var(--gold-deep); }

.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: .55rem; }

.slot {
    padding: .8rem .4rem;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-md);
    color: var(--ink);
    font-family: var(--sans);
    font-size: .95rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: border-color var(--t) var(--ease), background var(--t) var(--ease), transform var(--t) var(--ease);
}
.slot:hover { border-color: var(--gold); background: var(--gold-soft); transform: translateY(-2px); }
.slot:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ─── Summary sidebar ───────────────────────────────────────────────────── */

.summary {
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.summary__head {
    padding: 1.1rem 1.35rem;
    background: var(--ink);
    color: var(--paper);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
}
.summary__body { padding: 1.35rem; }

.summary__row { display: flex; align-items: baseline; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.summary__row:last-of-type { border-bottom: 0; }
.summary__label { flex-shrink: 0; width: 84px; font-size: .66rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-subtle); }
.summary__value { flex: 1; font-size: .93rem; color: var(--ink); font-weight: 500; }
.summary__value--muted { color: var(--ink-subtle); font-weight: 400; font-style: italic; }

.summary__total {
    display: flex; align-items: baseline; justify-content: space-between;
    margin-top: 1.1rem; padding-top: 1.1rem;
    border-top: 2px solid var(--ink);
}
.summary__total-label { font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-subtle); }
.summary__total-value { font-family: var(--serif); font-size: 1.65rem; color: var(--ink); }

.summary__note {
    margin-top: 1.1rem;
    padding: .8rem 1rem;
    background: var(--surface-2);
    border-radius: var(--r-md);
    font-size: .8rem;
    line-height: 1.6;
    color: var(--ink-subtle);
}

/* ─── Navigation / misc ─────────────────────────────────────────────────── */

.booking-nav { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; padding-top: 1.75rem; border-top: 1px solid var(--line); }
.booking-nav--end { justify-content: flex-end; }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ink-subtle);
}
.back-link svg { width: 15px; height: 15px; transition: transform var(--t) var(--ease); }
.back-link:hover { color: var(--ink); }
.back-link:hover svg { transform: translateX(-3px); }

.booking-empty {
    text-align: center;
    padding: 2.5rem 1.5rem;
    color: var(--ink-subtle);
    border: 1px dashed var(--line-strong);
    border-radius: var(--r-md);
}
.booking-empty svg { width: 38px; height: 38px; margin: 0 auto 1rem; color: var(--gold-deep); opacity: .5; }

.honeypot-field { position: absolute; left: -9999px; opacity: 0; height: 0; }

/* ─── Success ───────────────────────────────────────────────────────────── */

.booking-success { text-align: center; padding: clamp(1rem, 3vw, 2rem) 0; }
.booking-success__check {
    display: grid; place-items: center;
    width: 76px; height: 76px;
    margin: 0 auto 1.75rem;
    border-radius: 50%;
    background: var(--positive-bg);
    color: var(--positive);
    animation: pop .5s var(--ease) both;
}
.booking-success__check svg { width: 34px; height: 34px; }
.booking-success h1 { margin-bottom: .8rem; }
.booking-success__lede { color: var(--ink-subtle); max-width: 46ch; margin: 0 auto 2rem; }

.booking-ref {
    display: inline-flex; align-items: center; gap: .6rem;
    padding: .65rem 1.2rem;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--r-full);
    font-size: .82rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink-subtle);
    margin-bottom: 2.25rem;
}
.booking-ref strong { color: var(--ink); font-family: var(--serif); font-size: 1.05rem; letter-spacing: 0; text-transform: none; }

@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ─── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
    .booking-layout { grid-template-columns: 1fr; }

    /* On mobile the summary belongs above the choices, collapsed by default. */
    .summary { position: static; order: -1; }
    .summary__body { padding: 1rem 1.2rem; }

    .stepper__label { display: none; }
    .stepper__item::before { top: 15px; }
}

@media (max-width: 560px) {
    .booking-bar__inner { padding: .8rem var(--gutter); }
    .booking-panel { padding: 1.35rem 1.1rem; }
    .option { padding: .9rem 1rem; gap: .8rem; }
    .option__price { font-size: 1.15rem; }
    .day-strip { grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: .45rem; }
    .slot-grid { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }

    /* Stack the icon above the text so the date field keeps full width. */
    .date-more { flex-direction: column; gap: 1rem; padding: 1.25rem; }
    .date-more__controls { flex-direction: column; align-items: stretch; }
    .date-more input[type="date"] { width: 100%; }
    .date-more .btn { width: 100%; }
    .booking-nav { flex-direction: column-reverse; align-items: stretch; }
    .booking-nav .btn { width: 100%; }
    .booking-nav .back-link { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    .option:hover, .day:hover, .slot:hover { transform: none; }
    .booking-success__check { animation: none; }
}
