/**
 * Compact Booking Search Header
 * Single-line, professional; lives below sticky bar (count + Map + Sort).
 * AVG · RANGE · Available in one row; dates + nights + guests compact.
 */

/* ==========================================================================
   Main Container - Inside sticky bar, slim
   ========================================================================== */

.booking-search-compact-header {
    padding: 0.5rem 0 0;
    margin-top: 0.25rem;
    border-top: 1px solid rgba(var(--primary-color-rgb, 12, 35, 64), 0.06);
}

.properties-sticky-bar .booking-search-compact-header {
    padding: 0.4rem 0 0;
    margin-top: 0.25rem;
}

.booking-compact-card {
    background: rgba(var(--primary-color-rgb, 12, 35, 64), 0.03);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    box-shadow: none;
    max-width: 100%;
    margin: 0;
    border: 1px solid rgba(var(--primary-color-rgb, 12, 35, 64), 0.06);
}

[data-theme="dark"] .booking-compact-card {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
    border-color: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   Single Row Layout - Everything on one line, compact
   ========================================================================== */

.booking-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ==========================================================================
   Dates Section - Inline, compact
   ========================================================================== */

.booking-dates-compact {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.date-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.6rem;
    background: rgba(var(--primary-color-rgb, 12, 35, 64), 0.04);
    border-radius: 6px;
    border: 1px solid rgba(var(--primary-color-rgb, 12, 35, 64), 0.08);
}

.date-item--inline {
    padding: 0.25rem 0.5rem;
    background: transparent;
    border: none;
}

.date-item i {
    font-size: 0.75rem;
    color: var(--primary-color, #0c2340);
    opacity: 0.7;
}

.date-value {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary, #111827);
    white-space: nowrap;
}

.date-separator {
    display: flex;
    align-items: center;
    color: var(--primary-color, #0c2340);
    opacity: 0.5;
}

.date-separator i {
    font-size: 0.7rem;
}

/* ==========================================================================
   Meta Section - Nights & Guests (inline)
   ========================================================================== */

.booking-meta-compact {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-left: 0.75rem;
    border-left: 1px solid rgba(var(--primary-color-rgb, 12, 35, 64), 0.1);
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-primary, #111827);
    white-space: nowrap;
}

.meta-item i {
    font-size: 0.75rem;
    color: var(--primary-color, #0c2340);
    opacity: 0.7;
}

/* ==========================================================================
   Stats Section - One row: Avg · Range · Available
   ========================================================================== */

.booking-stats-compact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-left: 0.75rem;
    border-left: 1px solid rgba(var(--primary-color-rgb, 12, 35, 64), 0.1);
    flex: 0 1 auto;
}

.stat-item {
    display: inline-flex;
    align-items: baseline;
    gap: 0.25rem;
    white-space: nowrap;
}

.stat-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-secondary, #6b7280);
    opacity: 0.8;
}

/* Full label on desktop, short on mobile */
.stat-label--short {
    display: none;
}

.stat-label--full {
    display: inline;
}

.stat-value {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--primary-color, #0c2340);
    white-space: nowrap;
}

.stat-avg .stat-value {
    color: var(--primary-color, #0c2340);
}

.stat-range .stat-value {
    color: #6366f1;
}

.stat-count .stat-value {
    color: var(--accent-color, #d4af37);
}

.stat-divider {
    width: 1px;
    height: 14px;
    background: rgba(var(--primary-color-rgb, 12, 35, 64), 0.12);
    margin: 0 0.15rem;
    flex-shrink: 0;
}

/* ==========================================================================
   Change Button - Icon Only, Compact
   ========================================================================== */

.btn-change-compact {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: 1px solid rgba(var(--primary-color-rgb, 12, 35, 64), 0.25);
    border-radius: 6px;
    color: var(--primary-color, #0c2340);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-change-compact i {
    font-size: 0.875rem;
}

.btn-change-compact:hover {
    background: var(--primary-color, #0c2340);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--primary-color-rgb, 12, 35, 64), 0.2);
}

.btn-change-compact:active {
    transform: translateY(0);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 1200px) {
    .booking-info-row {
        gap: 0.75rem;
    }

    .booking-stats-compact {
        gap: 0.4rem;
    }

    .stat-divider {
        height: 12px;
    }
}

@media (max-width: 992px) {
    .booking-compact-card {
        padding: 0.45rem 0.6rem;
    }

    .booking-info-row {
        gap: 0.6rem;
    }

    .booking-meta-compact {
        padding-left: 0.5rem;
    }

    .booking-stats-compact {
        padding-left: 0.5rem;
    }
}

/* ==========================================================================
   Mobile: ONE ROW, no wrap, compact — dates + nights + guests + Avg + Rng + Avail
   ========================================================================== */

@media (max-width: 768px) {
    .booking-search-compact-header {
        padding: 0.3rem 0 0;
    }

    .properties-sticky-bar .booking-search-compact-header {
        padding: 0.25rem 0 0;
    }

    .booking-compact-card {
        padding: 0.35rem 0.4rem;
        border-radius: 6px;
    }

    /* Force ONE row: no wrap, horizontal scroll if needed */
    .booking-info-row.booking-info-row--one-line {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 0.35rem;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        min-height: 28px;
    }

    .booking-info-row.booking-info-row--one-line::-webkit-scrollbar {
        display: none;
    }

    .booking-info-row.booking-info-row--one-line > * {
        flex-shrink: 0;
    }

    .booking-dates-compact {
        gap: 0.2rem;
        flex-shrink: 0;
    }

    .date-item,
    .date-item--inline {
        padding: 0.15rem 0.3rem;
    }

    .date-value {
        font-size: 0.7rem;
        font-weight: 600;
        color: var(--text-primary, #111827);
    }

    .date-item i {
        font-size: 0.65rem;
    }

    .date-separator i {
        font-size: 0.6rem;
    }

    .booking-meta-compact {
        padding-left: 0.35rem;
        gap: 0.35rem;
        border-left: 1px solid rgba(var(--primary-color-rgb, 12, 35, 64), 0.12);
        flex-shrink: 0;
    }

    .meta-item {
        font-size: 0.65rem;
    }

    .meta-item i {
        font-size: 0.6rem;
    }

    .booking-stats-compact {
        display: flex;
        flex-wrap: nowrap;
        gap: 0.25rem;
        padding-left: 0.35rem;
        border-left: 1px solid rgba(var(--primary-color-rgb, 12, 35, 64), 0.12);
        flex-shrink: 0;
    }

    .stat-item {
        flex-direction: row;
        align-items: baseline;
        gap: 0.15rem;
        padding: 0;
        background: transparent;
    }

    .stat-label--full {
        display: none !important;
    }

    .stat-label--short {
        display: inline !important;
    }

    .stat-label {
        font-size: 0.5625rem;
    }

    .stat-value {
        font-size: 0.65rem;
    }

    .stat-divider {
        height: 10px;
    }

    .btn-change-compact {
        width: 26px;
        height: 26px;
        margin-left: 0.15rem;
        flex-shrink: 0;
    }

    .btn-change-compact i {
        font-size: 0.65rem;
    }
}

@media (max-width: 480px) {
    .booking-compact-card {
        padding: 0.3rem 0.35rem;
    }

    .booking-info-row.booking-info-row--one-line {
        gap: 0.25rem;
    }

    .date-value {
        font-size: 0.65rem;
    }

    .meta-item {
        font-size: 0.6rem;
    }

    .stat-label {
        font-size: 0.5rem;
    }

    .stat-value {
        font-size: 0.6rem;
    }

    .btn-change-compact {
        width: 24px;
        height: 24px;
    }
}

/* ==========================================================================
   Dark Mode
   ========================================================================== */

[data-theme="dark"] .booking-search-compact-header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.01) 0%, transparent 100%);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .date-item {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .date-value,
[data-theme="dark"] .meta-item,
[data-theme="dark"] .stat-value {
    color: #f9fafb;
}

[data-theme="dark"] .date-item i,
[data-theme="dark"] .meta-item i,
[data-theme="dark"] .date-separator {
    color: #e9d38b;
}

[data-theme="dark"] .booking-meta-compact,
[data-theme="dark"] .booking-stats-compact {
    border-left-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .stat-divider {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .btn-change-compact {
    border-color: rgba(255, 255, 255, 0.3);
    color: #f9fafb;
}

[data-theme="dark"] .btn-change-compact:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] .meta-item,
[data-theme="dark"] .stat-item {
    background: rgba(255, 255, 255, 0.03);
}
