/*
 * Cookie banner, map placeholder, form privacy note and the privacy policy page.
 * Plain CSS (not Tailwind classes) so the banner still works if the Tailwind CDN fails.
 */

:root {
    --cw-c-bg: #171f33;
    --cw-c-bg-deep: #0b1326;
    --cw-c-line: rgba(255, 255, 255, 0.12);
    --cw-c-text: #dae2fd;
    --cw-c-muted: #bcc9cd;
    --cw-c-primary: #4cd7f6;
    --cw-c-primary-strong: #06b6d4;
    --cw-c-on-primary: #00424f;
}

/* ---------- Cookie banner ---------- */

.cw-consent {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 2147483000;
    max-width: 720px;
    margin: 0 auto;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--cw-c-bg);
    color: var(--cw-c-text);
    border: 1px solid var(--cw-c-line);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
    font-family: Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.55;
}

.cw-consent[hidden] {
    display: none;
}

.cw-consent:focus {
    outline: none;
}

.cw-consent:focus-visible {
    outline: 2px solid var(--cw-c-primary);
    outline-offset: 2px;
}

.cw-consent__inner {
    padding: 20px;
}

.cw-consent__title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--cw-c-text);
}

.cw-consent__text {
    margin: 0;
    color: var(--cw-c-muted);
}

.cw-consent a {
    color: var(--cw-c-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cw-consent__prefs {
    margin-top: 16px;
    border-top: 1px solid var(--cw-c-line);
}

.cw-consent__prefs[hidden] {
    display: none;
}

.cw-consent__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--cw-c-line);
}

.cw-consent__row-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    cursor: default;
}

label.cw-consent__row-text {
    cursor: pointer;
}

.cw-consent__row-text strong {
    color: var(--cw-c-text);
    font-weight: 700;
}

.cw-consent__row-text span {
    color: var(--cw-c-muted);
    font-size: 13px;
}

.cw-consent__always {
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--cw-c-muted);
    white-space: nowrap;
}

/* Toggle switch (real checkbox, unchecked by default) */
.cw-consent__switch {
    position: relative;
    flex-shrink: 0;
    width: 48px;
    height: 28px;
}

.cw-consent__switch input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}

.cw-consent__switch-track {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #3d494c;
    transition: background-color 0.2s ease;
}

.cw-consent__switch-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s ease;
}

.cw-consent__switch input:checked + .cw-consent__switch-track {
    background: var(--cw-c-primary-strong);
}

.cw-consent__switch input:checked + .cw-consent__switch-track::after {
    transform: translateX(20px);
}

.cw-consent__switch input:focus-visible + .cw-consent__switch-track {
    outline: 2px solid var(--cw-c-primary);
    outline-offset: 2px;
}

.cw-consent__actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 16px;
}

.cw-consent__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 6px;
    border: 2px solid transparent;
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: filter 0.15s ease, background-color 0.15s ease;
}

.cw-consent__btn[hidden] {
    display: none;
}

/* "Alles accepteren" and "Weigeren" look exactly the same. */
.cw-consent__btn--choice {
    background: var(--cw-c-primary-strong);
    border-color: var(--cw-c-primary-strong);
    color: var(--cw-c-on-primary);
}

.cw-consent__btn--choice:hover {
    filter: brightness(1.1);
}

.cw-consent__btn--ghost {
    background: transparent;
    border-color: var(--cw-c-line);
    color: var(--cw-c-text);
}

.cw-consent__btn--ghost:hover {
    border-color: var(--cw-c-primary);
}

.cw-consent__btn:focus-visible {
    outline: 2px solid var(--cw-c-text);
    outline-offset: 2px;
}

@media (min-width: 640px) {
    .cw-consent__inner {
        padding: 24px;
    }

    .cw-consent__actions {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cw-consent__switch-track,
    .cw-consent__switch-track::after,
    .cw-consent__btn {
        transition: none;
    }
}

/* Hide the floating contact button while the banner is open so they don't overlap on phones. */
.cw-consent-open .cw-fab {
    visibility: hidden;
}

/* ---------- Footer "Cookie-instellingen" ---------- */

.cw-cookie-settings {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

/* ---------- Click-to-load map ---------- */

.cw-map-consent {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 100%;
    padding: 20px;
    text-align: center;
    background:
        linear-gradient(rgba(11, 19, 38, 0.82), rgba(11, 19, 38, 0.82)),
        repeating-linear-gradient(45deg, rgba(76, 215, 246, 0.06) 0 2px, transparent 2px 18px);
}

.cw-map-consent[hidden] {
    display: none;
}

.cw-map-consent__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 20px;
    border: 0;
    border-radius: 6px;
    background: var(--cw-c-primary-strong);
    color: var(--cw-c-on-primary);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.cw-map-consent__btn:hover {
    filter: brightness(1.1);
}

.cw-map-consent__btn:focus-visible {
    outline: 2px solid var(--cw-c-text);
    outline-offset: 2px;
}

.cw-map-consent__note {
    max-width: 34em;
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--cw-c-muted);
}

.cw-map-consent__note a {
    color: var(--cw-c-primary);
    text-decoration: underline;
}

/* ---------- Contact Form 7 privacy note ---------- */

.cw-form-privacy {
    margin: 12px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--cw-c-muted);
}

.cw-form-privacy a {
    color: var(--cw-c-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ---------- Privacy policy page ---------- */

.cw-legal-langs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
}

.cw-legal-langs a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 16px;
    border: 1px solid var(--cw-c-line);
    border-radius: 999px;
    color: var(--cw-c-text);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
}

.cw-legal-langs a:hover,
.cw-legal-langs a:focus-visible {
    border-color: var(--cw-c-primary);
    color: var(--cw-c-primary);
}

.cw-legal {
    max-width: 760px;
    color: var(--cw-c-muted);
    font-size: 16px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.cw-legal section,
.cw-legal h1,
.cw-legal h2 {
    scroll-margin-top: 104px;
}

.cw-legal h1 {
    margin: 0 0 8px;
    color: var(--cw-c-text);
    font-size: clamp(28px, 5vw, 40px);
    font-weight: 800;
    line-height: 1.2;
}

.cw-legal h2 {
    margin: 40px 0 12px;
    color: var(--cw-c-text);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
}

.cw-legal p {
    margin: 0 0 16px;
}

.cw-legal strong {
    color: var(--cw-c-text);
}

.cw-legal a {
    color: var(--cw-c-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cw-legal ul {
    margin: 0 0 16px;
    padding-left: 1.4em;
    list-style: disc;
}

.cw-legal li {
    margin-bottom: 6px;
}

.cw-legal hr {
    margin: 56px 0;
    border: 0;
    border-top: 1px solid var(--cw-c-line);
}

.cw-legal figure.wp-block-table {
    margin: 0 0 16px;
    overflow-x: auto;
}

.cw-legal table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.cw-legal th,
.cw-legal td {
    padding: 10px 12px;
    border: 1px solid var(--cw-c-line);
    text-align: left;
    vertical-align: top;
}

.cw-legal th {
    background: var(--cw-c-bg);
    color: var(--cw-c-text);
}

/* Stack the purposes table on phones instead of scrolling sideways. */
@media (max-width: 599px) {
    .cw-legal table,
    .cw-legal thead,
    .cw-legal tbody,
    .cw-legal tr,
    .cw-legal th,
    .cw-legal td {
        display: block;
        width: 100%;
    }

    .cw-legal thead tr {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }

    .cw-legal tr {
        margin-bottom: 12px;
        border: 1px solid var(--cw-c-line);
        border-radius: 8px;
    }

    .cw-legal td {
        border: 0;
    }

    .cw-legal td + td {
        border-top: 1px solid var(--cw-c-line);
        color: var(--cw-c-text);
        font-size: 14px;
    }
}
