/* ============================================
   Booking App – Themeable Design
   Colors driven by CSS custom properties.
   Set via config.theme from backend, or defaults below.
   ============================================ */

/* --- Theme custom properties (defaults = dark navy) --- */
.booking-root {
    --bk-primary: #1a365d;
    --bk-primary-text: #ffffff;
    --bk-accent: #3b82f6;
    --bk-accent-hover: #2563eb;
    --bk-accent-text: #ffffff;
    --bk-bg: #0f1d36;
    --bk-surface: rgba(255, 255, 255, 0.05);
    --bk-surface-border: rgba(255, 255, 255, 0.1);
    --bk-text: #ffffff;
    --bk-text-muted: rgba(255, 255, 255, 0.5);
    --bk-text-secondary: rgba(255, 255, 255, 0.7);
    --bk-input-bg: rgba(255, 255, 255, 0.05);
    --bk-input-border: rgba(255, 255, 255, 0.15);
    --bk-input-focus-border: var(--bk-accent);
    --bk-input-placeholder: rgba(255, 255, 255, 0.35);
    --bk-dropdown-bg: #1e293b;
    --bk-bg-gradient-start: #0a1628;
    --bk-bg-gradient-end: #0f1d36;
    --bk-container-start: #0d1b3a;
    --bk-container-end: #0f1d36;
    --bk-container-shadow: rgba(0, 0, 0, 0.4);
    --bk-success: #10b981;
    --bk-success-hover: #059669;
    --bk-danger: #ef4444;
    --bk-radius: 0.75rem;
    --bk-radius-lg: 16px;
    --bk-radius-xl: 24px;
    --bk-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* --- Base / Body --- */
.booking-root {
    font-family: var(--bk-font);
    background: linear-gradient(135deg, var(--bk-bg-gradient-start) 0%, var(--bk-bg-gradient-end) 100%);
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
    color: var(--bk-text);
}

/* --- Main container card --- */
.booking-container {
    background: linear-gradient(180deg, var(--bk-container-start) 0%, var(--bk-container-end) 100%);
    border-radius: var(--bk-radius-xl);
    padding: 40px 32px;
    max-width: 700px;
    width: 100%;
    box-shadow: 0 20px 60px var(--bk-container-shadow);
    border: 1px solid var(--bk-surface-border);
}

/* --- Embedded (iframe) mode ---
   Removes full-page background, padding and min-height.
   Only the booking-container card is visible.
   Compact sizing to reduce scrolling inside iframe. */
body.embedded .booking-root {
    background: transparent;
    min-height: auto;
    padding: 0;
    align-items: stretch;
}
body.embedded .booking-container {
    max-width: 100%;
    border-radius: 16px;
    box-shadow: none;
    border: none;
    padding: 24px 20px;
}
/* Compact header */
body.embedded .booking-header {
    margin-bottom: 4px;
}
body.embedded .booking-header h5 {
    font-size: 17px;
}
body.embedded .booking-header .step-indicator {
    font-size: 12px;
}
/* Compact top bar */
body.embedded .booking-top-bar {
    margin-bottom: 6px;
}
body.embedded .booking-lang-btn {
    padding: 2px 8px;
    font-size: 11px;
}
/* Compact panels */
body.embedded .booking-panel {
    padding: 16px;
    border-radius: 12px;
}
body.embedded .booking-section-title {
    font-size: 15px;
    margin-bottom: 12px;
}
/* Compact form elements */
body.embedded .booking-panel .form-label,
body.embedded .booking-root .form-label {
    font-size: 13px;
    margin-bottom: 2px;
}
body.embedded .booking-panel .form-control,
body.embedded .booking-panel .form-select,
body.embedded .booking-root .form-control {
    padding: 8px 10px;
    font-size: 14px;
    border-radius: 6px;
}
body.embedded .mb-3 {
    margin-bottom: 0.6rem !important;
}
/* Compact buttons */
body.embedded .booking-root .btn-booking-primary,
body.embedded .booking-root .btn-booking-success {
    padding: 10px 22px;
    font-size: 14px;
    border-radius: 10px;
}
body.embedded .booking-root .btn-booking-secondary {
    padding: 8px 16px;
    font-size: 13px;
}
/* Compact slots grid */
body.embedded .slots-grid {
    gap: 8px;
    margin-bottom: 16px;
}
body.embedded .slot-card {
    padding: 10px 14px;
    border-radius: 12px;
}
body.embedded .slot-card .slot-time {
    font-size: 13px;
}
/* Compact summary */
body.embedded .booking-summary {
    padding: 10px 14px;
    border-radius: 10px;
    text-align: left;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}
body.embedded .booking-summary .summary-row {
    margin-bottom: 4px;
    padding-bottom: 4px;
}
/* Compact success icon */
body.embedded .booking-success-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
    margin-bottom: 6px;
}
/* Compact completed page spacing */
body.embedded .mb-4 {
    margin-bottom: 0.4rem !important;
}
body.embedded .mb-3 {
    margin-bottom: 0.3rem !important;
}
body.embedded .mb-2 {
    margin-bottom: 0.2rem !important;
}
body.embedded .mt-2 {
    margin-top: 0.3rem !important;
}
body.embedded h5 {
    font-size: 15px;
    margin-bottom: 2px !important;
}
body.embedded p.text-muted-booking {
    font-size: 12px;
    margin-bottom: 4px !important;
}
/* Compact summary rows */
body.embedded .booking-summary .summary-label {
    font-size: 11px;
    margin-bottom: 0;
}
body.embedded .booking-summary .summary-value {
    font-size: 13px;
}
/* Compact booking ID */
body.embedded .booking-completed-id {
    font-size: 14px !important;
}
body.embedded .booking-root .btn-calendar {
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 6px;
}
body.embedded .booking-root hr {
    margin: 6px 0;
}
body.embedded .booking-root .btn-booking-link {
    padding: 2px 10px;
    font-size: 12px;
}
body.embedded .booking-root .btn-booking-secondary {
    padding: 4px 12px;
    font-size: 12px;
}

/* --- Header --- */
.booking-header {
    text-align: center;
    margin-bottom: 8px;
}

/* --- Top bar (new-booking left + language selector right) --- */
.booking-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.booking-top-left {
    min-width: 0;
}

/* --- Language selector --- */
.booking-lang-selector {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
}
.booking-lang-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--bk-text-muted);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--bk-font);
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
    line-height: 1.4;
}
.booking-lang-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--bk-text-secondary);
}
.booking-lang-btn.active {
    background: color-mix(in srgb, var(--bk-accent) 20%, transparent);
    border-color: color-mix(in srgb, var(--bk-accent) 40%, transparent);
    color: color-mix(in srgb, var(--bk-accent) 60%, white);
}
.booking-header h5 {
    color: var(--bk-text);
    font-weight: 600;
    font-size: 20px;
    margin-bottom: 4px;
}
.booking-header .step-indicator {
    color: var(--bk-text-muted);
    font-size: 13px;
}

/* --- Section titles --- */
.booking-section-title {
    color: var(--bk-text);
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 20px;
}
.booking-section-title i {
    color: var(--bk-text-secondary);
}

/* --- Card panels (customer form, confirm, completed) --- */
.booking-panel {
    background: var(--bk-surface);
    border: 1px solid var(--bk-surface-border);
    border-radius: var(--bk-radius-lg);
    padding: 28px;
}

/* --- Form elements --- */
.booking-panel .form-label,
.booking-root .form-label {
    color: color-mix(in srgb, var(--bk-text) 90%, transparent);
    font-size: 14px;
    font-weight: 500;
}

.booking-panel .form-control,
.booking-panel .form-select,
.booking-root .form-control,
.booking-root .form-select {
    background: var(--bk-input-bg);
    border: 2px solid var(--bk-input-border);
    border-radius: 8px;
    color: var(--bk-text);
    padding: 12px 14px;
    font-size: 15px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.booking-panel .form-control:focus,
.booking-panel .form-select:focus,
.booking-root .form-control:focus,
.booking-root .form-select:focus {
    background: color-mix(in srgb, var(--bk-input-bg) 80%, white);
    border-color: var(--bk-input-focus-border);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--bk-accent) 15%, transparent);
    color: var(--bk-text);
}

/* Native dropdown option colors */
.booking-root .form-select option {
    background: var(--bk-dropdown-bg);
    color: var(--bk-text);
}

.booking-panel .form-control::placeholder,
.booking-root .form-control::placeholder {
    color: var(--bk-input-placeholder);
}

/* date input color fix */
.booking-root input[type="date"] {
    color-scheme: dark;
}

/* --- Primary button (blue) --- */
.booking-root .btn-booking-primary {
    background: var(--bk-accent);
    color: var(--bk-accent-text);
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: var(--bk-font);
}
.booking-root .btn-booking-primary:hover {
    background: var(--bk-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px color-mix(in srgb, var(--bk-accent) 30%, transparent);
    color: var(--bk-accent-text);
}
.booking-root .btn-booking-primary:disabled {
    background: var(--bk-surface);
    color: var(--bk-text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* --- Success button (green, for confirm) --- */
.booking-root .btn-booking-success {
    background: var(--bk-success);
    color: #ffffff;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: var(--bk-font);
}
.booking-root .btn-booking-success:hover {
    background: var(--bk-success-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px color-mix(in srgb, var(--bk-success) 30%, transparent);
    color: #ffffff;
}
.booking-root .btn-booking-success:disabled {
    background: var(--bk-surface);
    color: var(--bk-text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* --- Secondary / ghost button --- */
.booking-root .btn-booking-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--bk-text);
    border: 1px solid var(--bk-input-border);
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--bk-font);
}
.booking-root .btn-booking-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--bk-text);
}
.booking-root .btn-booking-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* --- Link / back button --- */
.booking-root .btn-booking-link {
    background: none;
    border: none;
    color: var(--bk-text-muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease;
    font-family: var(--bk-font);
    padding: 8px 16px;
}
.booking-root .btn-booking-link:hover {
    color: var(--bk-text);
}

/* ============================================
   Slot cards (appointment-card style from draft)
   ============================================ */
.slots-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 24px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.slot-card {
    background: var(--bk-surface);
    border: 2px solid var(--bk-surface-border);
    border-radius: var(--bk-radius-lg);
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    text-align: left;
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.slot-card:hover {
    background: color-mix(in srgb, var(--bk-surface) 80%, white);
    border-color: color-mix(in srgb, var(--bk-accent) 50%, transparent);
    transform: translateY(-2px);
}
.slot-card-focused {
    background: color-mix(in srgb, var(--bk-accent) 12%, transparent);
    border-color: color-mix(in srgb, var(--bk-accent) 70%, transparent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--bk-accent) 30%, transparent);
    transform: translateY(-2px);
}

/* Date (emphasized) */
.slot-card .slot-date {
    font-size: 15px;
    font-weight: 600;
    color: var(--bk-text);
    text-transform: capitalize;
    white-space: nowrap;
}

/* Time (muted, right-aligned) */
.slot-card .slot-time {
    font-size: 14px;
    font-weight: 400;
    color: var(--bk-text-muted);
    margin-left: auto;
    white-space: nowrap;
}

/* Target name (inline, muted) */
.slot-card .slot-target {
    font-size: 12px;
    color: var(--bk-text-muted);
    margin-left: auto;
}



/* ============================================
   Summary panel (confirm & completed steps)
   ============================================ */
.booking-summary {
    background: var(--bk-surface);
    border: 1px solid var(--bk-surface-border);
    border-radius: var(--bk-radius-lg);
    padding: 24px;
    text-align: left;
}
.booking-summary .summary-row {
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid color-mix(in srgb, var(--bk-surface-border) 80%, transparent);
}
.booking-summary .summary-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.booking-summary .summary-label {
    font-size: 12px;
    color: var(--bk-text-muted);
    margin-bottom: 2px;
}
.booking-summary .summary-value {
    font-size: 15px;
    font-weight: 500;
    color: color-mix(in srgb, var(--bk-text) 95%, transparent);
}

/* --- Success icon (completed screen) --- */
.booking-success-icon {
    width: 72px;
    height: 72px;
    background: var(--bk-success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 36px;
    color: #ffffff;
}

/* --- Calendar export buttons --- */
.booking-root .btn-calendar {
    background: color-mix(in srgb, var(--bk-accent) 15%, transparent);
    border: 1px solid color-mix(in srgb, var(--bk-accent) 30%, transparent);
    color: var(--bk-text);
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.booking-root .btn-calendar:hover {
    background: color-mix(in srgb, var(--bk-accent) 25%, transparent);
    color: var(--bk-text);
}

/* --- Alert (error messages) --- */
.booking-root .booking-alert {
    background: color-mix(in srgb, var(--bk-danger) 15%, transparent);
    border: 1px solid color-mix(in srgb, var(--bk-danger) 30%, transparent);
    border-radius: 10px;
    padding: 12px 16px;
    color: #fca5a5;
    font-size: 14px;
}

/* --- Spinner override --- */
.booking-root .spinner-border {
    color: var(--bk-accent);
}

/* --- Muted text override --- */
.booking-root .text-muted-booking {
    color: var(--bk-text-muted);
}
.booking-root .text-muted {
    color: var(--bk-text-muted) !important;
}

/* --- Buttons inside booking panels (Bootstrap btn overrides) --- */
.booking-root .booking-panel .btn-primary {
    background: var(--bk-accent);
    color: var(--bk-accent-text);
    border: none;
    font-weight: 600;
    border-radius: 10px;
    padding: 10px 24px;
    transition: all 0.2s ease;
}
.booking-root .booking-panel .btn-primary:hover {
    background: var(--bk-accent-hover);
}
.booking-root .booking-panel .btn-primary:disabled {
    background: var(--bk-surface);
    color: var(--bk-text-muted);
    border: none;
}
.booking-root .booking-panel .btn-outline-secondary {
    background: transparent;
    color: var(--bk-text-secondary);
    border: 1px solid var(--bk-input-border);
    border-radius: 10px;
    padding: 10px 24px;
    transition: all 0.2s ease;
}
.booking-root .booking-panel .btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--bk-text);
}
.booking-root .booking-panel .btn-outline-secondary:disabled {
    color: var(--bk-text-muted);
    border-color: var(--bk-surface-border);
}

/* --- Advanced wizard section titles --- */
.booking-root .booking-panel h5 {
    color: var(--bk-text);
    font-weight: 600;
}

/* --- Date picker expansion panel --- */
.booking-date-panel {
    background: var(--bk-surface);
    border: 1px solid var(--bk-surface-border);
    border-radius: 12px;
    padding: 16px;
}

/* --- Divider --- */
.booking-root hr {
    border-color: var(--bk-surface-border);
}

/* --- Links inside booking --- */
.booking-root a {
    color: color-mix(in srgb, var(--bk-accent) 70%, white);
}
.booking-root a:hover {
    color: color-mix(in srgb, var(--bk-accent) 50%, white);
}

/* --- Error / not-found state --- */
.booking-error-state h4 {
    color: var(--bk-text);
}
.booking-error-state p {
    color: var(--bk-text-muted);
}

/* ============================================
   Address Autocomplete
   ============================================ */
.address-input-wrapper {
    position: relative;
}

.address-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--bk-dropdown-bg);
    border: 2px solid var(--bk-input-border);
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 240px;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.address-suggestion-item {
    padding: 10px 14px;
    font-size: 14px;
    color: color-mix(in srgb, var(--bk-text) 85%, transparent);
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: 1px solid color-mix(in srgb, var(--bk-surface-border) 60%, transparent);
    display: flex;
    align-items: flex-start;
    width: 100%;
    text-align: left;
    background: none;
    border-left: none;
    border-right: none;
    border-top: none;
    font-family: inherit;
}

.address-suggestion-item:last-child {
    border-bottom: none;
}

.address-suggestion-item:hover,
.address-suggestion-item.active {
    background: color-mix(in srgb, var(--bk-accent) 15%, transparent);
    color: var(--bk-text);
}

.address-suggestion-item .bi-geo-alt {
    color: var(--bk-accent);
    flex-shrink: 0;
    margin-top: 2px;
}

/* When suggestions are open, keep bottom border of input squared */
.address-input-wrapper:has(.address-suggestions) .form-control {
    border-radius: 8px 8px 0 0;
}

/* Embedded compact: smaller suggestion items */
body.embedded .address-suggestion-item {
    padding: 7px 10px;
    font-size: 13px;
}

/* Hint when no results found yet */
.address-no-results-hint {
    padding: 10px 14px;
    font-size: 13px;
    color: var(--bk-text-muted);
    font-style: italic;
    display: flex;
    align-items: center;
}

.address-no-results-hint .bi-info-circle {
    color: #f59e0b;
    flex-shrink: 0;
}

/* House number prompt (appears after selecting address without number) */
.address-house-number-prompt {
    margin-top: -0.5rem;
    margin-bottom: 1rem;
    position: relative;
}

.house-number-card {
    background: color-mix(in srgb, var(--bk-accent) 8%, transparent);
    border: 1.5px solid color-mix(in srgb, var(--bk-accent) 30%, transparent);
    border-radius: 8px;
    padding: 10px 12px;
    animation: houseNumberSlideIn 0.25s ease-out;
}

.house-number-question {
    font-size: 13px;
    color: color-mix(in srgb, var(--bk-text) 80%, transparent);
    font-weight: 500;
    display: flex;
    align-items: center;
}

.house-number-question .bi-hash {
    color: var(--bk-accent);
}

.house-number-card .form-label {
    font-size: 13px;
    color: var(--bk-text-secondary);
    font-weight: 500;
}

.house-number-card .bi-hash {
    color: var(--bk-accent);
}

.house-number-input {
    max-width: 120px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.5px;
}

.house-number-confirm {
    padding: 3px 8px;
    font-size: 13px;
    line-height: 1;
    flex-shrink: 0;
}

.house-number-skip-hint {
    display: block;
    font-size: 11px;
    color: var(--bk-text-muted);
    margin-top: 5px;
    font-style: italic;
}

/* Re-search results dropdown (inline, not absolute) */
.address-suggestions-inline {
    position: relative;
    top: auto;
    margin-top: 6px;
    border-top: 2px solid var(--bk-input-border);
    border-radius: 8px;
}

@keyframes houseNumberSlideIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Embedded compact house number */
body.embedded .house-number-card {
    padding: 8px 10px;
}

body.embedded .house-number-input {
    max-width: 100px;
    font-size: 14px;
}

/* ============================================
   Advanced Wizard Fields Grid (2-col on desktop)
   ============================================ */
.bk-wizard-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 20px;
    align-items: start;
}

.bk-wizard-fields-grid > .bk-field-full {
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    .bk-wizard-fields-grid {
        grid-template-columns: 1fr;
    }
}

/* Embedded mode: tighter gap */
body.embedded .bk-wizard-fields-grid {
    gap: 2px 14px;
}

/* ============================================
   Toggle Pill Buttons (single-select)
   ============================================ */
.bk-toggle-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bk-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--bk-radius, 12px);
    border: 2px solid var(--bk-surface-border, rgba(255,255,255,0.12));
    background: var(--bk-input-bg, rgba(255,255,255,0.05));
    color: var(--bk-text-secondary, rgba(255,255,255,0.6));
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
    text-align: center;
    font-family: var(--bk-font, inherit);
}

.bk-toggle-btn:hover {
    border-color: var(--bk-accent, #3b82f6);
    color: var(--bk-text, #ffffff);
    background: rgba(59, 130, 246, 0.08);
}

.bk-toggle-btn.active {
    border-color: var(--bk-accent, #3b82f6);
    background: var(--bk-accent, #3b82f6);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* ============================================
   Checkbox Cards (multi-select)
   ============================================ */
.bk-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.bk-checkbox-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--bk-radius, 12px);
    border: 2px solid var(--bk-surface-border, rgba(255,255,255,0.12));
    background: var(--bk-input-bg, rgba(255,255,255,0.05));
    color: var(--bk-text-secondary, rgba(255,255,255,0.6));
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.bk-checkbox-card:hover {
    border-color: var(--bk-accent, #3b82f6);
    color: var(--bk-text, #ffffff);
}

.bk-checkbox-card.checked {
    border-color: var(--bk-accent, #3b82f6);
    background: rgba(59, 130, 246, 0.1);
    color: var(--bk-text, #ffffff);
}

.bk-checkbox-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    min-width: 18px;
    border-radius: 4px;
    border: 2px solid var(--bk-surface-border, rgba(255,255,255,0.2));
    background: transparent;
    color: #ffffff;
    font-size: 12px;
    transition: all 0.2s ease;
}

.bk-checkbox-card.checked .bk-checkbox-indicator {
    background: var(--bk-accent, #3b82f6);
    border-color: var(--bk-accent, #3b82f6);
}

.bk-checkbox-label {
    font-size: 0.82rem;
    font-weight: 500;
}

/* ============================================
   Light Theme Overrides
   Applied when _applyTheme detects light background
   ============================================ */
.booking-root.bk-light {
    background: var(--bk-bg);
}

.bk-light .booking-container {
    background: #ffffff;
    box-shadow: 0 4px 24px var(--bk-container-shadow);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.bk-light .booking-lang-btn {
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.5);
}
.bk-light .booking-lang-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: rgba(0, 0, 0, 0.7);
}
.bk-light .booking-lang-btn.active {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    color: #2563eb;
}

.bk-light .booking-panel {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.bk-light .booking-panel .form-control,
.bk-light .booking-panel .form-select,
.bk-light .form-control,
.bk-light .form-select {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.15);
    color: var(--bk-text);
}
.bk-light .booking-panel .form-control:focus,
.bk-light .booking-panel .form-select:focus,
.bk-light .form-control:focus,
.bk-light .form-select:focus {
    background: #ffffff;
    border-color: var(--bk-accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
    color: var(--bk-text);
}
.bk-light .form-select option {
    background: #ffffff;
    color: var(--bk-text);
}
.bk-light .form-control::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

/* date input: use light scheme */
.bk-light input[type="date"] {
    color-scheme: light;
}

.bk-light .btn-booking-primary:disabled,
.bk-light .btn-booking-success:disabled,
.bk-light .booking-panel .btn-primary:disabled {
    background: rgba(0, 0, 0, 0.06);
    color: rgba(0, 0, 0, 0.35);
}

.bk-light .btn-booking-secondary {
    background: rgba(0, 0, 0, 0.04);
    color: var(--bk-text);
    border: 1px solid rgba(0, 0, 0, 0.12);
}
.bk-light .btn-booking-secondary:hover {
    background: rgba(0, 0, 0, 0.08);
}

.bk-light .booking-panel .btn-outline-secondary {
    color: var(--bk-text-secondary);
    border: 1px solid rgba(0, 0, 0, 0.15);
}
.bk-light .booking-panel .btn-outline-secondary:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--bk-text);
}
.bk-light .booking-panel .btn-outline-secondary:disabled {
    color: rgba(0, 0, 0, 0.3);
    border-color: rgba(0, 0, 0, 0.08);
}

.bk-light .slot-card {
    background: #ffffff;
    border: 2px solid rgba(0, 0, 0, 0.08);
}
.bk-light .slot-card:hover {
    background: #f8fafc;
    border-color: rgba(59, 130, 246, 0.4);
}
.bk-light .slot-card-focused {
    background: rgba(59, 130, 246, 0.06);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

}

.bk-light .booking-summary {
    background: #f8fafc;
    border: 1px solid rgba(0, 0, 0, 0.08);
}
.bk-light .booking-summary .summary-row {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

.bk-light .booking-date-panel {
    background: #f8fafc;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.bk-light .btn-calendar {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
}
.bk-light .btn-calendar:hover {
    background: rgba(59, 130, 246, 0.15);
}

.bk-light .address-suggestions {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.bk-light .address-suggestion-item {
    color: var(--bk-text-secondary);
    border-bottom-color: rgba(0, 0, 0, 0.06);
}
.bk-light .address-suggestion-item:hover,
.bk-light .address-suggestion-item.active {
    background: rgba(59, 130, 246, 0.08);
    color: var(--bk-text);
}
.bk-light .house-number-card {
    background: rgba(59, 130, 246, 0.05);
    border-color: rgba(59, 130, 246, 0.2);
}
.bk-light .address-suggestions-inline {
    border-top-color: rgba(0, 0, 0, 0.1);
}

.bk-light a {
    color: var(--bk-accent);
}
.bk-light a:hover {
    color: var(--bk-accent-hover);
}

/* Light toggle pills */
.bk-light .bk-toggle-btn {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.12);
    color: rgba(0, 0, 0, 0.55);
}
.bk-light .bk-toggle-btn:hover {
    border-color: var(--bk-accent);
    background: rgba(59, 130, 246, 0.04);
    color: var(--bk-text);
}
.bk-light .bk-toggle-btn.active {
    border-color: var(--bk-accent);
    background: var(--bk-accent);
    color: #ffffff;
}

/* Light checkbox cards */
.bk-light .bk-checkbox-card {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.12);
    color: rgba(0, 0, 0, 0.55);
}
.bk-light .bk-checkbox-card:hover {
    border-color: var(--bk-accent);
    color: var(--bk-text);
}
.bk-light .bk-checkbox-card.checked {
    border-color: var(--bk-accent);
    background: rgba(59, 130, 246, 0.06);
    color: var(--bk-text);
}
.bk-light .bk-checkbox-indicator {
    border-color: rgba(0, 0, 0, 0.2);
}
.bk-light .bk-checkbox-card.checked .bk-checkbox-indicator {
    background: var(--bk-accent);
    border-color: var(--bk-accent);
}

/* ============================================
   Widget Mode (floating popup via widget.js)
   ============================================ */
body.widget-mode {
    background: transparent !important;
}

body.widget-mode .booking-root {
    min-height: auto;
    padding: 0;
}

body.widget-mode .booking-container {
    padding: 16px 18px;
    border-radius: 0;
    max-width: none;
    border: none;
    box-shadow: none;
    background: transparent;
}

/* Hide top bar in widget mode — the widget popup has its own header */
body.widget-mode .booking-top-bar {
    display: none;
}

/* Compact header */
body.widget-mode .booking-header {
    margin-bottom: 8px !important;
}

body.widget-mode .booking-header h5 {
    font-size: 16px;
}

/* Compact panels */
body.widget-mode .booking-panel {
    padding: 14px;
    border-radius: 10px;
}

body.widget-mode .form-control,
body.widget-mode .form-select {
    padding: 10px 12px;
    font-size: 14px;
}

body.widget-mode .booking-section-title {
    font-size: 14px;
    margin-bottom: 10px;
}

/* Compact slot cards */
body.widget-mode .slot-card {
    padding: 10px 12px;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 540px) {
    .booking-container {
        padding: 28px 20px;
        border-radius: 16px;
    }
    .slots-grid {
        grid-template-columns: 1fr;
    }
    .booking-header h5 {
        font-size: 18px;
    }
}
