/* --- OPMAAK (CSS) --- */
body { 
    margin: 0; 
    padding: 0; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    background-color: #f0f2f5; 
    height: 100vh; 
    width: 100vw;
    overflow: hidden; 
    color: #333;
}

/* DE CONTAINER DIE ALLES BEELDVULLEND MAAKT */
#app-wrapper {
    width: 100vw;       
    height: 100vh;      
    margin: 0; 
    background: white;
    display: flex;
    flex-direction: column;
}

/* HOOFDBLOK MET KAART EN ZWEVENDE BALK */
#main-container { 
    position: relative; 
    display: block;     
    width: 100%;
    height: 100%; 
    min-height: 100%;
}

/* DE KAART */
#map { 
    width: 100%;
    height: 100%; 
    background-color: #e5e5e5; 
    z-index: 1; 
}

/* HET ZWEVENDE PANEEL (Logo + Stats + Lijst) */
#logo-container {
    position: absolute; 
    top: 20px;
    left: 20px;
    width: 320px;           
    background: rgba(255, 255, 255, 0.95); 
    padding: 20px;
    border-radius: 12px;     
    box-shadow: 0 5px 25px rgba(0,0,0,0.15); 
    z-index: 1000; 
    max-height: calc(100% - 60px); 
    overflow-y: auto;               
    display: flex;
    flex-direction: column;
}

#logo-container img {
    width: 60%;                 
    height: auto;
    display: block;
    margin: 0 auto 15px auto;            
}

/* Scrollbalk styling voor de zijbalk */
#logo-container::-webkit-scrollbar { width: 6px; }
#logo-container::-webkit-scrollbar-thumb { background-color: #ccc; border-radius: 3px; }

/* VERPLAATS DE ZOOMKNOPPEN NAAST HET PANEEL */
.leaflet-top.leaflet-left {
    left: 360px; 
}

/* --- STATISTIEKEN STIJL --- */
.province-stat { 
    margin-bottom: 8px; 
    padding: 8px; 
    background: white; 
    border-radius: 4px; 
    box-shadow: 0 1px 2px rgba(0,0,0,0.1); 
    cursor: pointer; 
    transition: background 0.2s; 
}
.province-stat:hover { background-color: #ffead9; }

.prov-header { 
    display: flex; 
    justify-content: space-between; 
    font-size: 0.9rem; 
    margin-bottom: 3px; 
    font-weight: 600; 
    color: #444; 
}
.progress-bar-bg { 
    background: #eee; 
    height: 8px; 
    border-radius: 4px; 
    overflow: hidden; 
    width: 100%;
}
.progress-bar-fill { 
    height: 100%; 
    width: 0%; 
    background-color: #FC4C02; 
    transition: width 1s ease-out; 
}

.total-stat { 
    font-size: 1.1rem; 
    text-align: center; 
    margin-bottom: 20px; 
    padding-bottom: 15px; 
    border-bottom: 1px solid #eee; 
}
.total-stat strong { display: block; font-size: 2rem; color: #FC4C02; }

/* --- HISTORIE / JAAR SLIDER (EXACTE TELEFOON LOOK OP DESKTOP) --- */
#time-slider-container {
    margin-bottom: 20px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #eee;
}

#year-label {
    font-size: 1.2em;
    font-weight: bold;
    color: #FC4C02;
}

#year-slider {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 100%;
    height: 10px;
    background: #003366 !important; /* Dwingend donkerblauw zoals op telefoon */
    border-radius: 5px;
    outline: none;
    margin-top: 15px;
}

/* Knopje voor Chrome, Safari, Edge */
#year-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    background: #FC4C02;
    border: 3px solid #ffffff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    margin-top: 0px; 
}

/* Knopje voor Firefox */
#year-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    background: #FC4C02;
    border: 3px solid #ffffff;
    border-radius: 50%;
    cursor: pointer;
}

/* Track voor Firefox */
#year-slider::-moz-range-track {
    background: #003366;
    height: 10px;
    border-radius: 5px;
}

/* --- LOADER STIJL --- */
#loader-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: white; z-index: 99999;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.loader-box { width: 300px; text-align: center; }
#loading-bar-container { width: 100%; height: 10px; background: #ddd; margin-top: 10px; border-radius: 5px; overflow: hidden; }
#loading-bar { height: 100%; width: 0%; background: #FC4C02; transition: width 0.3s; }

/* Verwijdert het blauwe/zwarte kader bij het klikken op een gemeente */
path.leaflet-interactive:focus {
    outline: none;
}

/* --- MOBIELE WEERGAVE --- */
@media (max-width: 768px) {
    body { height: auto !important; overflow-y: auto !important; }
    #app-wrapper { flex-direction: column; height: auto !important; }
    #main-container { height: auto !important; }
    #map { height: 50vh !important; width: 100%; min-height: 300px; }
    #logo-container {
        position: relative; top: auto; left: auto;
        width: 100% !important; height: auto !important;
        box-shadow: none; padding: 15px; box-sizing: border-box;
        overflow: visible !important;
    }
    #logo-container img { display: none !important; }
    #time-slider-container { order: -1; margin-bottom: 20px !important; }
    .leaflet-top.leaflet-left { left: 10px; }
}