/* =============================================================
   COOKIE CONSENT BAR (inc/cookie-consent.php, js/cookie-consent.js)
   Full-width bar fixed to the bottom edge. Sits under the nav (1002)
   and nav drawer (1001) so an open menu still covers it.
   Buttons are the shared .viitorx-btn (marketing-shared.css); only
   their colours are set here, through its --btn-* properties.
============================================================= */
.vx-consent {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    /* Solid, not translucent: light hero text bled through a 0.97 alpha. */
    background: #0f0f0f;
    border-top: 1px solid rgba(240, 240, 229, 0.12);
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.35);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.vx-consent.is-visible {
    transform: translateY(0);
}

.vx-consent__inner {
    /* With the preferences open on a short screen, scroll inside the bar
       rather than pushing its buttons off-screen. */
    max-height: 100vh;
    max-height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: clamp(18px, 1.25vw, 24px) var(--section-inline, 20px);
    padding-bottom: calc(clamp(18px, 1.25vw, 24px) + env(safe-area-inset-bottom, 0px));
}

.vx-consent__main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(20px, 2.5vw, 48px);
}

.vx-consent__text {
    max-width: 880px;
}

.vx-consent__title {
    margin: 0 0 6px;
    font-family: 'Archivo', sans-serif;
    font-size: clamp(16px, 0.94vw, 18px);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: #F0F0E5;
}

.vx-consent__copy {
    margin: 0;
    font-family: 'Archivo', sans-serif;
    font-size: clamp(14px, 0.83vw, 16px);
    font-weight: 400;
    line-height: 1.5;
    color: rgba(240, 240, 229, 0.72);
}

.vx-consent__link {
    color: #F0F0E5;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.vx-consent__link:focus-visible {
    outline: 2px solid rgba(240, 240, 229, 0.55);
    outline-offset: 3px;
}

.vx-consent__actions {
    display: flex;
    flex-shrink: 0;
    gap: 12px;
}

.vx-consent__btn {
    border: 1px solid transparent;
    font: inherit;
}

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

/* All three buttons are the same size and weight (regulators expect
   refusing to be as easy as accepting); only Accept is filled. */
.vx-consent__btn--ghost {
    --btn-bg: transparent;
    --btn-text: #F0F0E5;
    --btn-bg-hover: #F0F0E5;
    --btn-text-hover: #131313;
    border-color: rgba(240, 240, 229, 0.4);
}

.vx-consent__btn--accept {
    --btn-bg: #A47764;
    --btn-text: #FFFFFF;
    --btn-bg-hover: #F0F0E5;
    --btn-text-hover: #131313;
}

.vx-consent__btn:focus-visible {
    outline: 2px solid rgba(240, 240, 229, 0.55);
    outline-offset: 3px;
}

/* ── Preferences panel (Manage) ─────────────────────────────── */
.vx-consent__prefs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: clamp(16px, 1.25vw, 24px);
    padding-top: clamp(16px, 1.25vw, 24px);
    border-top: 1px solid rgba(240, 240, 229, 0.1);
}

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

.vx-consent__cat {
    padding: 16px 18px;
    border: 1px solid rgba(240, 240, 229, 0.1);
    border-radius: 12px;
    background: rgba(240, 240, 229, 0.03);
}

.vx-consent__cat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    /* Switch height, so the Essential row (no switch) lines up with the others. */
    min-height: 24px;
    margin-bottom: 8px;
}

.vx-consent__cat-title {
    font-family: 'Archivo', sans-serif;
    font-size: clamp(15px, 0.89vw, 17px);
    font-weight: 600;
    color: #F0F0E5;
    cursor: pointer;
}

.vx-consent__always {
    font-family: 'Archivo', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #A47764;
}

.vx-consent__cat-desc {
    margin: 0;
    font-family: 'Archivo', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: rgba(240, 240, 229, 0.62);
}

/* Toggle switch: a native checkbox (role="switch"), restyled. */
.vx-consent__switch {
    position: relative;
    flex-shrink: 0;
    width: 44px;
    height: 24px;
    margin: 0;
    border: 1px solid rgba(240, 240, 229, 0.35);
    border-radius: 9999px;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.vx-consent__switch::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(240, 240, 229, 0.7);
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.25s ease;
}

.vx-consent__switch:checked {
    border-color: #A47764;
    background: #A47764;
}

.vx-consent__switch:checked::before {
    background: #FFFFFF;
    transform: translateX(20px);
}

.vx-consent__switch:focus-visible {
    outline: 2px solid rgba(240, 240, 229, 0.55);
    outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
    .vx-consent__link:hover {
        color: #A47764;
    }
}

@media (max-width: 1023px) {
    .vx-consent__main {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .vx-consent__prefs {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .vx-consent__actions {
        flex-wrap: wrap;
    }

    /* Reject / Accept share the first row; Manage (or Save) takes a full
       row of its own under them. */
    .vx-consent__actions .vx-consent__btn {
        flex: 1 1 calc(50% - 6px);
    }

    .vx-consent__actions [data-consent-manage],
    .vx-consent__actions [data-consent-save] {
        order: 2;
        flex-basis: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .vx-consent,
    .vx-consent__switch,
    .vx-consent__switch::before {
        transition: none;
    }
}

/* -------------------------------------------------------------
   Footer "Cookie settings" button — looks like the footer links
   it sits next to (v2: .vx2-footer__legal, v1: .footer-bottom-center).
------------------------------------------------------------- */
.vx-cookie-settings {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    letter-spacing: inherit;
    line-height: inherit;
    color: inherit;
    cursor: pointer;
    transition: color 0.2s ease;
}

.vx-cookie-settings:focus-visible {
    outline: 2px solid rgba(240, 240, 229, 0.55);
    outline-offset: 4px;
}

.vx-cookie-settings--v1 {
    color: rgba(255, 255, 255, 0.6);
}

@media (hover: hover) and (pointer: fine) {
    .vx-cookie-settings--v2:hover {
        color: #a47764;
    }

    .vx-cookie-settings--v1:hover {
        color: rgba(255, 255, 255, 0.7);
    }
}
