* {
box-sizing: border-box;
margin: 0;
padding: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    display: flex;
    height: 100vh;
    background-color: #121212;
    color: #ffffff;
    overflow: hidden;
}

.hidden {
    display: none !important;
}

/* ==========================================
 *  LOGIN SCHERM
 *  ========================================== */
#login-screen {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background: #121212;
display: flex;
justify-content: center;
align-items: center;
z-index: 9999;
}

.login-box {
    background: #1e1e1e;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    text-align: center;
    width: 300px;
}

.login-box input {
    width: 100%;
    padding: 10px;
    margin: 15px 0;
    background: #2b2b2b;
    border: 1px solid #444;
    color: #fff;
    border-radius: 4px;
}

.login-box button {
    width: 100%;
    padding: 10px;
    background: #00bcd4;
    border: none;
    color: #fff;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
}

/* ==========================================
 *  SIDEBAR & LAYOUT
 *  ========================================== */
#sidebar {
width: 360px;
background: #1e1e1e;
display: flex;
flex-direction: column;
border-right: 1px solid #2d2d2d;
z-index: 1000;
transition: transform 0.3s ease;
}

#map {
flex: 1;
height: 100vh;
background: #242424;
}

.sidebar-header {
    padding: 20px;
    background: #252525;
    border-bottom: 1px solid #333;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* ==========================================
 *  FORMULIEREN EN KNOPPEN
 *  ========================================== */
input, select, textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    background: #2b2b2b;
    border: 1px solid #444;
    color: #fff;
    border-radius: 4px;
}

button {
    background: #00bcd4;
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}

button:hover {
    background: #00acc1;
}

.btn-secondary {
    background: #424242;
}

.btn-secondary:hover {
    background: #525252;
}

/* ==========================================
 *  PROJECTENLIJST (REIZEN OVERZICHT)
 *  ========================================== */
.project-card {
    background: #2b2b2b;
    padding: 12px 14px;
    border-radius: 6px;
    margin-bottom: 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #333;
    transition: background 0.15s;
}

.project-card:hover {
    background: #333;
}

.btn-edit-project {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 4px;
    font-size: 14px;
    border-radius: 4px;
}

.btn-edit-project:hover {
    background: #444;
}

/* ==========================================
 *  LOCATIES IN SIDEBAR
 *  ========================================== */
.location-item {
    background: #2b2b2b;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.location-info {
    flex: 1;
    cursor: pointer;
}

.location-actions {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.location-actions button {
    padding: 2px 6px;
    font-size: 10px;
    background: #444;
}

.btn-delete {
    background: #d32f2f;
    padding: 5px 8px;
    font-size: 12px;
}

.btn-delete:hover {
    background: #f44336;
}

/* ==========================================
 *  INKLAPBAAR OPTIES PANEEL
 *  ========================================== */
#inklapbare-opties {
transition: all 0.3s ease;
}

#inklapbare-opties.ingeklapt {
display: none;
}

/* Scrollbox voor route-resultaten */
#routeResultaatContainer {
max-height: 250px !important;
overflow-y: auto !important;
-webkit-overflow-scrolling: touch !important;
margin-top: 10px !important;
border: 1px solid #444 !important;
background: #111 !important;
}

#sidebar-toggle {
display: none;
}

/* ==========================================
 *  MOBIELE LAYOUT & MENUKNOP FIXES
 *  ========================================== */
@media (max-width: 768px) {
    body {
        display: block !important;
        height: auto !important;
        overflow: auto !important;
    }

    #map {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    }

    #sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 85% !important;
    max-width: 320px !important;
    height: 100% !important;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1001 !important;
    display: flex !important;
    flex-direction: column !important;
    background: #181818 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 40px !important;
    }

    #sidebar.active {
    transform: translateX(0) !important;
    }

    .sidebar-header {
        padding-left: 65px !important;
        padding-top: 15px;
        padding-right: 15px;
        padding-bottom: 10px;
        flex-shrink: 0;
    }

    .sidebar-content {
        flex: 1 !important;
        height: auto !important;
        max-height: none !important;
        overflow-y: visible !important;
        padding: 15px !important;
    }

    #routeResultaatContainer {
    max-height: 150px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    margin-top: 10px !important;
    border: 1px solid #444 !important;
    background: #111 !important;
    }

    #sidebar-toggle {
    display: flex !important;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1005 !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #1e1e1e;
    color: #fff;
    border: 1px solid #444;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
    font-size: 10px;
    line-height: 1.1;
    }

    #sidebar-toggle .menu-icon {
    font-size: 18px;
    margin-bottom: 2px;
    }

    .leaflet-control-zoom {
        display: none !important;
    }
}

/* ==========================================
 *  POI / BIBLIOTHEEK / FOTO TOGGLES & SWITCHES
 *  ========================================== */
.poi-toggle-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #2b2b2b;
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    border: 1px solid #333;
}

.poi-toggle-label {
    font-size: 13px;
    font-weight: 500;
    color: #ddd;
}

/* De Schakelaar (Switch) */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #444;
    transition: .3s;
    border-radius: 22px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #00bcd4;
}

input:checked + .slider:before {
    transform: translateX(22px);
}

/* ==========================================
 *  IMMICH FOTO MARKERS & CLUSTER WEERGAVE
 *  ========================================== */
.immich-photo-pin {
    background-color: #00bcd4;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
}

.immich-custom-cluster {
    background: transparent;
    border: none;
}

.immich-cluster-icon {
    background-color: #00bcd4;
    color: #fff;
    font-weight: bold;
    border-radius: 50%;
    border: 3px solid #ffffff;
    box-shadow: 0 3px 8px rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.immich-cluster-icon:hover {
    transform: scale(1.1);
    background-color: #00acc1;
}

.immich-thumb-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
    border: 2px solid transparent;
}

.immich-thumb-img:hover {
    transform: scale(1.03);
    border-color: #00bcd4;
}

/* ==========================================
 *  VERKEN-MODAL (bibliotheek → reis)
 *  ========================================== */
#verken-modal {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
height: 100dvh; /* Voor mobiele browsers met adresbalk */
background: rgba(0, 0, 0, 0.8);
display: none;
justify-content: center;
align-items: center;
z-index: 9999;
padding: 10px;
}

/* De container van het pop-up venster */
#verken-modal > div,
.verken-modal-content {
    background: #1e1e24;
    border-radius: 10px;
    width: 100%;
    max-width: 620px;
    height: 92vh;
    height: 92dvh;
    max-height: 92dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.7);
    border: 1px solid #333;
}

/* Categorie chips: veegbare strook op mobiel */
#verken-chips {
display: flex;
flex-wrap: nowrap;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
gap: 6px;
padding: 4px 2px 8px 2px;
margin-bottom: 6px;
scrollbar-width: thin;
}

#verken-chips::-webkit-scrollbar {
height: 4px;
}

#verken-chips::-webkit-scrollbar-thumb {
background: #444;
border-radius: 2px;
}

.verken-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 14px;
    border: 1px solid #444;
    background: #2b2b3d;
    color: #ccc;
    font-size: 12px;
    cursor: pointer;
    user-select: none;
    flex-shrink: 0; /* Voorkomt dat chips platgedrukt worden */
    transition: background 0.15s, border-color 0.15s;
}

.verken-chip:hover {
    border-color: #6c5ce7;
}

.verken-chip-actief {
    background: #6c5ce7;
    border-color: #6c5ce7;
    color: #fff;
    font-weight: bold;
}

/* HIER ZIT DE SCROLL-FIX VOOR MOBIEL */
#verken-lijst {
flex: 1 1 auto;
overflow-y: auto !important;
-webkit-overflow-scrolling: touch !important;
overscroll-behavior: contain;
padding-right: 4px;
min-height: 150px;
}

.verken-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid #26262f;
    cursor: pointer;
    transition: background 0.1s;
}

.verken-item:hover {
    background: #22222e;
}

.verken-item .verken-check {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    accent-color: #6c5ce7;
    cursor: pointer;
    flex: 0 0 auto;
}

.verken-item-info {
    flex: 1;
    font-size: 13px;
    color: #fff;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

/* Bibliotheek Marker op de kaart */
.custom-bibliotheek-marker {
    background-color: transparent;
    border: none;
}

/* Landen Combobox */
.land-combobox-wrapper {
    position: relative;
    width: 100%;
}

.land-combobox-dropdown {
    scrollbar-width: thin;
    scrollbar-color: #555 #1e1e1e;
}

.land-combobox-dropdown::-webkit-scrollbar {
    width: 6px;
}

.land-combobox-dropdown::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 3px;
}

.land-combobox-item:hover {
    background-color: #2b2b2b;
}

/* ========================================================
 *  SLANKE COMPACTE WEERGAVE VOOR VERKEN-MODAL OP TELEFOONS
 *  ======================================================== */
@media (max-width: 600px) {
    /* 1. Modal venster vult het hele scherm met minimale randen */
    #verken-modal {
    padding: 4px !important;
    }

    #verken-modal > div,
    .verken-modal-content {
        height: 98vh !important;
        height: 98dvh !important;
        max-height: 98dvh !important;
        border-radius: 6px !important;
    }

    /* 2. Maak alle dropdowns en zoekbalken compacter */
    #verken-modal input,
    #verken-modal select {
    padding: 5px 8px !important;
    margin-bottom: 4px !important;
    font-size: 12px !important;
    height: 32px !important;
    }

    #verken-modal button {
    padding: 6px 10px !important;
    font-size: 12px !important;
    }

    /* 3. BELANGRIJK: Categorieën dwingen op 1 veegbare horizontale regel */
    /* (Dit bespaart direct 150 tot 200 pixels aan schermhoogte!) */
    #verken-chips {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 4px !important;
    padding: 2px 0 6px 0 !important;
    margin-bottom: 4px !important;
    }

    .verken-chip {
        flex-shrink: 0 !important;
        padding: 3px 8px !important;
        font-size: 11px !important;
        border-radius: 10px !important;
    }

    /* 4. Ruimte voor knoppen "Dichtbij mij" en "Afstand" compacter */
    #verken-modal .dichtbij-wrapper,
    #verken-modal div[style*="display: flex"] {
    gap: 4px !important;
    margin-bottom: 4px !important;
    }

    /* 5. Garandeer dat de lijst de maximale vrije ruimte pakt */
    #verken-lijst {
    flex: 1 1 auto !important;
    min-height: 200px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    }
}

/* ========================================================
 *  VOORKOM UITKLAPPEN VAN CATEGORIE-CHIPS
 *  ======================================================== */
#verken-chips {
display: flex !important;
flex-direction: row !important;
flex-wrap: nowrap !important;
white-space: nowrap !important;
overflow-x: auto !important;
overflow-y: hidden !important;
height: 42px !important;
max-height: 42px !important;
min-height: 42px !important;
width: 100% !important;
-webkit-overflow-scrolling: touch !important;
margin-bottom: 6px !important;
padding: 2px 0 6px 0 !important;
}

.verken-chip {
    display: inline-flex !important;
    align-items: center !important;
    flex: 0 0 auto !important; /* Mag nooit krimpen en nooit naar een nieuwe regel springen */
    height: 32px !important;
    margin-right: 4px !important;
}
