/* ─────────────────────────────────────────────────────────────────────────
   Cookie consent (GDPR)
   Bottom banner + preferences dialog. Behaviour lives in assets/js/consent.js.
   Uses the site's design tokens so it matches the dark theme everywhere.
   ───────────────────────────────────────────────────────────────────────── */

/* Banner — fixed to the bottom, non-blocking. Hidden until consent.js shows it. */
.cc-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    background: var(--clr-bg-2);
    border-top: 1px solid var(--clr-border);
    box-shadow: var(--shadow-lg);
    animation: cc-slide-up .3s ease;
}
.cc-banner[hidden] { display: none; }

@keyframes cc-slide-up {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.cc-banner__inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.1rem 0;
}
.cc-banner__text { flex: 1 1 auto; min-width: 0; }
.cc-banner__title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    color: var(--clr-white);
    margin: 0 0 .25rem;
}
.cc-banner__text p {
    margin: 0;
    font-size: .9rem;
    line-height: 1.55;
    color: var(--clr-text-2);
    max-width: 68ch;
}
.cc-banner__text a { color: var(--clr-y); }

.cc-banner__actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
}

/* Preferences modal */
.cc-modal {
    position: fixed;
    inset: 0;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}
.cc-modal[hidden] { display: none; }
.cc-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.65);
    backdrop-filter: blur(2px);
}
.cc-modal__panel {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 2.5rem);
    overflow-y: auto;
    background: var(--clr-bg-3);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 1.75rem;
    animation: cc-pop .2s ease;
}
@keyframes cc-pop {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.cc-modal__close {
    position: absolute;
    top: .85rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--clr-text-2);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    padding: .25rem;
}
.cc-modal__close:hover { color: var(--clr-white); }
.cc-modal__title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--clr-white);
    margin: 0 0 .5rem;
}
.cc-modal__intro {
    font-size: .9rem;
    line-height: 1.6;
    color: var(--clr-text-2);
    margin: 0 0 1.25rem;
}
.cc-modal__intro a { color: var(--clr-y); }

/* Category row */
.cc-cat {
    padding: 1rem 0;
    border-top: 1px solid var(--clr-border);
}
.cc-cat__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .4rem;
}
.cc-cat__name {
    font-weight: 700;
    color: var(--clr-text);
    font-size: .98rem;
}
.cc-cat__lock {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--clr-y-dim);
}
.cc-cat__desc {
    margin: 0;
    font-size: .85rem;
    line-height: 1.55;
    color: var(--clr-text-2);
}

/* Toggle switch */
.cc-switch {
    position: relative;
    display: inline-block;
    flex: 0 0 auto;
    width: 44px;
    height: 24px;
    cursor: pointer;
}
.cc-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.cc-switch__track {
    position: absolute;
    inset: 0;
    background: var(--clr-bg-5);
    border: 1px solid var(--clr-border);
    border-radius: 999px;
    transition: background .2s;
}
.cc-switch__track::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: var(--clr-text-2);
    border-radius: 50%;
    transition: transform .2s, background .2s;
}
.cc-switch input:checked + .cc-switch__track {
    background: var(--clr-y);
    border-color: var(--clr-y);
}
.cc-switch input:checked + .cc-switch__track::before {
    transform: translateX(20px);
    background: #000;
}
.cc-switch input:focus-visible + .cc-switch__track {
    box-shadow: 0 0 0 3px var(--clr-y-glow);
}

.cc-modal__actions {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--clr-border);
}
.cc-modal__actions .btn { flex: 1 1 auto; }

/* ── Gated embed placeholder ([data-cc-embed]) ─────────────────────────────
   Shown in place of a third-party iframe (Google Maps, etc.) until the visitor
   allows the "media" category. Replaced by the live iframe on consent. */
.cc-embed {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    padding: 1.5rem;
    background:
        repeating-linear-gradient(45deg, var(--clr-bg-3), var(--clr-bg-3) 12px, var(--clr-bg-2) 12px, var(--clr-bg-2) 24px);
    color: var(--clr-text-2);
}
.cc-embed--live {
    display: block;
    min-height: 0;
    padding: 0;
    background: none;
}
.cc-embed__prompt {
    max-width: 420px;
    text-align: center;
}
.cc-embed__msg {
    margin: 0 0 1rem;
    font-size: .9rem;
    line-height: 1.55;
}
.cc-embed__actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Mobile */
@media (max-width: 720px) {
    .cc-banner__inner {
        flex-direction: column;
        align-items: stretch;
        gap: .9rem;
    }
    .cc-banner__actions { justify-content: stretch; }
    .cc-banner__actions .btn { flex: 1 1 auto; }
}
