/* ============================================================
   Cookie consent banner + settings modal
   GDPR / Belgian GBA compliant
   ============================================================ */

/* --- Bottom banner bar --- */

#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9000;
    background: #202023;
    color: #fff;
    padding: 16px 24px;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.25);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Poppins', sans-serif;
}

#cookie-banner.cookie-banner--visible {
    transform: translateY(0);
}

.cookie-banner__inner {
    max-width: 1320px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-banner__icon {
    font-size: 1.4rem;
    color: #ce212a;
    flex-shrink: 0;
}

.cookie-banner__content {
    flex: 1;
    min-width: 240px;
}

.cookie-banner__title {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 3px;
    color: #fff;
}

.cookie-banner__text {
    color: #a8a8b0;
    font-size: 0.8125rem;
    line-height: 1.5;
    margin: 0;
}

.cookie-banner__link {
    color: #03a4ed;
    text-decoration: none;
}

.cookie-banner__link:hover {
    text-decoration: underline;
    color: #03a4ed;
}

.cookie-banner__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

/* --- Shared button styles --- */

.cookie-btn {
    display: inline-block;
    padding: 9px 20px;
    font-size: 0.8125rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.4;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    text-decoration: none;
}

/* Primary: solid red — Accept all / Save selection */
.cookie-btn--primary {
    background: #ce212a;
    color: #fff;
    border: 2px solid #ce212a;
}

.cookie-btn--primary:hover,
.cookie-btn--primary:focus {
    background: #a81a21;
    border-color: #a81a21;
    color: #fff;
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Ghost: white outline on dark bg — Reject all (on banner) */
.cookie-btn--ghost {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.55);
}

.cookie-btn--ghost:hover,
.cookie-btn--ghost:focus {
    border-color: #fff;
    color: #fff;
    outline: none;
}

/* Outline: red outline on dark bg — Cookie settings */
.cookie-btn--outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(206, 33, 42, 0.7);
}

.cookie-btn--outline:hover,
.cookie-btn--outline:focus {
    border-color: #ce212a;
    color: #fff;
    outline: none;
}

/* Dark ghost: used inside modal (white bg) — Reject all */
.cookie-modal .cookie-btn--ghost {
    color: #202023;
    border-color: rgba(32, 32, 35, 0.4);
}

.cookie-modal .cookie-btn--ghost:hover,
.cookie-modal .cookie-btn--ghost:focus {
    border-color: #202023;
    color: #202023;
}

/* --- Modal overlay --- */

.cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 9100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    font-family: 'Poppins', sans-serif;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.cookie-modal:not([hidden]) {
    opacity: 1;
    pointer-events: auto;
}

.cookie-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    cursor: pointer;
}

.cookie-modal__dialog {
    position: relative;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cookie-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.cookie-modal__title {
    font-size: 1rem;
    font-weight: 700;
    color: #202023;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-modal__title i {
    color: #ce212a;
    font-size: 0.9375rem;
}

.cookie-modal__close {
    background: none;
    border: none;
    cursor: pointer;
    color: #777;
    font-size: 1.1rem;
    padding: 4px 8px;
    border-radius: 4px;
    line-height: 1;
    transition: color 0.2s, background 0.2s;
}

.cookie-modal__close:hover {
    color: #202023;
    background: #f2f3f8;
}

.cookie-modal__body {
    overflow-y: auto;
    flex: 1;
    padding: 0 24px;
}

.cookie-modal__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px 20px;
    border-top: 1px solid #eee;
    flex-shrink: 0;
    gap: 12px;
    flex-wrap: wrap;
}

.cookie-modal__policy-link {
    color: #03a4ed;
    text-decoration: none;
    font-size: 0.8125rem;
}

.cookie-modal__policy-link:hover {
    text-decoration: underline;
    color: #03a4ed;
}

.cookie-modal__footer-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* --- Cookie categories --- */

.cookie-category {
    padding: 18px 0;
    border-bottom: 1px solid #eee;
}

.cookie-category:last-child {
    border-bottom: none;
}

.cookie-category__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.cookie-category__name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #202023;
}

.cookie-category__desc {
    font-size: 0.8rem;
    color: #555;
    line-height: 1.55;
    margin: 0 0 8px;
}

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

.cookie-list li {
    font-size: 0.75rem;
    color: #888;
    padding: 3px 0;
}

.cookie-list code {
    background: #f2f3f8;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.7rem;
    color: #555;
}

/* "Altijd actief" badge */
.cookie-badge {
    display: inline-flex;
    align-items: center;
    background: #e8f7ee;
    color: #1a7a3c;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* --- Toggle switch --- */

.cookie-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
}

.cookie-toggle__input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle__track {
    position: relative;
    width: 44px;
    height: 24px;
    background: #ccc;
    border-radius: 12px;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.cookie-toggle__track::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    top: 3px;
    left: 3px;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.cookie-toggle__input:checked + .cookie-toggle__track {
    background: #ce212a;
}

.cookie-toggle__input:checked + .cookie-toggle__track::after {
    transform: translateX(20px);
}

.cookie-toggle__input:focus + .cookie-toggle__track {
    outline: 2px solid #03a4ed;
    outline-offset: 2px;
}

/* --- Responsive --- */

@media (max-width: 768px) {
    .cookie-banner__icon {
        display: none;
    }

    .cookie-banner__inner {
        gap: 12px;
    }

    .cookie-banner__actions {
        width: 100%;
        justify-content: flex-end;
    }

    .cookie-modal__footer {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-modal__footer-actions {
        flex-direction: column;
    }

    .cookie-modal__footer-actions .cookie-btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    #cookie-banner {
        padding: 14px 16px;
    }

    .cookie-banner__actions {
        justify-content: stretch;
    }

    .cookie-banner__actions .cookie-btn {
        flex: 1;
        text-align: center;
    }
}
