/* --- COOKIE BANNER STYLING --- */

#cookie-consent-banner {
    display: none; /* Standaard verborgen */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: #ffffff;
    border-top: 1px solid #e0e0e0;
    z-index: 99999;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.05);
    transform: translateY(100%); /* Voor slide-up animatie */
    transition: transform 0.3s ease-out;
    max-width: 710px;
    margin: auto;
}

#cookie-consent-banner.show {
    display: block;
    transform: translateY(0);
}

#cookie-consent-banner p {
    margin: 0 0 15px 0;
    color: #333;
}
.cookie-buttons {
    display: flex;
    justify-content: center; /* FIX: Centreert de knoppen */
}

.cookie-button {
    padding: 10px 15px;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.3s;
    margin-right: 10px; /* Geeft ruimte tussen knoppen */
}

/* 1. Alles toestaan / Voorkeuren opslaan (Primaire kleur) */
.cookie-button.primary {
    background: #007bff;
    color: white;
}

.cookie-button.primary:hover {
    background: #0056b3;
}

/* 2. Weigeren / Annuleren (Secundaire kleur) */
.cookie-button.secondary {
    background: #6c757d;
    color: white;
}

.cookie-button.secondary:hover {
    background: #5a6268;
}

/* 3. Voorkeuren instellen (Neutrale kleur) */
.cookie-button.neutral {
    background: #f0f0f0; /* Lichtgrijs */
    color: #333;
    border: 1px solid #ccc;
}

.cookie-button.neutral:hover {
    background: #e0e0e0;
}
/* --- MODAL BACKDROP & CONTENT --- */

.modal-backdrop {
    display: none; /* Juist: Standaard verborgen */
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    /* De JS zorgt voor display: flex; bij het tonen */
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fefefe;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.modal-content h2 {
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-top: 0;
}
@media (max-width: 576px) {
    .modal-content h2 {
        font-size: 1.2rem;
    }
}
.modal-actions {
    display: flex;
    justify-content: center;
    margin-top: 25px;
}

/* --- COOKIE CATEGORIE STYLING (FIXES VOOR KLIKBAARHEID) --- */

.cookie-category {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
}

.cookie-category-label {
    display: flex;
    flex-direction: column; /* Stapel H3 en de rij eronder verticaal */
    width: 100%;
    cursor: pointer;
}

.cookie-options-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 5px; /* Geef wat ruimte onder de H3 */
}

.cookie-text-content {
    /* Laat de paragraaf-tekst alle beschikbare horizontale ruimte innemen */
    flex-grow: 1;
    flex-basis: 0;
    padding-right: 10px;
    max-width: none; /* Verwijdert alle breedtebeperkingen */
}

.cookie-category h3 {
    margin: 0 0 5px 0; /* Alleen ruimte onder de kop */
    font-size: 1.1em;
    width: 100%; /* Zorgt dat de kop de volledige label breedte pakt */
}

.cookie-category p {
    margin: 0;
    font-size: 0.9em;
    color: #666;
}

.required-tag {
    font-size: 0.8em;
    font-weight: bold;
    color: #cc0000; /* Rood of oranje om op te vallen */
    background: #ffe0e0;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 10px;
    vertical-align: middle;
}

.cookie-category-label.essential {
    cursor: default; /* Haalt de pointer cursor weg */
}

/* --- TOGGLE SWITCH (CRUCIALE FIXES VOOR KLIKGEDRAG) --- */

.switch-wrapper {
    flex-shrink: 0;
}
.switch {
    /* Dit is nu een div in de HTML */
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    /* FIX: Zorgt dat de onzichtbare input de klik ontvangt */
    opacity: 0;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 20; /* Zorgt dat de input boven de slider ligt */
    pointer-events: auto; /* Zorgt dat de muis deze kan bereiken */
    cursor: pointer;
}

.disabled-switch .slider {
    background-color: #ddd !important; /* Grijs, overschrijft de checked kleur */
    cursor: not-allowed;
    opacity: 0.8;
}
.disabled-switch .slider:before {
    background-color: #ccc !important;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #007bff;
}

input:focus + .slider {
    box-shadow: 0 0 1px #007bff;
}

input:checked + .slider:before {
    transform: translateX(26px);
}