/* ==========================================================================
   SYNERGY ADVANCED AESTHETICS - COOKIE BANNER (stesso linguaggio del popup promo)
   Il markup e il CSS base sono del parent (inc/seo.php, stampati nel footer):
   qui si ridisegna soltanto, con `body` davanti per prevalere senza !important.
   ========================================================================== */

body {
    --tw-cookie-primary: #d4a373;
    --syn-ck-bg: linear-gradient(145deg, rgba(28, 25, 23, 0.97) 0%, rgba(18, 16, 15, 0.98) 100%);
    --syn-ck-line: rgba(212, 163, 115, 0.3);
    --syn-ck-text: #d1d5db;
    --syn-ck-gold: #d4a373;
}

/* ---- Banner: piccolo, in basso a sinistra, poco invadente ---- */
body .tw-cookie-banner {
    left: 20px;
    right: auto;
    bottom: 20px;
    width: calc(100% - 40px);
    max-width: 340px;
    padding: 16px 18px;
    gap: 12px;
    transform: translateY(24px);
    background: var(--syn-ck-bg);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid var(--syn-ck-line);
    border-radius: 14px;
    box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.6);
    font-family: var(--font-sans, 'Inter', sans-serif);
}
body .tw-cookie-banner.show {
    transform: translateY(0);
}

body .tw-cookie-text {
    font-size: 0.78rem;
    line-height: 1.55;
    color: var(--syn-ck-text);
}

body .tw-cookie-text a {
    color: var(--syn-ck-gold);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: rgba(212, 163, 115, 0.45);
    transition: color 0.2s ease;
}
body .tw-cookie-text a:hover {
    color: #f1d3b0;
}

body .tw-cookie-actions {
    gap: 6px;
    justify-content: space-between;
}

/* ---- Pulsanti ---- */
body .tw-cookie-btn {
    padding: 8px 12px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

body .tw-cookie-btn:focus-visible,
body .tw-cookie-modal-close:focus-visible {
    outline: 2px solid var(--syn-ck-gold);
    outline-offset: 2px;
}

/* Rifiuta e Personalizza: testo sobrio, senza riempimento. Restano pulsanti
   ben visibili e di pari dignita' rispetto ad Accetta (LPD/GDPR). */
body .tw-cookie-btn-decline,
body .tw-cookie-btn-customize {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #d1d5db;
    box-shadow: none;
}
body .tw-cookie-btn-decline:hover,
body .tw-cookie-btn-customize:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
    box-shadow: none;
}

/* Accetta: oro pieno, senza ombra */
body .tw-cookie-btn-accept {
    background: var(--syn-ck-gold);
    color: #12100f;
    font-weight: 600;
    box-shadow: none;
}
body .tw-cookie-btn-accept:hover {
    background: #dfb284;
    filter: none;
    transform: none;
    box-shadow: none;
}

/* ---- Centro preferenze ---- */
body .tw-cookie-modal-overlay {
    background: rgba(10, 10, 12, 0.78);
}

body .tw-cookie-modal-content {
    max-width: 560px;
    padding: 32px;
    background: var(--syn-ck-bg);
    border: 1px solid var(--syn-ck-line);
    border-radius: 20px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8);
    font-family: var(--font-sans, 'Inter', sans-serif);
}

body .tw-cookie-modal-header,
body .tw-cookie-modal-footer {
    border-color: rgba(255, 255, 255, 0.1);
}

body .tw-cookie-modal-header h3 {
    font-family: var(--font-serif, 'Cormorant Garamond', serif);
    font-size: 1.65rem;
    font-weight: 600;
    line-height: 1.2;
    color: #fff;
}

body .tw-cookie-modal-close {
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #f3f4f6;
    font-size: 22px;
    line-height: 1;
    transition: background 0.2s ease, border-color 0.2s ease;
}
body .tw-cookie-modal-close:hover {
    background: rgba(212, 163, 115, 0.25);
    border-color: rgba(212, 163, 115, 0.5);
    color: #fff;
}

body .tw-cookie-modal-body p {
    color: var(--syn-ck-text);
}

body .tw-cookie-option-row {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
}
body .tw-cookie-option-info strong {
    color: #fff;
}
body .tw-cookie-option-info span {
    color: #9ca3af;
}

/* Interruttori */
body .tw-cookie-slider {
    background-color: rgba(255, 255, 255, 0.22);
}
body .tw-cookie-switch-label input:checked + .tw-cookie-slider {
    background-color: var(--syn-ck-gold);
}
body .tw-cookie-switch-label input:focus-visible + .tw-cookie-slider {
    box-shadow: 0 0 0 2px #12100f, 0 0 0 4px var(--syn-ck-gold);
}

/* Scrollbar */
body .tw-cookie-modal-body::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.06); }
body .tw-cookie-modal-body::-webkit-scrollbar-thumb { background: rgba(212, 163, 115, 0.45); }
body .tw-cookie-modal-body::-webkit-scrollbar-thumb:hover { background: var(--syn-ck-gold); }

/* ---- Mobile ---- */
@media (max-width: 580px) {
    body .tw-cookie-banner {
        left: 10px;
        bottom: 10px;
        width: calc(100% - 20px);
        max-width: none;
        padding: 14px;
    }
    body .tw-cookie-actions {
        flex-direction: row;
        width: 100%;
        gap: 6px;
    }
    body .tw-cookie-btn {
        flex: 1 1 auto;
        width: auto;
        padding: 9px 6px;
    }
    body .tw-cookie-modal-content {
        padding: 22px;
    }
    body .tw-cookie-modal-header h3 {
        font-size: 1.4rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    body .tw-cookie-btn,
    body .tw-cookie-text a,
    body .tw-cookie-modal-close {
        transition: none;
    }
}
