:root {
    --color1: #ffffff;
    --color2: #333333;
    --color-hover: #ed1c24;
    --bg-color: #f5f5f5;
    --menu-bg: #ffffff;
    --border-color: #e0e0e0;
    --transition: all 0.3s ease-in-out;
    --icon-size: 1.25rem;
    --icon-color: #666666;
    --popup-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    --popup-bg: #ffffff;
    --popup-hover: rgba(237, 28, 36, 0.05);
    --popup-border: rgba(0, 0, 0, 0.05);
    --animation-timing: cubic-bezier(0.4, 0, 0.2, 1);
    --animation-duration: 0.3s;

}
.filter-popup {
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    overflow-y: auto;
    width: 280px;
    position: fixed;
    left: 15%;
    top: 63px;
    height: calc(100vh - 180px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    overflow: auto;
    padding: 10px;
    height: calc(100vh - 80px); /* Ajuster la hauteur pour laisser de l'espace pour le bouton */
    padding-bottom: 80px; /* Ajouter un padding en bas pour le bouton */
    
   
}

.filter-popup h3 {
    font-size: 1.25em;
    color: #1a1a1a;
  
    font-weight: 600;
    letter-spacing: -0.5px;
}

.locations-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.locations-list > li {
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.locations-list > li:hover {
    background: #f8f9fa;
    border-radius: 6px;
}

.location-name {
    font-size: 0.8em;
    color: #2c3e50;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.location-name:hover {
    color: #d1191f;
    background: rgba(0, 123, 255, 0.05);
}

.location-name.toggle::after {
    content: '▾';
    font-size: 1em;
    color: #6c757d;
    transition: transform 0.3s ease;
}

.location-name.toggle.collapsed::after {
    transform: rotate(-90deg);
}



/* Custom scrollbar for better UX */
.filter-popup::-webkit-scrollbar {
    width: 6px;
}

.filter-popup::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.filter-popup::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.filter-popup::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Add this to your existing CSS */
.bottom-popup-filter {
    position: fixed;
    bottom: 0;
    left: 15%;
    width: 270px;
    padding: 16px;
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 25%);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 1000;
}

.add-location-btn {
    width: 100%;
    padding: 12px;
    background: var(--color-hover);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
}

.add-location-btn:hover {
    background: #d1191f;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 123, 255, 0.3);
}

.add-location-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
}

.add-location-btn i {
    font-size: 1.2em;
}

/* Add padding to the locations list to prevent button overlap */
.locations-list {
    padding-bottom: 70px; /* Adjust based on button height */
}
.location-title{
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}
.location-title i{
    cursor: pointer;
    font-size: 1.5em;
}

.filter-trigger {
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.filter-trigger:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.filter-trigger.active {
    background-color: rgba(0, 0, 0, 0.1);
    color: #007bff;
}

.filter-popup {
    display: none;
    /* animation: fadeInFilter 0.3s ease; */
}

@keyframes fadeInFilter {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.location-name.toggle {
    position: relative;
    padding-right: 24px;
}

.location-name.toggle::after {
    content: '\25BE'; /* Unicode pour le chevron vers le bas */
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
    font-size: 14px;
}

.location-name.toggle.collapsed::after {
    transform: translateY(-50%) rotate(-90deg);
}

