/* css/components/filters.css */

/* Standaard stijlen voor de filter elementen */
.filters-container {
    /* Compacte stijl voor in de navbar */
    padding: 2px 0; /* Verminderd van 5px naar 2px verticaal */
    margin-bottom: 0; 
    background-color: transparent; 
    border: none;
    border-radius: 0;
    box-shadow: none;
    
    display: flex;
    gap: 15px; 
    flex-wrap: nowrap; 
    align-items: center;
    overflow-x: auto; 
    scrollbar-width: none; 
    width: 100%;
}
.filters-container #filter-form {
    display: flex;
    gap: 20px;
    width: 100%;
}
.filters-container::-webkit-scrollbar {
    display: none; 
}
.filter-group {
    display: flex;
    flex-direction: row; 
    align-items: center;
    min-width: unset; 
    gap: 5px; 
    flex-shrink: 0; 
    color: #76ff03; 
    font-size: 0.9em;
}
.filter-group label {
    font-weight: normal; 
    margin-bottom: 0;
    font-size: 0.9em;
    color: #76ff03; 
    white-space: nowrap; 
}
.filter-group select,
.filter-group input[type="range"] {
    background-color: #222;
    border: 1px solid #76ff03; 
    border-radius: 4px;
    font-size: 0.85em; 
    height: 25px; 
    color: white;
    accent-color: #76ff03; 
}
.range-container {
    display: flex;
    align-items: center;
    gap: 5px; 
}
#distance-value {
    font-weight: 600;
    color: #76ff03;
    min-width: 25px; 
    text-align: left;
    white-space: nowrap;
}

/* ===============================
   NIEUWE STIJL FILTER KNOP & TOGGLE LOGICA
   =============================== */

/* 🔹 Styling voor de Filter Toggle Button (Vierkant, discreet icoon) */
.filter-toggle-button {
    background-color: transparent;
    color: #76ff03; 
    border: 1px solid #76ff03; 
    padding: 0; 
    width: 38px; 
    height: 38px; 
    min-width: unset; 
    min-height: unset; 
    font-size: 1.2rem;
    border-radius: 8px; 
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    margin-left: 10px;
}

.filter-toggle-button:hover {
    background-color: rgba(118, 255, 3, 0.1);
}

/* 📌 Toggle logica voor #filters-collapsible (Standaard verborgen voor mobiel) */
#filters-collapsible {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out, padding 0.3s ease-in-out; 
}

#filters-collapsible.show-filters {
    max-height: 200px; /* Voldoende hoogte om de inhoud te tonen op mobiel */
}


/* === MEDIA QUERIES === */

/* Mobiele/Tablet Layout (≤ 767px) */
@media (max-width: 767px) {
    
    /* 1. Knoop stijl/zichtbaarheid (Toon op mobiel) */
    .filter-toggle-button {
        display: flex; 
        width: 35px; 
        height: 35px;
        font-size: 1.1rem;
        margin-right: 0;
    }
    
    /* 2. Zorg dat de zoekbalk de overige ruimte inneemt */
    .search-bar {
        flex-grow: 1;
        margin-right: 5px;
    }
    
    /* 3. Mobiele padding/visuele aanpassingen bij tonen */
    #filters-collapsible {
        padding: 0 15px; 
    }

    #filters-collapsible.show-filters {
        padding: 10px 15px;
        border-top: 1px solid rgba(118, 255, 3, 0.1); 
    }
    
    /* 4. Filters onder elkaar op mobiel */
    .filters-container, .filters-container #filter-form {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .filter-group {
        width: 100%;
        justify-content: space-between;
    }
    
    .filter-group select, .filter-group input[type="range"] {
        max-width: 60%;
    }
}


/* Desktop Layout (≥ 768px) */
@media (min-width: 768px) {
    /* 📌 CORRECTION: Forceer de filters ALTIJD ZICHTBAAR op Desktop */
    #filters-collapsible {
        max-height: none !important; 
        overflow: visible !important;
        padding: 10px 0 !important; 
        transition: none !important; 
    }

    #filters-collapsible.show-filters {
        /* Overschrijf voor de zekerheid */
        max-height: none !important;
        padding: 10px 0 !important;
    }

    /* Verberg de filterknop op desktop, want de filters zijn al zichtbaar */
    .filter-toggle-button {
        display: none;
    }
    
    /* Filters op een rij op desktop */
    .filters-container, .filters-container #filter-form {
        flex-direction: row;
        align-items: center;
    }
}