/* ==========================================================================
   DESKTOP MASTER FULL-FIT SIDEBAR STRUCTURAL SYSTEM
   ========================================================================== */
.pro-filter-container {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px 20px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.04);
    font-family: system-ui, -apple-system, sans-serif;
    color: #1f2937;
    position: sticky;
    top: 100px;
    
    /* Strict Viewport Fitting Constraints */
    height: calc(100vh - 140px);
    max-height: 850px;
    min-height: 450px;
    
    display: flex;
    flex-direction: column;
    z-index: 99;
    box-sizing: border-box;
}

.pro-filter-header {
    flex: 0 0 auto;
    margin-bottom: 18px;
}

.pro-filter-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: #111827;
}

.mobile-only-close {
    display: none;
}

/* Master Body Scrolling Wrapper Area */
.pro-filter-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding-right: 6px;
    display: flex;
    flex-direction: column;
}

/* Custom Minimalist Scrollbar formatting for scannable nested fields */
.pro-filter-body::-webkit-scrollbar,
.group-scroll-fit::-webkit-scrollbar {
    width: 5px;
}
.pro-filter-body::-webkit-scrollbar-track,
.group-scroll-fit::-webkit-scrollbar-track {
    background: transparent;
}
.pro-filter-body::-webkit-scrollbar-thumb,
.group-scroll-fit::-webkit-scrollbar-thumb {
    background: #e5e7eb;
    border-radius: 10px;
}
.pro-filter-body::-webkit-scrollbar-thumb:hover,
.group-scroll-fit::-webkit-scrollbar-thumb:hover {
    background: #d1d5db;
}

/* Section Isolation Grid Units */
.filter-group {
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 16px;
    margin-bottom: 16px;
    flex: 0 0 auto;
}

.filter-group:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.filter-group h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    color: #6b7280;
    margin: 0 0 12px 0;
}

/* Scroll Protection Wrappers for Filter Lists */
.group-scroll-fit {
    max-height: 160px;
    overflow-y: auto;
    padding-right: 4px;
}

.realtime-shortcode-wrapper {
    width: 100%;
}

.realtime-shortcode-wrapper form {
    margin: 0 !important;
    padding: 0 !important;
}

/* Action Control Items */
.filter-clear-action-block {
    margin-top: auto;
    padding-top: 15px;
    flex: 0 0 auto;
}

.clear-all-filters {
    display: block;
    text-align: center;
    font-size: 0.85rem;
    color: #ef4444;
    background: #fef2f2;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none !important;
    font-weight: 600;
    transition: all 0.2s ease;
}

.clear-all-filters:hover {
    background: #fee2e2;
    color: #dc2626;
}

#pro-filter-mobile-trigger {
    display: none;
}

/* Entry Animation Blocks */
.animated-fade-in {
    animation: filterPanelSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes filterPanelSlideUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   MOBILE BOTTOM RESPONSIVE DRAWER OVERRIDES
   ========================================================================== */
@media (max-width: 991px) {
    #pro-filter-mobile-trigger {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        background: #4f46e5;
        color: #ffffff;
        border: none;
        padding: 14px 32px;
        border-radius: 50px;
        font-weight: 600;
        font-size: 0.95rem;
        box-shadow: 0 10px 30px rgba(79, 70, 229, 0.45);
        z-index: 999999 !important;
        cursor: pointer;
        width: calc(100% - 40px);
        max-width: 340px;
    }
    
    .pro-filter-container {
        position: fixed;
        bottom: -120%;
        left: 0;
        width: 100%;
        height: 75vh;
        max-height: 75vh;
        z-index: 9999999 !important;
        border-radius: 24px 24px 0 0;
        background: #ffffff;
        padding: 24px 20px;
        box-shadow: 0 -12px 35px rgba(0, 0, 0, 0.15);
        transition: bottom 0.45s cubic-bezier(0.25, 1, 0.5, 1);
        top: auto;
    }
    
    .pro-filter-container.drawer-open {
        bottom: 0 !important;
    }
    
    .pro-filter-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-bottom: 12px;
        border-bottom: 2px solid #f3f4f6;
        margin-bottom: 16px;
    }
    
    .mobile-only-close {
        display: block;
        background: #f3f4f6;
        border: none;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        font-size: 1.4rem;
        font-weight: 300;
        line-height: 34px;
        color: #4b5563;
        cursor: pointer;
        padding: 0;
    }
    
    .group-scroll-fit {
        max-height: none;
        overflow-y: visible;
    }
} 