/* =============================================================================
   GALLERY HUB (gallery.html) - Phase 13
   ============================================================================= 
   PAGE-SPECIFIC layout only, prefixed "gal-" per rules.txt Section 2. All
   visual components (search, filters, masonry grid, album cards, empty
   state, load more) come from event-components.css / event-discovery-
   components.css (Phase 3/5) - this file only positions them. No colors/
   radii/shadows/typography redefined here.
   ============================================================================= */

#gal-page {
    background: var(--white);
}

.gal-intro {
    padding: 44px 0 24px;
    text-align: center;
    border-bottom: 1px solid var(--border-light, #e2e8f0);
}

.gal-discovery-sec {
    padding: 44px 0 72px;
}

/* =========================
   FILTER BAR LAYOUT & STICKY
   ========================= */
#gal-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-light, #e2e8f0);
    border-radius: 14px;
    padding: 12px 18px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 80px;
    z-index: 20;
    transition: all 0.3s ease;
}

#gal-filter-bar .gal-filters-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 auto;
    max-width: 600px;
}

#gal-filter-bar #gal-search {
    flex: 1 1 280px;
    max-width: 380px;
    min-width: 200px;
}

#gal-filter-bar #gal-filter-event {
    flex: 0 0 auto;
    min-width: 170px;
    max-width: 240px;
}

#gal-filter-bar .gal-filters-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

#gal-filter-bar .eds-filter-select {
    min-width: 140px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark, #1e293b);
    background-color: var(--bg-light, #f8fafc);
    border: 1px solid var(--border-light, #e2e8f0);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

#gal-filter-bar .eds-filter-select:hover,
#gal-filter-bar .eds-filter-select:focus {
    border-color: var(--primary-red, #dc2626);
    background-color: #fff;
    outline: none;
}

#gal-filter-bar .eds-filter-select.eds-filter-select--active {
    border-color: var(--primary-red, #dc2626);
    background-color: #fff1f2;
    color: var(--primary-red, #dc2626);
    font-weight: 600;
}

#gal-filter-bar .eds-filter-clear {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--primary-red, #dc2626);
    background: transparent;
    border: 1px solid var(--primary-red, #dc2626);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

#gal-filter-bar .eds-filter-clear:hover {
    background: var(--primary-red, #dc2626);
    color: #ffffff;
}

#gal-filter-bar.eds-filter-bar--has-active .eds-filter-clear {
    display: inline-flex;
}

/* =========================
   MOBILE TRIGGER & DRAWER
   ========================= */
#gal-mobile-filter-btn {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: #ffffff;
    border: 1.5px solid var(--border-light, #e2e8f0);
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-dark, #0f172a);
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    white-space: nowrap;
}

#gal-mobile-filter-btn:hover {
    border-color: var(--primary-red, #dc2626);
    color: var(--primary-red, #dc2626);
}

#gal-mobile-filter-btn.has-active {
    border-color: var(--primary-red, #dc2626);
    background: #fef2f2;
    color: var(--primary-red, #dc2626);
}

#gal-mobile-filter-btn .eds-filter-count-badge {
    background: var(--primary-red, #dc2626);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 12px;
}

.gal-drawer-backdrop {
    display: none;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(15, 23, 42, 0.65) !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
    z-index: 999990 !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.gal-drawer-backdrop.is-open {
    display: block !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.gal-filter-drawer-wrap {
    display: none;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: 85vh !important;
    background: #ffffff !important;
    border-radius: 20px 20px 0 0 !important;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25) !important;
    z-index: 999999 !important;
    transform: translateY(105%) !important;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.gal-filter-drawer-wrap.is-open {
    display: flex !important;
    transform: translateY(0) !important;
}

.gal-drawer-handle {
    width: 40px;
    height: 4px;
    background: #cbd5e1;
    border-radius: 2px;
    margin: 12px auto 6px;
}

.gal-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px 14px;
    border-bottom: 1px solid #f1f5f9;
}

.gal-drawer-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gal-drawer-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.gal-drawer-close {
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
    font-size: 14px;
}

.gal-drawer-body {
    padding: 18px 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
}

.gal-drawer-body .eds-filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gal-drawer-body .eds-filter-label {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.gal-drawer-body .eds-filter-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 14px;
    background: #f8fafc;
}

.gal-drawer-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    border-top: 1px solid #f1f5f9;
    background: #f8fafc;
}

.gal-drawer-apply-btn {
    flex: 1;
    padding: 10px 20px;
    background: var(--primary-red, #dc2626);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
}

@media screen and (max-width: 991px) {
    #gal-filter-bar {
        position: relative !important;
        top: 0 !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 10px !important;
        padding: 10px 14px !important;
        border-radius: 12px !important;
    }

    .gal-desktop-only {
        display: none !important;
    }

    #gal-filter-bar .gal-filters-left {
        flex: 1 1 auto !important;
        max-width: none !important;
    }

    #gal-filter-bar #gal-search {
        width: 100% !important;
        max-width: none !important;
        flex: 1 1 auto !important;
    }

    #gal-mobile-filter-btn {
        display: inline-flex !important;
        flex: 0 0 auto !important;
    }
}

@media screen and (max-width: 768px) {
    .gal-intro {
        padding: 32px 0 20px;
        text-align: left;
    }

    .gal-discovery-sec {
        padding: 32px 0 48px;
    }
}
