/* =============================================================================
   JoomBook Booking Wizard Styles
   CSS custom properties allow color scheme overrides via inline style on
   .joombook-wizard (set by the module template from admin settings).
   ============================================================================= */

.joombook-wizard {
    /* Fallback values – overridden by inline style from WizardHelper::getColorSchemeVars() */
    --jb-sidebar-bg:        #1e2a3b;
    --jb-sidebar-text:      #ffffff;
    --jb-sidebar-muted:     rgba(255, 255, 255, 0.55);
    --jb-accent:            #0d6efd;
    --jb-done-bg:             #198754;
    --jb-done-text:           #ffffff;
    --jb-current-bullet-bg:   #0d6efd;
    --jb-current-bullet-text: #ffffff;
    --jb-bullet-bg:           rgba(255, 255, 255, 0.14);
    --jb-current-item-bg:     rgba(255, 255, 255, 0.12);
    --jb-content-bg:        #ffffff;
    --jb-border-color:      #dee2e6;

    font-family: inherit;
    max-width: 1200px;
    margin: 0 auto;
}

.joombook-wizard * {
    font-family: inherit;
}

/* =============================================================================
   Two-column layout
   ============================================================================= */

.joombook-layout {
    display: flex;
    min-height: 440px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.10);
    border: 1px solid var(--jb-border-color);
}

/* =============================================================================
   Sidebar
   ============================================================================= */

.joombook-sidebar {
    width: 260px;
    min-width: 260px;
    background: var(--jb-sidebar-bg);
    color: var(--jb-sidebar-text);
    padding: 1.75rem 1rem;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.joombook-steps-nav {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.joombook-step-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.55rem 0.6rem;
    border-radius: 7px;
    transition: background 0.2s;
}

.joombook-step-item.is-current {
    background: var(--jb-current-item-bg);
}

.joombook-step-item.is-upcoming .joombook-step-label,
.joombook-step-item.is-upcoming .joombook-step-value,
.joombook-step-item.is-upcoming .joombook-step-bullet {
    color: var(--jb-sidebar-muted);
}

.joombook-step-bullet {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    background: var(--jb-bullet-bg, rgba(255, 255, 255, 0.14));
    color: var(--jb-sidebar-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
    transition: background 0.2s, color 0.2s;
}

.joombook-step-item.is-current .joombook-step-bullet {
    background: var(--jb-current-bullet-bg);
    color: var(--jb-current-bullet-text, #ffffff);
}

.joombook-step-item.is-done .joombook-step-bullet {
    background: var(--jb-done-bg);
    color: var(--jb-done-text);
}

.joombook-step-info {
    min-width: 0;
    padding-top: 3px;
}

.joombook-step-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--jb-sidebar-text);
    line-height: 1.3;
}

.joombook-step-value {
    font-size: 0.78rem;
    color: var(--jb-sidebar-muted);
    margin-top: 2px;
    line-height: 1.3;
    word-break: break-word;
}

/* =============================================================================
   Main content area
   ============================================================================= */

.joombook-content {
    flex: 1;
    min-width: 0;
    background: var(--jb-content-bg);
    padding: 1.75rem 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--jb-border-color);
}

.joombook-content-steps {
    flex: 1;
}

/* =============================================================================
   Unified navigation bar (always at the bottom of .joombook-content)
   ============================================================================= */

.joombook-nav-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--jb-border-color);
}

/* =============================================================================
   Service color swatch
   ============================================================================= */

.joombook-svc-color {
    width: 10px;
    min-width: 10px;
    height: 100%;
    min-height: 40px;
    border-radius: 4px;
}

/* =============================================================================
   Mini calendar
   ============================================================================= */

.joombook-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.joombook-cal-header {
    text-align: center;
    font-size: .75rem;
    font-weight: 600;
    color: #6c757d;
    padding-bottom: 4px;
}

.joombook-cal-empty {
    aspect-ratio: 1;
}

.joombook-cal-day {
    aspect-ratio: 1;
    border: none;
    border-radius: 50%;
    background: transparent;
    font-size: .85rem;
    cursor: pointer;
    transition: background .15s, color .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.joombook-cal-day.has-slots {
    background: #e7f1ff;
    color: var(--bs-primary, #0d6efd);
    font-weight: 600;
}

.joombook-cal-day.has-slots:hover {
    background: var(--bs-primary, #0d6efd);
    color: #fff;
}

.joombook-cal-day.is-selected {
    background: var(--bs-primary, #0d6efd);
    color: #fff;
}

.joombook-cal-day.is-past,
.joombook-cal-day.no-slots {
    color: #ced4da;
    cursor: default;
}

/* =============================================================================
   Loading spinner
   ============================================================================= */

.joombook-loading {
    min-height: 80px;
}

/* =============================================================================
   Responsive – sidebar becomes a horizontal strip above content
   on phone and tablet portrait; two-column only on landscape tablet+
   ============================================================================= */

/* Stacked layout: phone + tablet portrait (< 1024px) */
@media (max-width: 1023px) {
    .joombook-layout {
        flex-direction: column;
        min-height: 0;
    }

    .joombook-sidebar {
        width: 100%;
        min-width: 0;
        padding: 0.75rem 1rem 0.6rem;
    }

    .joombook-steps-nav {
        flex-direction: row;
        justify-content: space-between;
        gap: 0.25rem;
    }

    .joombook-step-item {
        flex-direction: column;
        align-items: center;
        gap: 0.2rem;
        padding: 0.4rem 0.3rem;
        flex: 1;
    }

    .joombook-step-bullet {
        width: 26px;
        height: 26px;
        min-width: 26px;
        font-size: 0.75rem;
    }

    .joombook-step-label {
        font-size: 0.7rem;
        text-align: center;
        white-space: normal;
    }

    .joombook-step-value {
        display: none;
    }

    .joombook-content {
        border-left: 1px solid var(--jb-border-color);
        border-top: none;
        padding: 1.25rem 1rem 1rem;
    }
}

/* Extra-compact on small phones */
@media (max-width: 480px) {
    .joombook-sidebar {
        padding: 0.6rem 0.5rem 0.4rem;
    }

    .joombook-step-item {
        padding: 0.25rem 0.15rem;
    }

    .joombook-step-bullet {
        width: 22px;
        height: 22px;
        min-width: 22px;
        font-size: 0.65rem;
    }

    .joombook-step-label {
        font-size: 0.58rem;
    }
}

/* =============================================================================
   Booking summary card (step: confirm)
   ============================================================================= */

.jb-summary-card {
    border: 1px solid var(--jb-border-color, #dee2e6);
    border-radius: 8px;
    overflow: hidden;
}

.jb-summary-row {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    padding: 0.7rem 1.25rem;
    border-bottom: 1px solid var(--jb-border-color, #dee2e6);
}

.jb-summary-label {
    flex: 0 0 36%;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--jb-label-color, #1e2a3b);
}

.jb-summary-value {
    flex: 1;
    font-weight: 600;
    color: #212529;
    font-size: 0.92rem;
}

.jb-payment-list {
    list-style: disc;
    margin: 0;
    padding-left: 1.1rem;
}

.jb-payment-list li {
    padding: 0;
    line-height: 1.6;
}

.jb-summary-sub {
    font-weight: 400;
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 2px;
}

.jb-summary-total {
    background: #f8f9fa;
}

.jb-summary-total .jb-summary-label {
    color: #212529;
    font-weight: 700;
}

.jb-summary-total .jb-summary-value {
    font-size: 1rem;
}

/* Powered-by branding strip */
.joombook-branding {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    margin-top: 1.25rem;
    font-size: 0.7rem;
    color: #9ca3af;
}
.joombook-branding img {
    opacity: 0.55;
    vertical-align: middle;
    filter: grayscale(30%);
}
.joombook-branding a {
    color: #0082bf;
    text-decoration: none;
}
.joombook-branding a:hover {
    text-decoration: underline;
}
