:root {
    --jt-cookie-offset: 16px;
    --jt-cookie-top-offset: 90px;
    --jt-cookie-bg: #ffffff;
    --jt-cookie-text: #1d2d42;         /* Grigio-blu scuro per i testi */
    --jt-cookie-muted: #5c6f84;        /* Grigio ardesia per i testi secondari */
    --jt-cookie-border: #ebd9dd;       /* Bordo con una leggerissima punta di rosa/amaranto */
    --jt-cookie-accent: #800020;       /* Amaranto istituzionale intenso per il tasto primario */
    --jt-cookie-accent-text: #ffffff;  /* Testo bianco sul bottone amaranto */
    --jt-cookie-focus: #a30029;        /* Amaranto più acceso per il focus di accessibilità */
    --jt-cookie-overlay: rgba(29, 45, 66, 0.5); /* Sfondo scuro per il blocco preferenze */
}
/* Integrazione nativa del font di Agentur Luise */
.jt-cookie-root,
.jt-cookie-root *,
.jt-cookie-root *::before,
.jt-cookie-root *::after {
    box-sizing: border-box;
    font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
}
/* Bottone Opzioni / Impostazioni con sfondo differenziato */
.jt-cookie-button-options {
    color: #800020 !important;              /* Testo Amaranto */
    background: #f4f6f9 !important;          /* Sfondo grigio-azzurrino chiaro per staccare dal bianco */
    border-color: #cbd4e1 !important;        /* Bordo neutro e morbido */
}
/* Stato Hover per il bottone Impostazioni */
.jt-cookie-button-options:hover {
    background-color: #ebd9dd !important;    /* Diventa un rosa/amaranto chiarissimo al passaggio */
    border-color: #800020 !important;
    color: #5a0016 !important;
}
/* Gestione degli stati Hover controllati */
.jt-cookie-button:hover,
.jt-cookie-launcher:hover {
    filter: none;                      
    background-color: #5a0016;         /* Amaranto più scuro e profondo al passaggio del mouse */
    color: #ffffff;
}
/* Bottone Accetta Principale */
.jt-cookie-button:not(.jt-cookie-button-options) {
    background-color: var(--jt-cookie-accent) !important;
    color: var(--jt-cookie-accent-text) !important;
    border: 2px solid var(--jt-cookie-accent) !important;
}

.jt-cookie-button:not(.jt-cookie-button-options):hover {
    background-color: #5a0016 !important;    /* Amaranto scuro profondo */
    border-color: #5a0016 !important;
}
/* Sfondo dei blocchi delle categorie cookie */
.jt-cookie-category {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 15px;
    color: inherit;
    background: #fdf8f9;               /* Sfondo soft coordinato */
    border: 1px solid var(--jt-cookie-border);
    border-radius: 10px;
}
/* Colore verde per il badge Sempre Attivo (mantiene il significato semantico standard) */
.jt-cookie-always-active {
    flex: 0 0 auto;
    color: #28a745;                    
    font-size: 0.78rem;
    font-weight: 700;
}
/* Sfondo dello switch quando è spento */
.jt-cookie-switch span {
    position: absolute;
    inset: 0;
    background: #b8c2cc;               /* Grigio neutro e pulito */
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.18s ease;
}
/* Configurazione dell'icona fluttuante (Launcher) in stile Amaranto più piccolo e discreto */
.jt-cookie-launcher {
    position: fixed;
    bottom: 5px;
    left: 3px !important; /* <--- Lo sposta a 3px dal margine sinistro (? che è 5 nel custom.css di helix) */
    width: 15px !important;
    height: 15px !important;
    min-width: 15px !important;
    min-height: 15px !important;
    max-width: 15px !important;
    max-height: 15px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    margin: 0 !important;
    background: var(--jt-cookie-accent) !important;
    color: var(--jt-cookie-accent-text) !important;
    border: none !important;
    box-shadow: 0px 0px 7px rgba(128, 0, 32, 0.25) !important;
    transition: transform 0.2s ease, background-color 0.2s ease !important;
    z-index: 9997;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
/* Icona interna perfettamente centrata e rimpicciolita */
.jt-cookie-launcher svg {
    width: 9px !important;   /* Ridotto per non toccare i bordi del cerchio */
    height: 9px !important;
    margin: 0 !important;    /* Rimuove disallineamenti */
    padding: 0 !important;
    fill: currentColor !important;
    stroke: currentColor !important;
    display: block !important;
}
/* Effetto al passaggio del mouse sull'icona */
.jt-cookie-launcher:hover {
    background-color: #5a0016 !important; /* Amaranto più scuro, coerente con i bottoni */
    transform: scale(1.35); /* Un leggero effetto di ingrandimento per feedback visivo */
}

/* COMMENTATO L'ORIGINALE, SOPRA POSTATO DA AI
:root {
    --jt-cookie-offset: 16px;
    --jt-cookie-top-offset: 90px;
    --jt-cookie-bg: #e6dadf;
    --jt-cookie-text: #17213a;
    --jt-cookie-muted: #526077;
    --jt-cookie-border: #cbd4e1;
    --jt-cookie-accent: #17326e;
    --jt-cookie-accent-text: #ffffff;
    --jt-cookie-focus: #86163b;
    --jt-cookie-overlay: rgba(134, 22, 59, 0.35);
}

.jt-cookie-root,
.jt-cookie-root *,
.jt-cookie-root *::before,
.jt-cookie-root *::after {
    box-sizing: border-box;
}
 */
 
.jt-cookie-root [hidden] {
    display: none !important;
}

.jt-cookie-notice {
    position: fixed;
    z-index: 9999;
    width: min(760px, calc(100% - 30px));
    padding: 20px;
    color: var(--jt-cookie-text);
    background: var(--jt-cookie-bg);
    border: 1px solid var(--jt-cookie-border);
    border-radius: 12px;
    box-shadow: 0 14px 42px rgba(15, 23, 42, 0.18);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.jt-cookie-notice.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.jt-cookie-title,
.jt-cookie-preferences-title,
.jt-cookie-category h3 {
    margin: 0;
    color: inherit;
    font-family: inherit;
}

.jt-cookie-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.35;
}

.jt-cookie-message,
.jt-cookie-preferences-message,
.jt-cookie-category p {
    margin: 6px 0 0;
    color: var(--jt-cookie-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.jt-cookie-link {
    color: var(--jt-cookie-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.jt-cookie-actions,
.jt-cookie-preferences-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.jt-cookie-actions {
    justify-content: flex-end;
}

.jt-cookie-button,
.jt-cookie-launcher {
    appearance: none;
    min-height: 42px;
    padding: 10px 16px;
    color: var(--jt-cookie-accent-text);
    background: var(--jt-cookie-accent);
    border: 2px solid var(--jt-cookie-accent);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
}

/* Bottone Opzioni / Rifiuta 
.jt-cookie-button-options {
    color: var(--jt-cookie-text);
    background: var(--jt-cookie-bg);
    border-color: var(--jt-cookie-border);
}
Effetto Hover differenziato per i bottoni
.jt-cookie-button:hover,
.jt-cookie-launcher:hover {
    filter: brightness(0.94);
}
*/

.jt-cookie-button:focus-visible,
.jt-cookie-launcher:focus-visible,
.jt-cookie-close:focus-visible,
.jt-cookie-link:focus-visible,
.jt-cookie-switch input:focus-visible + span {
    outline: 3px solid var(--jt-cookie-focus);
    outline-offset: 3px;
}

/*
.jt-cookie-launcher {
    position: fixed;
    z-index: 9997;
    bottom: var(--jt-cookie-launcher-y, 72px);
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    min-height: 48px;
    padding: 0;
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
}
*/
.jt-cookie-launcher-left {
    left: var(--jt-cookie-launcher-x, 16px);
}

.jt-cookie-launcher-right {
    right: var(--jt-cookie-launcher-x, 16px);
}

/*
.jt-cookie-launcher svg {
    display: block;
    width: 24px;
    height: 24px;
}
*/

@media (forced-colors: active) {
    .jt-cookie-launcher {
        border-color: ButtonText;
        color: ButtonText;
        background: ButtonFace;
        box-shadow: none;
    }
}

.jt-cookie-backdrop {
    position: fixed;
    z-index: 10000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    background: var(--jt-cookie-overlay);
    overflow-y: auto;
}

.jt-cookie-preferences {
    width: min(720px, 100%);
    max-height: min(760px, calc(100vh - 40px));
    padding: 22px;
    color: var(--jt-cookie-text);
    background: var(--jt-cookie-bg);
    border: 1px solid var(--jt-cookie-border);
    border-radius: 14px;
    box-shadow: 0 22px 64px rgba(15, 23, 42, 0.28);
    overflow-y: auto;
}

.jt-cookie-preferences:focus {
    outline: none;
}

.jt-cookie-preferences-header {
    display: flex;
    align-items: flex-start;
    gap: 18px;
}

.jt-cookie-preferences-header > div {
    flex: 1 1 auto;
}

.jt-cookie-preferences-title {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.3;
}

.jt-cookie-close {
    appearance: none;
    position: relative;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    padding: 0;
    color: var(--jt-cookie-text);
    background: transparent;
    border: 1px solid var(--jt-cookie-border);
    border-radius: 999px;
    cursor: pointer;
}

.jt-cookie-close::before,
.jt-cookie-close::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
}

.jt-cookie-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.jt-cookie-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.jt-cookie-categories {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

/* Sfondo dei blocchi delle categorie cookie
.jt-cookie-category {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 15px;
    color: inherit;
    background: #f8fafc;
    border: 1px solid var(--jt-cookie-border);
    border-radius: 10px;
}
*/

.jt-cookie-category-copy {
    display: grid;
    flex: 1 1 auto;
    gap: 4px;
    min-width: 0;
}

.jt-cookie-category-copy h3,
.jt-cookie-category-copy strong {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
}

.jt-cookie-category-copy p,
.jt-cookie-category-copy > span {
    margin: 0;
    color: var(--jt-cookie-muted);
    font-size: 0.84rem;
    line-height: 1.45;
}

/* Colore verde istituzionale per il badge Sempre Attivo 
.jt-cookie-always-active {
    flex: 0 0 auto;
    color: #216e39;
    font-size: 0.78rem;
    font-weight: 700;
}
*/

.jt-cookie-switch {
    position: relative;
    flex: 0 0 auto;
    width: 46px;
    height: 26px;
}

.jt-cookie-switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

/* Colore di sfondo dello switch quando è spento 
.jt-cookie-switch span {
    position: absolute;
    inset: 0;
    background: #7b879a;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.18s ease;
}
*/

.jt-cookie-switch span::after {
    content: "";
    position: absolute;
    top: 3px;
    inset-inline-start: 3px;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.3);
    transition: transform 0.18s ease;
}

.jt-cookie-switch input:checked + span {
    background: var(--jt-cookie-accent);
}

.jt-cookie-switch input:checked + span::after {
    transform: translateX(20px);
}

[dir="rtl"] .jt-cookie-switch input:checked + span::after {
    transform: translateX(-20px);
}

.jt-cookie-policy-row {
    margin: 15px 0 0;
    font-size: 0.86rem;
}

.jt-cookie-preferences-actions {
    justify-content: flex-end;
}

.jt-cookie-preferences-open {
    overflow: hidden;
}

.jt-pos-br {
    right: var(--jt-cookie-offset);
    bottom: var(--jt-cookie-offset);
}

.jt-pos-bl {
    left: var(--jt-cookie-offset);
    bottom: var(--jt-cookie-offset);
}

.jt-pos-tr {
    right: var(--jt-cookie-offset);
    top: var(--jt-cookie-top-offset);
}

.jt-pos-tl {
    left: var(--jt-cookie-offset);
    top: var(--jt-cookie-top-offset);
}

.jt-pos-bc {
    left: 50%;
    bottom: var(--jt-cookie-offset);
    transform: translateX(-50%);
}

@media (max-width: 680px) {
    :root {
        --jt-cookie-offset: 10px;
        --jt-cookie-top-offset: 75px;
    }

    .jt-cookie-notice {
        width: calc(100% - 20px);
        padding: 17px;
    }

    .jt-cookie-actions,
    .jt-cookie-preferences-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .jt-cookie-button {
        width: 100%;
    }

    .jt-cookie-backdrop {
        align-items: end;
        padding: 10px;
    }

    .jt-cookie-preferences {
        max-height: calc(100vh - 20px);
        padding: 18px;
    }

    .jt-cookie-category {
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .jt-cookie-notice,
    .jt-cookie-switch span,
    .jt-cookie-switch span::after {
        transition: none;
    }
}
