/* ================================================
   Cookietoestemming — banner, voorkeurenpaneel en
   zwevend cookie-icoon. Volledig in de huisstijl.
   ================================================ */

.cc *,
.cc *::before,
.cc *::after {
    box-sizing: border-box;
}

body.cc-lock {
    overflow: hidden;
}

/* ── Zwevend cookie-icoon (linksonder) ── */
.cc-fab {
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 1800;
    width: 52px;
    height: 52px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    /* !important: het thema forceert border-radius: 3px op alle <button> */
    border-radius: 50% !important;
    background: var(--color-primary, #00532D);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 61, 33, 0.35);
    transition: transform 0.15s ease, background 0.15s ease;
}
.cc-fab.is-visible {
    display: flex;
}
.cc-fab:hover {
    background: var(--color-primary-hover, #006638);
    transform: translateY(-2px);
}
.cc-fab svg {
    display: block;
}

@media (max-width: 767px) {
    .cc-fab {
        left: 14px;
        bottom: 14px;
        width: 46px;
        height: 46px;
    }
}

/* ── Banner (eerste bezoek) ── */
.cc-banner {
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 2100;
    width: 420px;
    max-width: calc(100vw - 40px);
    display: none;
    background: #fff;
    border: 1px solid var(--border, rgba(0, 83, 45, 0.14));
    border-radius: 6px;
    box-shadow: 0 18px 50px rgba(0, 20, 10, 0.22);
    font-family: var(--font-sans, 'Avenir', sans-serif);
}
.cc-banner.is-open {
    display: block;
}
.cc-banner-inner {
    padding: 22px 22px 18px;
}
.cc-banner-title {
    margin: 0 0 8px;
    font-family: var(--font-serif, 'Playfair Display', Georgia, serif);
    font-size: 18px;
    font-weight: 600;
    color: var(--groen-diep, #2C3B2A);
}
.cc-banner-text {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--tekst-sub, #5a6b58);
}
.cc-banner-text a {
    color: var(--color-primary, #00532D);
    text-decoration: underline;
}
.cc-banner-acties {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}
/* "Alles aanvaarden" krijgt de meeste visuele nadruk (gevuld + breder),
   "Alles weigeren" blijft een volwaardige, even leesbare knop op dezelfde regel
   — vereist om conform te zijn. */
.cc-banner-acties .cc-btn {
    flex: 1 1 0;
}
.cc-banner-acties .cc-btn-primary {
    flex: 1.5 1 0;
    padding: 12px 16px;
    font-size: 13px;
}

.cc-prefs-link {
    display: inline-block;
    margin-top: 10px;
    padding: 4px 0;
    border: none;
    background: none;
    font-family: var(--font-sans, 'Avenir', sans-serif);
    font-size: 12px;
    color: var(--tekst-sub, #5a6b58);
    text-decoration: underline;
    cursor: pointer;
}
.cc-prefs-link:hover {
    color: var(--color-primary, #00532D);
}

/* ── Voorkeurenpaneel (modal) ── */
.cc-overlay {
    position: fixed;
    inset: 0;
    z-index: 2200;
    display: none;
    background: rgba(0, 0, 0, 0.5);
}
.cc-overlay.is-open {
    display: block;
}
.cc-dialog {
    position: fixed;
    inset: 0;
    z-index: 2300;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: var(--font-sans, 'Avenir', sans-serif);
}
.cc-dialog.is-open {
    display: flex;
}
.cc-dialog-panel {
    width: 560px;
    max-width: 100%;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 24px 60px rgba(0, 20, 10, 0.3);
    overflow: hidden;
}
.cc-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border, rgba(0, 83, 45, 0.12));
}
.cc-dialog-title {
    margin: 0;
    font-family: var(--font-serif, 'Playfair Display', Georgia, serif);
    font-size: 19px;
    font-weight: 600;
    color: var(--groen-diep, #2C3B2A);
}
.cc-dialog-close {
    border: none;
    background: transparent;
    font-size: 24px;
    line-height: 1;
    color: var(--tekst-sub, #5a6b58);
    cursor: pointer;
    padding: 4px;
}
.cc-dialog-close:hover {
    color: var(--groen-diep, #2C3B2A);
}
.cc-dialog-body {
    padding: 20px 22px;
    overflow-y: auto;
}
.cc-dialog-intro {
    margin: 0 0 18px;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--tekst-sub, #5a6b58);
}
.cc-dialog-acties {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    padding: 16px 22px;
    border-top: 1px solid var(--border, rgba(0, 83, 45, 0.12));
    background: var(--mist, #F2F5EF);
}

/* ── Categorie-rijen ── */
.cc-cat {
    padding: 14px 0;
    border-top: 1px solid var(--border, rgba(0, 83, 45, 0.10));
}
.cc-cat:first-child {
    border-top: none;
    padding-top: 0;
}
.cc-cat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}
.cc-cat-naam {
    font-size: 14px;
    font-weight: 700;
    color: var(--groen-diep, #2C3B2A);
}
.cc-cat-verplicht {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-cta, #C9A96E);
}
.cc-cat-tekst {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--tekst-sub, #5a6b58);
}

/* ── Schakelaar ── */
.cc-switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    flex-shrink: 0;
}
.cc-switch input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}
.cc-switch-slider {
    position: absolute;
    inset: 0;
    border-radius: 24px;
    background: #cfd8cf;
    transition: background 0.15s ease;
}
.cc-switch-slider::before {
    content: '';
    position: absolute;
    left: 3px;
    top: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.15s ease;
}
.cc-switch input:checked + .cc-switch-slider {
    background: var(--color-primary, #00532D);
}
.cc-switch input:checked + .cc-switch-slider::before {
    transform: translateX(18px);
}

/* ── Knoppen ── */
.cc-btn {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 3px;
    padding: 10px 16px;
    font-family: var(--font-sans, 'Avenir', sans-serif);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.cc-btn-primary {
    background: var(--color-primary, #00532D);
    color: #fff;
}
.cc-btn-primary:hover {
    background: var(--color-primary-hover, #006638);
}
.cc-btn-ghost {
    background: transparent;
    border-color: var(--border, rgba(0, 83, 45, 0.25));
    color: var(--groen-diep, #2C3B2A);
}
.cc-btn-ghost:hover {
    border-color: var(--color-primary, #00532D);
    color: var(--color-primary, #00532D);
}

@media (max-width: 575px) {
    .cc-banner {
        left: 12px;
        right: 12px;
        bottom: 12px;
        width: auto;
    }
    .cc-banner-acties {
        flex-wrap: wrap;
    }
    .cc-banner-acties .cc-btn {
        flex: 1 1 100%;
        text-align: center;
    }
    .cc-banner-acties .cc-btn-primary {
        order: -1; /* aanvaarden bovenaan wanneer de knoppen stapelen */
    }
    .cc-dialog-acties .cc-btn {
        flex: 1 1 auto;
        text-align: center;
    }
}
