/* ==========================================================================
   VELZA GLOBAL — CONSENT MANAGEMENT SYSTEM
   cookie-consent.css

   Self-contained. Adds nothing to the global scope beyond the
   .vg-cookie-* namespace. No existing theme rule is overridden.

   All tokens below are lifted from the live site:
     accent            #ffffff            (matches --vg-gold in custom.css)
     accent-soft       rgba(255,255,255,.12)
     border            rgba(255,255,255,.14)   (--vg-card-border)
     border-strong     rgba(255,255,255,.4)    (--vg-card-border-hover)
     surface           rgba(255,255,255,.02)   (--vg-card-bg)
     muted ink         rgba(255,255,255,.65)   (--vg-ink-muted)
     radius            10px                    (.vg-office-card)
     shadow            0 30px 60px -20px rgba(0,0,0,.65)
     easing            cubic-bezier(.16,.84,.44,1)
     secondary button  .btn-outline-light  bg rgba(0,0,0,.64) / border rgba(242,242,242,.26)
     primary button    .btn                bg #f8f9fa / colour #000
     type              Poppins (UI), Syncopate (display)

   Theme z-index peaks at 10001 (offcanvas nav), so this layer sits above it.
   ========================================================================== */

.vg-cookie-consent {
    --vgc-accent: #ffffff;
    --vgc-accent-soft: rgba(255, 255, 255, 0.12);
    --vgc-panel-bg: rgba(8, 8, 8, 0.94);
    --vgc-surface: rgba(255, 255, 255, 0.02);
    --vgc-surface-hi: rgba(255, 255, 255, 0.05);
    --vgc-border: rgba(255, 255, 255, 0.14);
    --vgc-border-strong: rgba(255, 255, 255, 0.4);
    --vgc-ink: #ffffff;
    --vgc-ink-muted: rgba(255, 255, 255, 0.65);
    --vgc-ink-dim: rgba(255, 255, 255, 0.45);
    --vgc-radius: 10px;
    --vgc-radius-sm: 8px;
    --vgc-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.65);
    --vgc-ease: cubic-bezier(0.16, 0.84, 0.44, 1);
    /* Offcanvas nav is 9999 and the master-curtain intro is 10000/10001.
       Banner + settings sit UNDER the nav so an open menu covers them;
       only the modal, which is user-invoked, goes above. */
    --vgc-z: 9990;

    font-family: "Poppins", sans-serif;
}

.vg-cookie-consent *,
.vg-cookie-consent *::before,
.vg-cookie-consent *::after {
    box-sizing: border-box;
}

.vg-cookie-consent [hidden] {
    display: none !important;
}

/* --------------------------------------------------------------------------
   Shared: eyebrow label (mirrors .vg-eyebrow on the contact page)
   -------------------------------------------------------------------------- */

.vg-cookie-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--vgc-accent);
}

.vg-cookie-eyebrow::before {
    content: "";
    flex-shrink: 0;
    display: inline-block;
    width: 20px;
    height: 1px;
    background: var(--vgc-accent);
}

/* --------------------------------------------------------------------------
   Shared: buttons
   -------------------------------------------------------------------------- */

.vg-cookie-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 12px 26px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: var(--vgc-radius);
    transition:
        background-color 0.35s var(--vgc-ease),
        border-color 0.35s var(--vgc-ease),
        color 0.35s var(--vgc-ease),
        transform 0.35s var(--vgc-ease);
}

.vg-cookie-btn:hover {
    transform: translateY(-2px);
}

.vg-cookie-btn:active {
    transform: translateY(0);
}

.vg-cookie-btn-primary {
    color: #000000;
    background-color: #f8f9fa;
    border-color: #f8f9fa;
}

.vg-cookie-btn-primary:hover {
    color: #000000;
    background-color: #ffffff;
    border-color: #ffffff;
}

.vg-cookie-btn-secondary {
    color: var(--vgc-ink);
    background-color: rgba(0, 0, 0, 0.64);
    border-color: rgba(242, 242, 242, 0.26);
}

.vg-cookie-btn-secondary:hover {
    color: var(--vgc-ink);
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--vgc-border-strong);
}

/* Text-only tertiary action ("Cookie Settings" inside the banner) */
.vg-cookie-btn-quiet {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 2px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--vgc-ink-muted);
    background: none;
    border: 0;
    border-bottom: 1px solid transparent;
    cursor: pointer;
    transition:
        color 0.3s var(--vgc-ease),
        border-color 0.3s var(--vgc-ease);
}

.vg-cookie-btn-quiet:hover {
    color: var(--vgc-ink);
    border-bottom-color: var(--vgc-border-strong);
}

/* Focus ring — reuses the site's existing focus pattern
   (border-colour shift + 3px soft halo, see .vg-field input:focus) */
.vg-cookie-consent button:focus-visible,
.vg-cookie-consent a:focus-visible,
.vg-cookie-consent input:focus-visible + .vg-cookie-switch-track {
    outline: none;
    border-color: var(--vgc-accent);
    box-shadow: 0 0 0 3px var(--vgc-accent-soft);
}

/* Fallback for engines without :focus-visible */
.vg-cookie-consent button:focus:not(:focus-visible),
.vg-cookie-consent a:focus:not(:focus-visible) {
    box-shadow: none;
}

/* --------------------------------------------------------------------------
   A. BANNER
   -------------------------------------------------------------------------- */

.vg-cookie-banner {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: var(--vgc-z);
    width: calc(100% - 48px);
    max-width: 640px;
    padding: 28px 30px 26px;
    color: var(--vgc-ink);
    background: var(--vgc-panel-bg);
    border: 1px solid var(--vgc-border);
    border-radius: var(--vgc-radius);
    box-shadow: var(--vgc-shadow);
    -webkit-backdrop-filter: blur(18px) saturate(120%);
    backdrop-filter: blur(18px) saturate(120%);
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 0.5s var(--vgc-ease),
        transform 0.5s var(--vgc-ease);
}

.vg-cookie-banner.vg-cookie-is-visible {
    opacity: 1;
    transform: translateY(0);
}

.vg-cookie-banner-title {
    margin: 0 0 12px;
    font-family: "Poppins", sans-serif;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.01em;
    color: var(--vgc-ink);
}

.vg-cookie-banner-text {
    margin: 0 0 22px;
    font-size: 13px;
    line-height: 1.75;
    color: var(--vgc-ink-muted);
}

.vg-cookie-banner-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.vg-cookie-banner-actions .vg-cookie-btn {
    flex: 0 1 auto;
}

.vg-cookie-banner-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 20px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--vgc-border);
}

.vg-cookie-links {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    font-size: 12px;
}

.vg-cookie-links a {
    color: var(--vgc-ink-dim);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition:
        color 0.3s var(--vgc-ease),
        border-color 0.3s var(--vgc-ease);
}

.vg-cookie-links a:hover {
    color: var(--vgc-ink);
    border-bottom-color: var(--vgc-border-strong);
}

/* --------------------------------------------------------------------------
   B. PREFERENCES MODAL
   -------------------------------------------------------------------------- */

.vg-cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 10005;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.78);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.4s var(--vgc-ease);
}

.vg-cookie-modal.vg-cookie-is-visible {
    opacity: 1;
}

.vg-cookie-modal-panel {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 620px;
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    color: var(--vgc-ink);
    background: var(--vgc-panel-bg);
    border: 1px solid var(--vgc-border);
    border-radius: var(--vgc-radius);
    box-shadow: var(--vgc-shadow);
    -webkit-backdrop-filter: blur(18px) saturate(120%);
    backdrop-filter: blur(18px) saturate(120%);
    opacity: 0;
    transform: scale(0.98) translateY(10px);
    transition:
        opacity 0.4s var(--vgc-ease),
        transform 0.4s var(--vgc-ease);
}

.vg-cookie-modal.vg-cookie-is-visible .vg-cookie-modal-panel {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.vg-cookie-modal-header {
    position: relative;
    flex: 0 0 auto;
    padding: 28px 30px 20px;
    border-bottom: 1px solid var(--vgc-border);
}

.vg-cookie-modal-title {
    margin: 0 0 10px;
    padding-right: 44px;
    font-family: "Poppins", sans-serif;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--vgc-ink);
}

.vg-cookie-modal-intro {
    margin: 0;
    font-size: 13px;
    line-height: 1.75;
    color: var(--vgc-ink-muted);
}

.vg-cookie-modal-close {
    position: absolute;
    top: 22px;
    right: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    color: var(--vgc-ink-muted);
    background: var(--vgc-surface);
    border: 1px solid var(--vgc-border);
    border-radius: var(--vgc-radius-sm);
    cursor: pointer;
    transition:
        color 0.3s var(--vgc-ease),
        border-color 0.3s var(--vgc-ease),
        background-color 0.3s var(--vgc-ease);
}

.vg-cookie-modal-close:hover {
    color: var(--vgc-ink);
    background: var(--vgc-surface-hi);
    border-color: var(--vgc-border-strong);
}

.vg-cookie-modal-close svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.vg-cookie-modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 8px 30px 4px;
}

.vg-cookie-modal-footer {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 20px 30px 24px;
    border-top: 1px solid var(--vgc-border);
}

.vg-cookie-modal-footer .vg-cookie-btn-primary {
    margin-left: auto;
}

/* ---- category rows ---- */

.vg-cookie-group {
    padding: 22px 0;
    border-bottom: 1px solid var(--vgc-border);
}

.vg-cookie-group:last-child {
    border-bottom: 0;
}

.vg-cookie-group-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.vg-cookie-group-name {
    margin: 0;
    font-family: "Poppins", sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--vgc-ink);
}

.vg-cookie-group-desc {
    margin: 8px 0 0;
    max-width: 46ch;
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--vgc-ink-muted);
}

.vg-cookie-group-locked {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--vgc-ink-dim);
    padding: 7px 12px;
    background: var(--vgc-surface);
    border: 1px solid var(--vgc-border);
    border-radius: var(--vgc-radius-sm);
}

/* ---- toggle switch ---- */

.vg-cookie-switch {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.vg-cookie-switch-input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.vg-cookie-switch-track {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
    width: 46px;
    height: 26px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--vgc-border);
    border-radius: 999px;
    transition:
        background-color 0.35s var(--vgc-ease),
        border-color 0.35s var(--vgc-ease),
        box-shadow 0.35s var(--vgc-ease);
}

.vg-cookie-switch-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: rgba(255, 255, 255, 0.55);
    border-radius: 50%;
    transition:
        transform 0.35s var(--vgc-ease),
        background-color 0.35s var(--vgc-ease);
}

.vg-cookie-switch-input:checked + .vg-cookie-switch-track {
    background: rgba(255, 255, 255, 0.9);
    border-color: #ffffff;
}

.vg-cookie-switch-input:checked + .vg-cookie-switch-track::after {
    background: #0b0b0b;
    transform: translateX(20px);
}

/* State is announced in text as well as colour, never colour alone */
.vg-cookie-switch-state {
    min-width: 30px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--vgc-ink-dim);
    transition: color 0.35s var(--vgc-ease);
}

.vg-cookie-switch-input:checked ~ .vg-cookie-switch-state {
    color: var(--vgc-ink);
}

/* --------------------------------------------------------------------------
   C. PERSISTENT SETTINGS BUTTON
   -------------------------------------------------------------------------- */

.vg-cookie-settings {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: calc(var(--vgc-z) - 5);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 42px;
    padding: 0 16px;
    font-family: "Poppins", sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--vgc-ink-muted);
    background: rgba(0, 0, 0, 0.64);
    border: 1px solid rgba(242, 242, 242, 0.26);
    border-radius: var(--vgc-radius);
    cursor: pointer;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    opacity: 0;
    transform: translateY(12px);
    transition:
        opacity 0.5s var(--vgc-ease),
        transform 0.5s var(--vgc-ease),
        color 0.3s var(--vgc-ease),
        border-color 0.3s var(--vgc-ease),
        background-color 0.3s var(--vgc-ease);
}

.vg-cookie-settings.vg-cookie-is-visible {
    opacity: 1;
    transform: translateY(0);
}

.vg-cookie-settings:hover {
    color: var(--vgc-ink);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--vgc-border-strong);
}

.vg-cookie-settings svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* --------------------------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------------------------- */

@media all and (max-width: 767px) {
    .vg-cookie-banner {
        left: 12px;
        right: 12px;
        bottom: 12px;
        width: calc(100% - 24px);
        max-width: none;
        padding: 24px 20px 22px;
    }

    .vg-cookie-banner-title {
        font-size: 17px;
    }

    .vg-cookie-banner-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .vg-cookie-banner-actions .vg-cookie-btn {
        width: 100%;
    }

    /* Accept first in the tab/visual order on narrow screens */
    .vg-cookie-banner-actions .vg-cookie-btn-primary {
        order: -1;
    }

    .vg-cookie-banner-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .vg-cookie-modal {
        padding: 12px;
    }

    .vg-cookie-modal-panel {
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
    }

    .vg-cookie-modal-header {
        padding: 24px 20px 18px;
    }

    .vg-cookie-modal-title {
        font-size: 17px;
    }

    .vg-cookie-modal-body {
        padding: 6px 20px 4px;
    }

    .vg-cookie-modal-footer {
        flex-direction: column;
        align-items: stretch;
        padding: 18px 20px 20px;
    }

    .vg-cookie-modal-footer .vg-cookie-btn {
        width: 100%;
    }

    .vg-cookie-modal-footer .vg-cookie-btn-primary {
        margin-left: 0;
        order: -1;
    }

    .vg-cookie-group-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .vg-cookie-group-desc {
        max-width: none;
    }

    /* Icon-only on the smallest screens so it never crowds the layout */
    .vg-cookie-settings {
        left: 12px;
        bottom: 12px;
        width: 42px;
        padding: 0;
        justify-content: center;
    }

    .vg-cookie-settings-label {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        white-space: nowrap;
    }
}

@media all and (min-width: 768px) and (max-width: 991px) {
    .vg-cookie-banner {
        max-width: 560px;
        padding: 26px 26px 24px;
    }
}

/* Wide monitors: keep the panel from drifting off the optical grid */
@media all and (min-width: 1921px) {
    .vg-cookie-banner {
        bottom: 32px;
        left: 32px;
        max-width: 700px;
        padding: 32px 34px 30px;
    }

    .vg-cookie-banner-title {
        font-size: 21px;
    }

    .vg-cookie-banner-text,
    .vg-cookie-modal-intro {
        font-size: 14px;
    }

    .vg-cookie-settings {
        bottom: 32px;
        left: 32px;
    }
}

/* --------------------------------------------------------------------------
   REDUCED MOTION
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .vg-cookie-consent *,
    .vg-cookie-consent *::before,
    .vg-cookie-consent *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

    .vg-cookie-banner,
    .vg-cookie-settings {
        transform: none;
    }

    .vg-cookie-modal-panel {
        transform: none;
    }
}

/* --------------------------------------------------------------------------
   HIGH CONTRAST / FORCED COLOURS
   -------------------------------------------------------------------------- */

@media (forced-colors: active) {
    .vg-cookie-banner,
    .vg-cookie-modal-panel,
    .vg-cookie-settings {
        border: 1px solid CanvasText;
    }

    .vg-cookie-switch-track {
        border: 1px solid CanvasText;
    }

    .vg-cookie-switch-input:checked + .vg-cookie-switch-track {
        background: Highlight;
    }
}
