
/* =========================================================
   COOKIE CONSENT — A.G.E. PROJECT
========================================================= */

:root {
    --age-consent-bg: #0a0a0a;
    --age-consent-panel: #101010;
    --age-consent-card: #151515;
    --age-consent-text: #ffffff;
    --age-consent-muted: rgba(255, 255, 255, 0.62);
    --age-consent-border: rgba(255, 255, 255, 0.13);
    --age-consent-accent: var(--accent, #c1121f);
    --age-consent-shadow: 0 28px 90px rgba(0, 0, 0, 0.58);
}

.age-consent-lock {
    overflow: hidden !important;
}

.age-consent-root,
.age-consent-root * {
    box-sizing: border-box;
}

.age-consent-root {
    position: relative;
    z-index: 2147483000;
    color: var(--age-consent-text);
    font-family: inherit;
}

.age-consent-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 220ms ease,
        visibility 220ms ease;
}

.age-consent-backdrop[data-open="true"] {
    opacity: 1;
    visibility: visible;
}

.age-consent-banner {
    position: fixed;
    right: 24px;
    bottom: 24px;
    left: 24px;
    z-index: 2147483001;
    width: min(calc(100% - 48px), 1320px);
    margin-inline: auto;
    padding: 25px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 30px;
    align-items: center;
    background:
        radial-gradient(circle at 100% 0%, rgba(193, 18, 31, 0.14), transparent 33%),
        rgba(10, 10, 10, 0.985);
    border: 1px solid var(--age-consent-border);
    border-radius: 22px;
    box-shadow: var(--age-consent-shadow);
    transform: translateY(calc(100% + 48px));
    opacity: 0;
    visibility: hidden;
    transition:
        transform 300ms cubic-bezier(.22, 1, .36, 1),
        opacity 220ms ease,
        visibility 220ms ease;
}

.age-consent-banner[data-open="true"] {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.age-consent-banner-copy {
    min-width: 0;
    padding-right: 10px;
}

.age-consent-eyebrow {
    display: block;
    margin-bottom: 10px;
    color: var(--age-consent-accent);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.age-consent-banner h2,
.age-consent-modal h2 {
    margin: 0;
    color: #fff;
    font-weight: 620;
    letter-spacing: -0.035em;
    text-wrap: balance;
}

.age-consent-banner h2 {
    font-size: clamp(1.3rem, 2.2vw, 2rem);
}

.age-consent-banner p,
.age-consent-modal p {
    color: var(--age-consent-muted);
    line-height: 1.62;
}

.age-consent-banner p {
    max-width: 790px;
    margin: 10px 0 0;
    font-size: 0.88rem;
}

.age-consent-banner a,
.age-consent-modal a {
    color: #fff;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.35);
    text-underline-offset: 3px;
}

.age-consent-banner-actions {
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: 10px;
    align-items: center;
}

.age-consent-button {
    min-height: 46px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 850;
    letter-spacing: 0.045em;
    text-align: center;
    transition:
        background-color 180ms ease,
        border-color 180ms ease,
        color 180ms ease,
        transform 180ms ease;
}

.age-consent-button:hover {
    border-color: rgba(255, 255, 255, 0.38);
    background: rgba(255, 255, 255, 0.07);
}

.age-consent-button:active {
    transform: translateY(1px);
}

.age-consent-button:focus-visible,
.age-consent-close:focus-visible,
.age-consent-switch input:focus-visible + span,
.age-consent-floating:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.72);
    outline-offset: 3px;
}

.age-consent-button-primary {
    color: #fff;
    background: var(--age-consent-accent);
    border-color: var(--age-consent-accent);
}

.age-consent-button-primary:hover {
    color: #fff;
    background: var(--age-consent-accent);
    border-color: rgba(255, 255, 255, 0.38);
    filter: brightness(1.1);
}

.age-consent-button-quiet {
    border-color: transparent;
    color: rgba(255, 255, 255, 0.68);
}

.age-consent-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 50%;
    cursor: pointer;
    font: inherit;
    font-size: 1.35rem;
    line-height: 1;
}

.age-consent-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.09);
}

/* PANNELLO PREFERENZE */

.age-consent-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 2147483002;
    width: min(calc(100% - 40px), 720px);
    max-height: min(86vh, 820px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: clamp(24px, 4vw, 38px);
    background:
        radial-gradient(circle at 100% 0%, rgba(193, 18, 31, 0.11), transparent 32%),
        var(--age-consent-panel);
    border: 1px solid var(--age-consent-border);
    border-radius: 26px;
    box-shadow: var(--age-consent-shadow);
    transform: translate(-50%, calc(-50% + 26px)) scale(0.985);
    opacity: 0;
    visibility: hidden;
    transition:
        transform 240ms cubic-bezier(.22, 1, .36, 1),
        opacity 200ms ease,
        visibility 200ms ease;
}

.age-consent-modal[data-open="true"] {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
}

.age-consent-modal-head {
    padding-right: 52px;
}

.age-consent-modal h2 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.02;
}

.age-consent-modal-head > p {
    margin: 15px 0 0;
    font-size: 0.88rem;
}

.age-consent-categories {
    margin-top: 28px;
    border-top: 1px solid var(--age-consent-border);
}

.age-consent-category {
    padding: 22px 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: start;
    border-bottom: 1px solid var(--age-consent-border);
}

.age-consent-category-copy strong {
    display: block;
    color: #fff;
    font-size: 0.98rem;
    font-weight: 720;
}

.age-consent-category-copy p {
    margin: 7px 0 0;
    font-size: 0.8rem;
}

.age-consent-category-copy small {
    display: block;
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.38);
    font-size: 0.68rem;
    line-height: 1.45;
}

.age-consent-required {
    min-height: 30px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.62);
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 999px;
    font-size: 0.64rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.age-consent-switch {
    position: relative;
    flex: 0 0 auto;
    margin-top: 2px;
}

.age-consent-switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.age-consent-switch span {
    position: relative;
    width: 48px;
    height: 28px;
    display: block;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    cursor: pointer;
    transition:
        background-color 180ms ease,
        border-color 180ms ease;
}

.age-consent-switch span::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.84);
    border-radius: 50%;
    transition: transform 180ms ease;
}

.age-consent-switch input:checked + span {
    background: var(--age-consent-accent);
    border-color: var(--age-consent-accent);
}

.age-consent-switch input:checked + span::after {
    transform: translateX(20px);
    background: #fff;
}

.age-consent-modal-actions {
    margin-top: 26px;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.age-consent-modal-actions .age-consent-button-primary {
    min-width: 180px;
}

/* PULSANTE DI RIAPERTURA PER PAGINE PRIVE DI FOOTER */

.age-consent-floating {
    position: fixed;
    left: 14px;
    bottom: 14px;
    z-index: 2147482998;
    min-height: 38px;
    padding: 0 13px;
    display: none;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.76);
    background: rgba(10, 10, 10, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.32);
    cursor: pointer;
    font: inherit;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.age-consent-floating[data-visible="true"] {
    display: inline-flex;
}

/* STATO ACCESSIBILE NASCOSTO */

.age-consent-status {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (max-width: 980px) {
    .age-consent-banner {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .age-consent-banner-actions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .age-consent-banner {
        right: 10px;
        bottom: 10px;
        left: 10px;
        width: auto;
        padding: 20px 16px 16px;
        gap: 18px;
        border-radius: 20px;
    }

    .age-consent-banner-copy {
        padding-right: 34px;
    }

    .age-consent-banner h2 {
        font-size: 1.35rem;
    }

    .age-consent-banner p {
        font-size: 0.8rem;
    }

    .age-consent-banner-actions {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .age-consent-button {
        width: 100%;
        min-height: 45px;
    }

    .age-consent-close {
        top: 14px;
        right: 14px;
        width: 36px;
        height: 36px;
    }

    .age-consent-modal {
        top: auto;
        right: 8px;
        bottom: 8px;
        left: 8px;
        width: auto;
        max-height: calc(100dvh - 16px);
        padding: 24px 18px 18px;
        border-radius: 22px;
        transform: translateY(calc(100% + 18px));
    }

    .age-consent-modal[data-open="true"] {
        transform: translateY(0);
    }

    .age-consent-category {
        gap: 16px;
    }

    .age-consent-modal-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .age-consent-modal-actions .age-consent-button-primary {
        min-width: 0;
        order: -1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .age-consent-backdrop,
    .age-consent-banner,
    .age-consent-modal,
    .age-consent-button,
    .age-consent-switch span,
    .age-consent-switch span::after {
        transition: none;
    }
}
