/* ============================================================
   Overlay Booker — Squire-inspired modern booking UI
   All styles scoped under .overlay-booker
   Black accent theme with clean breadcrumb navigation
   ============================================================ */

/* Container — uses site color scheme via CSS variables from colors_styles.php */
.overlay-booker {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1a1a1a;
    background: #fff;
    min-height: 400px;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    --ob-accent: var(--color1-light, #554E45);
    --ob-accent-text: var(--color1-light-text, #fff);
    --ob-cta: var(--color3, #D4A43D);
    --ob-cta-text: var(--color3-text, black);
    --ob-cta-light: var(--color3-light, #FAF0D7);
    --ob-cta-light-text: var(--color3-light-text, black);
    --ob-warm: var(--color2-light, #c29b79);
    --ob-warm-text: var(--color2-light-text, black);
}

/* ---- Header Bar with Breadcrumbs ---- */
.overlay-booker .ob-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #e5e5e5;
    background: #fff;
    min-height: 52px;
    flex-shrink: 0;
}

.overlay-booker .ob-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    font-size: 13px;
}

.overlay-booker .ob-crumb {
    color: #666;
    font-weight: 500;
    cursor: default;
    padding: 4px 0;
    transition: color 0.15s;
    text-decoration: none;
}
.overlay-booker .ob-crumb.completed {
    color: #666;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.overlay-booker .ob-crumb.completed:hover {
    color: #1a1a1a;
}
.overlay-booker .ob-crumb.active {
    color: var(--ob-accent);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 2px;
}

.overlay-booker .ob-crumb-sep {
    font-size: 9px;
    color: #ccc;
}

.overlay-booker .ob-header-title {
    font-size: 17px;
    font-weight: 600;
    text-align: center;
    flex: 1;
}

.overlay-booker .ob-header-close {
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 20px;
    color: #333;
    transition: background 0.15s;
    flex-shrink: 0;
    margin-left: 12px;
}
.overlay-booker .ob-header-close:hover {
    background: #f0f0f0;
}

/* ---- Scrollable Body ---- */
.overlay-booker .ob-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;   /* the order bar is a sibling below the body, not over it: no extra space at the bottom
                        (80px left dead space under Confirm, operator on 8A, thread booker-layout-2026-11-21) */
}

/* ---- Loading Spinner ---- */
.overlay-booker .ob-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
    color: #666;
    font-size: 15px;
}

/* ---- Staff Cards (Step 1) ---- */
.overlay-booker .ob-staff-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.overlay-booker .ob-staff-card {
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
    background: #fff;
}
.overlay-booker .ob-staff-card:hover {
    border-color: #ccc;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.overlay-booker .ob-staff-card.selected {
    border-color: var(--ob-accent);
    background: var(--ob-accent);
    color: var(--ob-accent-text);
}

.overlay-booker .ob-staff-photo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 10px;
    display: block;
    background: #f0f0f0;
}
.overlay-booker .ob-staff-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    font-size: 24px;
    color: #666;
}
.overlay-booker .ob-staff-card.selected .ob-staff-icon {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.overlay-booker .ob-staff-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}
.overlay-booker .ob-staff-avail {
    font-size: 12px;
    color: #666;
}
.overlay-booker .ob-staff-card.selected .ob-staff-avail {
    color: rgba(255,255,255,0.8);
}

.overlay-booker .ob-check-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--ob-cta);
    color: var(--ob-cta-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: bold;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

/* ---- Category Blocks (Step 2) ---- */
.overlay-booker .ob-section-title {
    font-size: 15px;
    font-weight: 600;
    color: #666;
    margin: 20px 0 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #f0f0f0;
}
.overlay-booker .ob-section-title:first-child {
    margin-top: 0;
}
.overlay-booker .ob-category-block {
    margin-bottom: 20px;
}
.overlay-booker .ob-category-block:last-child {
    margin-bottom: 0;
}
.overlay-booker .ob-selected-block {
    margin-bottom: 24px;
}
.overlay-booker .ob-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--ob-cta-light);
    border-radius: 8px 8px 0 0;
    border-bottom: 2px solid var(--ob-cta);
}
.overlay-booker .ob-category-header-selected {
    background: var(--ob-accent);
    border-bottom-color: var(--ob-warm);
}
.overlay-booker .ob-category-header-selected .ob-category-name {
    color: var(--ob-accent-text);
}
.overlay-booker .ob-category-header-selected .ob-category-count {
    background: var(--ob-cta);
    color: var(--ob-cta-text);
}
.overlay-booker .ob-category-name {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ob-cta-light-text);
}
.overlay-booker .ob-category-count {
    background: var(--ob-accent);
    color: var(--ob-accent-text);
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
    padding: 1px 8px;
    min-width: 22px;
    text-align: center;
}

.overlay-booker .ob-category-expand {
    text-align: center;
    padding: 2px 0 12px;
}
.overlay-booker .ob-category-expand-btn {
    background: none;
    border: none;
    color: var(--ob-cta);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 10px;
}
.overlay-booker .ob-category-expand-btn:hover {
    text-decoration: underline;
}

/* ---- Service Cards Grid (Step 2) ---- */
.overlay-booker .ob-service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 10px 0;
}
.overlay-booker .ob-service-card {
    border: 2px solid #d0d0d0;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
    background: #fafafa;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    height: 118px;
    overflow: hidden;
}
.overlay-booker .ob-service-card:hover {
    border-color: var(--ob-cta);
    background: var(--ob-cta-light);
}
.overlay-booker .ob-service-card.selected {
    border-color: var(--ob-accent);
    background: var(--ob-accent);
    color: var(--ob-accent-text);
}
/* The check badge sits in the top-right corner; the chosen card's top row leaves it room, or it covered the price
   ("$3" for $350 on 8A's Executive Leadership Development, operator's screenshot 2026-11-21). */
.overlay-booker .ob-service-card.selected .ob-service-top { padding-right: 26px; }
.overlay-booker .ob-service-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 6px;
}
.overlay-booker .ob-service-name {
    font-weight: 600;
    font-size: 13px;
    line-height: 1.3;
    flex: 1 1 auto;
    min-width: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.overlay-booker .ob-service-price {
    font-size: 13px;
    font-weight: 700;
    flex: 0 0 33%;
    max-width: 33%;
    text-align: right;
    white-space: normal;
    word-break: break-word;
}
.overlay-booker .ob-service-desc {
    font-size: 10px;
    color: #5e5e5e;   /* #777 read 4.3:1 on the card, 3.7:1 on its hover tint */
    line-height: 1.3;
    margin-top: 3px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.overlay-booker .ob-service-card.selected .ob-service-desc {
    color: rgba(255,255,255,0.6);
}
.overlay-booker .ob-service-duration {
    font-size: 11px;
    color: #666;
    margin-top: 3px;
}
.overlay-booker .ob-service-duration i {
    margin-right: 2px;
    font-size: 10px;
}
.overlay-booker .ob-service-card.selected .ob-service-duration {
    color: rgba(255,255,255,0.7);
}

/* ---- Sticky "View Order" Bar ---- */
.overlay-booker .ob-order-bar {
    flex-shrink: 0;
    background: var(--ob-accent);
    color: var(--ob-accent-text);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    border-radius: 0 0 8px 8px;
    z-index: 10;
    transition: opacity 0.2s;
}
.overlay-booker .ob-order-bar:hover {
    opacity: 0.9;
}
.overlay-booker .ob-order-bar-text {
    font-weight: 600;
    font-size: 15px;
}
.overlay-booker .ob-order-bar-count {
    background: var(--ob-cta);
    color: var(--ob-cta-text);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
}
.overlay-booker .ob-order-bar-price {
    font-weight: 600;
    font-size: 16px;
}

/* ---- Continue Button (Step 1) ---- */
.overlay-booker .ob-continue-btn {
    background: var(--ob-cta);
    color: var(--ob-cta-text);
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}
.overlay-booker .ob-continue-btn:hover {
    opacity: 0.85;
}

/* ---- Staff Summary Card (Step 3) ---- */
.overlay-booker .ob-staff-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    margin-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}
.overlay-booker .ob-staff-summary-photo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: #f0f0f0;
    flex-shrink: 0;
}
.overlay-booker .ob-staff-summary-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #666;
    flex-shrink: 0;
}
.overlay-booker .ob-staff-summary-info {
    flex: 1;
    min-width: 0;
}
.overlay-booker .ob-staff-summary-name {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 2px;
}
.overlay-booker .ob-staff-summary-service {
    font-size: 13px;
    color: #666;
}
.overlay-booker .ob-staff-summary-date {
    font-size: 14px;
    color: #666;
    text-align: right;
    flex-shrink: 0;
}

/* ---- Date Circles (Step 3 — Squire-style) ---- */
.overlay-booker .ob-date-slider {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 24px;
}

.overlay-booker .ob-date-arrow {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #666;
    flex-shrink: 0;
    transition: color 0.15s;
}
.overlay-booker .ob-date-arrow:hover {
    color: var(--ob-accent);
}

.overlay-booker .ob-date-more {
    width: 40px;
    height: 40px;
    border: 2px solid #e0e0e0;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #666;
    flex-shrink: 0;
    transition: all 0.15s;
    margin-left: 4px;
}
.overlay-booker .ob-date-more:hover {
    border-color: var(--ob-accent);
    color: var(--ob-accent);
}

.overlay-booker .ob-date-strip {
    display: flex;
    flex: 1;
    gap: 6px;
    overflow: hidden;
    justify-content: center;
}

.overlay-booker .ob-date-cell {
    width: 48px;
    height: 64px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-radius: 24px;
}
.overlay-booker .ob-date-cell:hover {
    background: #f5f5f5;
}

.overlay-booker .ob-date-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.15s;
    color: var(--ob-accent);
}

.overlay-booker .ob-date-cell.today .ob-date-num {
    border: 2px solid var(--ob-cta);
}

.overlay-booker .ob-date-cell.selected .ob-date-num {
    background: var(--ob-accent);
    color: var(--ob-accent-text);
}

.overlay-booker .ob-date-day {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 500;
    color: #666;
}
.overlay-booker .ob-date-cell.selected .ob-date-day {
    color: var(--ob-accent);
    font-weight: 700;
}

/* ---- Time Slots (Step 3) ---- */
.overlay-booker .ob-time-group-title {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 20px 0 10px;
}
.overlay-booker .ob-time-group-title:first-child {
    margin-top: 0;
}

.overlay-booker .ob-time-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
}

.overlay-booker .ob-time-slot {
    border: 1px solid #c3e6cb;
    border-radius: 24px;
    padding: 10px 8px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    background: #f0faf2;
    color: #1a7a3a;
}
.overlay-booker .ob-time-slot:hover {
    border-color: #28a745;
    background: #d4edda;
}
.overlay-booker .ob-time-slot.selected {
    background: #28a745;
    color: #fff;
    border-color: #28a745;
}

.overlay-booker .ob-no-slots {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 14px;
}

/* ---- Review Card (Step 4) ---- */
.overlay-booker .ob-review-card {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.overlay-booker .ob-review-staff {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e5e5;
}
.overlay-booker .ob-review-staff-photo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: #eee;
}
.overlay-booker .ob-review-staff-name {
    font-weight: 600;
    font-size: 16px;
}
.overlay-booker .ob-review-staff-label {
    font-size: 12px;
    color: #666;
}

.overlay-booker .ob-review-datetime {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e5e5;
    font-size: 15px;
}
.overlay-booker .ob-review-datetime i {
    color: var(--ob-cta);
    font-size: 16px;
}

.overlay-booker .ob-review-services {
    margin-bottom: 16px;
}
.overlay-booker .ob-review-service-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}
.overlay-booker .ob-review-service-name {
    font-size: 14px;
}
.overlay-booker .ob-review-service-price {
    font-size: 14px;
    font-weight: 600;
}

.overlay-booker .ob-review-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 2px solid #ddd;
    font-size: 16px;
    font-weight: 700;
}

/* Login prompt in review */
.overlay-booker .ob-login-prompt {
    background: #fffbea;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
    text-align: center;
}
.overlay-booker .ob-login-prompt p {
    margin: 0 0 10px;
    font-size: 14px;
    color: #92400e;
}

/* ---- Buttons ---- */
.overlay-booker .ob-btn {
    display: block;
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s;
}
.overlay-booker .ob-btn-primary {
    background: var(--ob-cta);
    color: var(--ob-cta-text);
}
.overlay-booker .ob-btn-primary:hover {
    opacity: 0.85;
}
.overlay-booker .ob-btn-primary:disabled {
    /* a neutral, readable disabled look: 0.4 opacity made any pair faint (8A's read red on near-black) */
    background: #e5e5e5;
    color: #555;
    opacity: 1;
    cursor: not-allowed;
}
.overlay-booker .ob-btn-outline {
    background: #fff;
    color: var(--ob-accent);
    border: 2px solid var(--ob-accent);
}
.overlay-booker .ob-btn-outline:hover {
    background: #f5f5f5;
}

/* ---- Success Screen (Step 5) ---- */
.overlay-booker .ob-success {
    text-align: center;
    padding: 14px;
}
/* The compact Done block (operator 2026-11-24): photo + check beside when / who / services and total. */
.overlay-booker .ob-done { display: flex; align-items: flex-start; justify-content: center; gap: 12px; padding: 12px; margin-bottom: 8px; border-radius: 10px; background: var(--ob-cta-light); text-align: left; }
.overlay-booker .ob-done__pic { position: relative; flex: 0 0 auto; width: 56px; height: 56px; }
.overlay-booker .ob-done__pic img, .overlay-booker .ob-done__nopic { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 2px solid var(--ob-cta); display: flex; align-items: center; justify-content: center; background: var(--ob-cta-light); color: var(--ob-accent); font-size: 22px; box-sizing: border-box; }
.overlay-booker .ob-done__check { position: absolute; right: -4px; bottom: -4px; width: 24px; height: 24px; border-radius: 50%; background: #16a34a; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; border: 2px solid #fff; }
.overlay-booker .ob-done__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.overlay-booker .ob-done__title { font-size: 18px; font-weight: 700; margin: 0 0 2px; }
.overlay-booker .ob-done__line { margin-top: 4px; padding-top: 6px; border-top: 1px solid rgba(0,0,0,0.1); font-size: 13px; }
.overlay-booker .ob-done__nw { white-space: nowrap; }
.overlay-booker .ob-done__dot { opacity: 0.6; }
.overlay-booker .ob-done__label { color: #666; font-size: 12px; text-transform: uppercase; letter-spacing: 0.3px; margin-right: 4px; }
.overlay-booker .ob-success p.ob-done__note { margin: 0 0 10px; font-size: 13px; }
.overlay-booker .ob-success-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #dcfce7;
    color: #16a34a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin: 0 auto 20px;
}
.overlay-booker .ob-success h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}
.overlay-booker .ob-success p {
    color: #666;
    font-size: 14px;
    margin-bottom: 24px;
    line-height: 1.5;
}
.overlay-booker .ob-success-details {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
    text-align: left;
    font-size: 14px;
}
.overlay-booker .ob-success-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}
.overlay-booker .ob-success-detail-row:last-child {
    border-bottom: none;
}
.overlay-booker .ob-success-detail-label {
    color: #666;
}
.overlay-booker .ob-success-detail-value {
    font-weight: 600;
    text-align: right;
}
.overlay-booker .ob-success-total {
    border-top: 2px solid #ddd;
    font-size: 16px;
    font-weight: 700;
}
.overlay-booker .ob-success-total .ob-success-detail-label,
.overlay-booker .ob-success-total .ob-success-detail-value {
    color: #1a1a1a;
    font-weight: 700;
}

/* ---- Calendar Links (Step 5) ---- */
.overlay-booker .ob-calendar-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.overlay-booker .ob-calendar-label {
    font-size: 13px;
    color: #666;
}
.overlay-booker .ob-calendar-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: #1a1a1a;
    text-decoration: none;
    transition: all 0.15s;
    background: #fff;
}
.overlay-booker .ob-calendar-btn:hover {
    border-color: var(--ob-cta);
    background: var(--ob-cta-light);
}
.overlay-booker .ob-calendar-btn i {
    font-size: 14px;
}

/* ---- Error Modal ---- */
.overlay-booker .ob-error-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    border-radius: 8px;
}
.overlay-booker .ob-error-box {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    max-width: 340px;
    width: 90%;
    text-align: center;
}
.overlay-booker .ob-error-box h3 {
    margin: 0 0 8px;
    font-size: 17px;
}
.overlay-booker .ob-error-box p {
    color: #666;
    font-size: 14px;
    margin: 0 0 16px;
}

/* ---- Wide screen: bigger time grid ---- */
@media (min-width: 600px) {
    .overlay-booker .ob-time-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    .overlay-booker .ob-date-cell {
        width: 56px;
        height: 72px;
    }
    .overlay-booker .ob-date-num {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

/* ---- Desktop: the panel scrolls, not the page behind it ----
   The Corporation pages draw the booker inside #overlay-container, a fixed box from under the nav to the bottom
   of the window. Without a height bound #appointments grew with a long service list (8A, 21 services), ran past
   the window and could not scroll, so the wheel scrolled the page behind it (operator, 2026-10-15). Bound to the
   container, the booker is a flex column: header and order bar stay, .ob-body scrolls, and a scroll that reaches
   its end stops there. The profile view in the same container scrolls itself the same way. Phone widths
   (768px and under) keep the rules below, untouched. SDUI and BarberShop panels are not inside #overlay-container and are unchanged. */
@media (min-width: 769px) {
    #overlay-container #appointments:has(.overlay-booker) {
        max-height: calc(100% - 40px);
        display: flex;
        flex-direction: column;
    }
    #overlay-container #appointments > .overlay-booker {
        flex: 1 1 auto;
        min-height: 0;
    }
    #overlay-container .overlay-booker .ob-body {
        min-height: 0;
        overscroll-behavior: contain;
    }
    #overlay-container #customer-profile-view {
        max-height: calc(100% - 40px);
        overscroll-behavior: contain;
    }
}

/* ---- Mobile: fill between nav and footer ---- */
@media (max-width: 768px) {
    .t3-overlay-container:has(.overlay-booker),
    #overlay-container:has(.overlay-booker) {
        padding: 0 !important;
        align-items: stretch !important;
        bottom: 58px !important;
    }

    .t3-overlay-panel:has(.overlay-booker),
    #appointments:has(.overlay-booker) {
        border-radius: 0 !important;
        max-width: 100% !important;
        max-height: 100% !important;
        height: 100% !important;
        box-shadow: none !important;
        margin: 0 !important;
    }

    .overlay-booker {
        min-height: 100%;
        border-radius: 0;
    }
    .overlay-booker .ob-header {
        border-radius: 0;
    }
    .overlay-booker .ob-order-bar {
        border-radius: 0;
    }
}

/* ---- Small screen tweaks ---- */
@media (max-width: 420px) {
    .overlay-booker .ob-body {
        padding: 14px;
    }
    .overlay-booker .ob-staff-grid,
    .overlay-booker .ob-service-grid {
        gap: 8px;
    }
    .overlay-booker .ob-staff-card {
        padding: 12px 8px;
    }
    .overlay-booker .ob-staff-photo,
    .overlay-booker .ob-staff-icon {
        width: 48px;
        height: 48px;
    }
    .overlay-booker .ob-service-grid {
        grid-template-columns: 1fr 1fr;
    }
    .overlay-booker .ob-service-card {
        padding: 8px;
    }
    .overlay-booker .ob-time-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .overlay-booker .ob-breadcrumbs {
        font-size: 12px;
        gap: 5px;
    }
    .overlay-booker .ob-date-strip {
        gap: 2px;
    }
    .overlay-booker .ob-date-cell {
        width: 40px;
    }
    .overlay-booker .ob-date-num {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
}

/* A service with no length cannot be booked online (thread zero-length-step1-2026-11-20): its card says so and is not
   taken (overlayToggleService). */
/* (the cards' fixed 118px height would cut the sentence off: this one grows) */
.overlay-booker .ob-service-card.ob-service-card--unbookable,
.overlay-booker .ob-service-card.ob-service-card--unbookable:hover { cursor: not-allowed; border-style: dashed; border-color: #d0d0d0; background: #fafafa; height: auto; min-height: 118px; }
.overlay-booker .ob-service-nolength { margin-top: 6px; font-size: 13px; font-weight: 600; line-height: 1.35; }

/* Step 3's summary: each chosen service's whole text after its name, in pick order (thread service-details-2026-11-20). */
.overlay-booker .ob-staff-summary-service { line-height: 1.35; }
.overlay-booker .ob-picked-desc__text { display: block; color: #666; font-size: 12px; overflow-wrap: anywhere; }   /* its own line in the row; secondary: smaller, lighter */

/* On an SDUI page the overlay booker is as wide as the page's content: 1120 (or the lane's contentWidth), the width of
   the lane's sections, not combined.css's 600 px card; full width on a phone (operator on 8A, thread
   8a-booker-width-2026-11-20). #appointments in the selector: combined.css sets the 600 on the section. */
body.sdui #appointments.bv-appointments--overlay { max-width: 1120px; }
body.sdui.sdui--cw #appointments.bv-appointments--overlay { max-width: var(--sdui-content-w); }
/* On an SDUI page the booker is a little shorter than the window, so the next section shows below it, and its body
   scrolls inside it: 8A has 21 services, and the booker grew to ~2080px, far past the window (operator 2026-11-21:
   "this Booker area is too tall ... a little bit shorter than the height of the browser and then you'd see the next
   section below it ... they should be scrollable inside its div of services"). Header and order bar stay; .ob-body
   scrolls, and a scroll that reaches its end stops there (the #overlay-container rule above, for the classic pages). */
body.sdui #appointments.bv-appointments--overlay { max-height: calc(100dvh - 168px) !important; height: auto !important; display: flex; flex-direction: column; }
body.sdui #appointments.bv-appointments--overlay > .overlay-booker { flex: 1 1 auto; min-height: 0; }
body.sdui #appointments.bv-appointments--overlay .ob-body { min-height: 0; overscroll-behavior: contain; }

/* On an SDUI page the overlay takes the page's own theme pairs, as the account bar does, not the company's colour prefs
   (8A's color3 is #000 with red text, color1-light #c29b79 as text on white: 2.5:1; operator, thread
   8a-booker-colours-2026-11-20). Primary for the accent (crumbs, outline buttons, selected), accent for the actions. */
body.sdui .overlay-booker {
    --ob-accent: var(--sdui-c-primary);
    --ob-accent-text: var(--sdui-c-onPrimary);
    --ob-cta: var(--sdui-c-accent);
    --ob-cta-text: var(--sdui-c-onAccent);
    --ob-cta-light: color-mix(in srgb, var(--sdui-c-accent) 18%, #ffffff);
    --ob-cta-light-text: var(--sdui-c-onSurface);
    --ob-warm: color-mix(in srgb, var(--sdui-c-accent) 30%, #ffffff);
    --ob-warm-text: var(--sdui-c-onSurface);
}
/* "Show N more" is a link on white: the accent (a gold on 8A) read 3.1:1 as text; primary reads. */
body.sdui .overlay-booker .ob-category-expand-btn { color: var(--sdui-c-primary); }

/* Step 4's review cards (thread booker-layout-2026-11-21): their type in classes, not inline; larger on wide screens
   (the operator on 8A: "the font is too small ... we have space"), as before on phones; the time range on one line
   when it fits (the start and its end wrap as two pieces, never inside one). */
.overlay-booker .ob-review-title { font-size: 14px; }
.overlay-booker .ob-review-head { font-size: 11px; }
.overlay-booker .ob-review-row { font-size: 13px; }
.overlay-booker .ob-review-sub { color: #666; font-size: 0.85em; }
.overlay-booker .ob-review-nowrap { white-space: nowrap; }
@media (min-width: 768px) {
    .overlay-booker .ob-review-title { font-size: 17px; }
    .overlay-booker .ob-review-head { font-size: 12.5px; }
    .overlay-booker .ob-review-row { font-size: 15px; }
}
/* On an SDUI page the same space above the booker as below it (it was 0 above, 20 below, and 80 dead inside under
   Confirm): 24px on wide screens. Phones keep this file's full-bleed rule (margin 0 at 768px and down): no vertical
   padding there. bkScrollToBooker leaves the margin under the sticky head. */
body.sdui #appointments.bv-appointments--overlay { margin: 24px auto; }

/* "Add" by a blank phone / email in the review: a link to My Account's Contact tab and back (openAccountFromBooker) */
.overlay-booker .ob-add { color: var(--ob-accent); font-weight: 600; text-decoration: underline; cursor: pointer; }

/* The customer's first photo beside their details (My Account's Photos tab; "Add" when none). */
.overlay-booker .ob-photo { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; vertical-align: middle; }

/* Step 5's calendar links stay small (operator 2026-11-24, compact Done). */
.overlay-booker .ob-success .ob-calendar-btn { padding: 5px 10px; font-size: 12px; }
