/* ============================================================
   Slot picker.

   Date strip + time grid, replacing a native date input and a
   three-option dropdown. Sized for thumbs: every target is at
   least 44px, and the whole choice is visible without opening
   an OS modal.
   ============================================================ */

/* Scoped on :root so the sticky bar — which lives outside .slotpick — can use it too */
:root { --sp-line: var(--border, #E2E8F0); }

.slotpick-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.slotpick-hint {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--primary, #2563EB);
}

/* ---- Dates ---- */
.slotpick-dates {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 2px 8px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.slotpick-dates::-webkit-scrollbar { height: 4px; }
.slotpick-dates::-webkit-scrollbar-thumb { background: var(--sp-line); border-radius: 99px; }

.slotpick-date {
    flex: 0 0 auto;
    scroll-snap-align: start;
    width: 62px;
    padding: 9px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    border: 1.5px solid var(--sp-line);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s, background .15s, transform .15s;
}
.slotpick-date:hover { border-color: var(--primary, #2563EB); }
.slotpick-date.is-selected {
    border-color: var(--primary, #2563EB);
    background: var(--primary, #2563EB);
    color: #fff;
}
.slotpick-dow {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--text-tertiary, #94A3B8);
    white-space: nowrap;
}
.slotpick-day { font-size: 19px; font-weight: 800; line-height: 1.1; color: var(--text-primary, #0F172A); }
.slotpick-mon { font-size: 10.5px; font-weight: 600; color: var(--text-tertiary, #94A3B8); }
.slotpick-date.is-selected .slotpick-dow,
.slotpick-date.is-selected .slotpick-day,
.slotpick-date.is-selected .slotpick-mon { color: #fff; }

/* ---- Times ---- */
.slotpick-period {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--text-tertiary, #94A3B8);
    margin: 14px 0 8px;
}
.slotpick-times {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.slotpick-time {
    /* 44px keeps every slot a comfortable tap target */
    min-height: 44px;
    padding: 10px 6px;
    border: 1.5px solid var(--sp-line);
    border-radius: 10px;
    background: #fff;
    font: inherit;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary, #0F172A);
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
}
.slotpick-time:hover { border-color: var(--primary, #2563EB); }
.slotpick-time.is-selected {
    border-color: var(--primary, #2563EB);
    background: var(--primary, #2563EB);
    color: #fff;
}
.slotpick-time[disabled] {
    opacity: .4;
    cursor: not-allowed;
    text-decoration: line-through;
}

.slotpick-warning {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 14px 0 0;
    padding: 9px 12px;
    border-radius: 10px;
    background: var(--danger-light, #FEE2E2);
    color: #B91C1C;
    font-size: 13px;
    font-weight: 600;
}
.slotpick-warning[hidden] { display: none; }

.slotpick-note {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin: 16px 0 0;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--text-tertiary, #94A3B8);
}
.slotpick-note svg { flex-shrink: 0; margin-top: 1px; }

@media (max-width: 520px) {
    .slotpick-times { grid-template-columns: repeat(3, 1fr); }
    .slotpick-time { font-size: 13px; }
}

/* ============================================================
   Sticky booking bar — keeps the price and the next action in
   reach on a phone instead of at the bottom of a long form.
   ============================================================ */
.book-bar { display: none; }

@media (max-width: 900px) {
    .book-bar {
        position: fixed;
        left: 0; right: 0; bottom: 0;
        z-index: 120;
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
        background: #fff;
        border-top: 1px solid var(--sp-line);
        box-shadow: 0 -6px 24px -12px rgb(15 23 42 / .28);
    }
    .book-bar-price { flex: 1; min-width: 0; }
    .book-bar-amount {
        font-size: 20px; font-weight: 800; line-height: 1.1;
        font-variant-numeric: tabular-nums;
        color: var(--text-primary, #0F172A);
    }
    .book-bar-label { font-size: 11.5px; color: var(--text-tertiary, #94A3B8); }
    .book-bar .btn { flex: 0 0 auto; }

    /* Clear the bar and the bottom nav so nothing hides the last field */
    body.has-book-bar { padding-bottom: 148px; }
}
