/* ==================== AIRBNB STYLE UI UPDATES ==================== */

/* Filter Toggle Button */
.filter-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(20, 10, 40, 0.6);
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-toggle-btn:hover {
    background: rgba(1, 205, 254, 0.1);
    box-shadow: 0 0 10px rgba(1, 205, 254, 0.3);
}

/* Filter Modal Overlay */
.filter-modal-overlay {
    position: absolute;
    top: 60px;
    /* Below header */
    left: 10px;
    right: 10px;
    bottom: 10px;
    background: rgba(10, 5, 20, 0.85);
    backdrop-filter: blur(8px);
    z-index: 100;
    justify-content: center;
    align-items: flex-start;
    padding-top: 1rem;
    border-radius: 12px;
    animation: fadeIn 0.2s ease-out;
    border: 1px solid rgba(255, 113, 206, 0.3);
    overflow: hidden;
}

.filter-modal-content {
    background: rgba(20, 10, 40, 0.95);
    width: 90%;
    max-width: 400px;
    border-radius: 16px;
    border: 1px solid var(--neon-purple);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    max-height: 90%;
    margin: 0 auto;
}

.filter-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-modal-header h3 {
    margin: 0;
    color: white;
    font-family: 'Exo 2', sans-serif;
}

.close-modal-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.filter-modal-body {
    padding: 1rem;
    overflow-y: auto;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group label {
    display: block;
    color: var(--neon-cyan);
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Modal Grid for Chips */
.filter-chips-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-modal-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.filter-modal-footer .primary-btn {
    flex: 1;
    padding: 0.6rem;
}

.filter-modal-footer .secondary-btn {
    flex: 2;
    padding: 0.6rem;
}

/* Tweaks for filter chips inside modal to look better */
.filter-modal-body .filter-chip {
    flex-grow: 0;
    width: auto;
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    height: auto;
}

/* Ensure full width select in modal */
.full-width {
    width: 100%;
}

.full-width select {
    width: 100%;
}

/* Performance Optimization */
.exhibition-card {
    content-visibility: auto;
    /* Browser optimization for off-screen rendering */
    contain-intrinsic-size: 120px 300px;
    /* Estimate size to prevent scrollbar jumping */
}

/* Hide detail view by default */
#detailView {
    z-index: 5;
    /* Above list */
}

/* Mobile filter modal - full screen overlay */
@media (max-width: 768px) {
    .filter-modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 3000;
        border-radius: 0;
        padding: 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .filter-modal-content {
        max-height: 80vh;
        width: 95%;
        max-width: 350px;
    }
}