/* =========================================================
   SPISOTTI CONSENT
   Stile neutro per pannello privacy e contenuti bloccati
========================================================= */


/* =========================================================
   BASE
========================================================= */

#spisotti-consent-banner,
#spisotti-consent-banner *,
.spisotti-consent-placeholder,
.spisotti-consent-placeholder * {

    box-sizing: border-box;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

}


/* =========================================================
   CONTENITORE DEL PANNELLO
========================================================= */

.spisotti-consent-banner {

    position: fixed;

    right: 20px;
    bottom: 20px;

    width: min(430px, calc(100vw - 40px));

    z-index: 2147483647;

}


/* =========================================================
   PANNELLO
========================================================= */

.spisotti-consent-panel {

    width: 100%;

    padding: 22px;

    background: #ffffff;
    color: #222222;

    border: 1px solid #d8d8d8;
    border-radius: 12px;

    box-shadow:
        0 8px 30px
        rgba(0, 0, 0, 0.16);

    line-height: 1.45;

}


/* =========================================================
   TITOLI E TESTO
========================================================= */

.spisotti-consent-panel h2 {

    margin:
        0
        0
        10px;

    padding: 0;

    font-size: 1.15rem;
    font-weight: 650;

    line-height: 1.25;

    color: #1f1f1f;

}


.spisotti-consent-panel p {

    margin:
        0
        0
        18px;

    padding: 0;

    font-size: 0.94rem;

    color: #4b4b4b;

}


/* =========================================================
   HEADER PREFERENZE
========================================================= */

.spisotti-consent-header {

    display: flex;

    align-items: flex-start;
    justify-content: space-between;

    gap: 15px;

}


.spisotti-consent-header h2 {

    margin-bottom: 10px;

}


/* =========================================================
   PULSANTE CHIUSURA
========================================================= */

.spisotti-consent-close {

    appearance: none;

    flex: 0 0 auto;

    margin: -5px -5px 0 0;
    padding: 2px 7px;

    border: 0;
    background: transparent;

    color: #555555;

    font: inherit;
    font-size: 1.55rem;
    line-height: 1;

    cursor: pointer;

    border-radius: 5px;

}


.spisotti-consent-close:hover {

    background: #f0f0f0;
    color: #111111;

}


.spisotti-consent-close:focus-visible {

    outline: 2px solid #333333;
    outline-offset: 2px;

}


/* =========================================================
   ELENCO SERVIZI
========================================================= */

.spisotti-consent-services {

    display: flex;
    flex-direction: column;

    gap: 8px;

    margin:
        4px
        0
        20px;

}


/* =========================================================
   SINGOLO SERVIZIO
========================================================= */

.spisotti-consent-service {

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 18px;

    padding: 13px 14px;

    border: 1px solid #dddddd;
    border-radius: 8px;

    background: #fafafa;

    cursor: pointer;

}


.spisotti-consent-service:hover {

    background: #f5f5f5;

}


/* =========================================================
   TESTO SERVIZIO
========================================================= */

.spisotti-consent-service-text {

    display: flex;
    flex-direction: column;

    gap: 2px;

    min-width: 0;

}


.spisotti-consent-service-text strong {

    font-size: 0.95rem;
    font-weight: 650;

    color: #222222;

}


.spisotti-consent-service-text span {

    font-size: 0.82rem;

    color: #666666;

}


/* =========================================================
   CHECKBOX
========================================================= */

.spisotti-consent-service input[type="checkbox"] {

    flex: 0 0 auto;

    width: 20px;
    height: 20px;

    margin: 0;

    cursor: pointer;

    accent-color: #333333;

}


/* =========================================================
   AZIONI
========================================================= */

.spisotti-consent-actions {

    display: flex;

    align-items: center;

    gap: 8px;

    flex-wrap: wrap;

}


.spisotti-consent-actions-compact {

    justify-content: flex-end;

}


/* =========================================================
   PULSANTI
========================================================= */

.spisotti-consent-button,
.spisotti-consent-content-button {

    appearance: none;

    margin: 0;

    padding: 9px 13px;

    border-radius: 7px;

    font: inherit;
    font-size: 0.87rem;
    font-weight: 600;

    line-height: 1.2;

    cursor: pointer;

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;

}


/* =========================================================
   PULSANTE PRINCIPALE
========================================================= */

.spisotti-consent-button-primary,
.spisotti-consent-content-button {

    border: 1px solid #292929;

    background: #292929;
    color: #ffffff;

}


.spisotti-consent-button-primary:hover,
.spisotti-consent-content-button:hover {

    background: #111111;
    border-color: #111111;

}


/* =========================================================
   PULSANTI SECONDARI
========================================================= */

.spisotti-consent-button-secondary {

    border: 1px solid #bdbdbd;

    background: #ffffff;
    color: #292929;

}


.spisotti-consent-button-secondary:hover {

    background: #f2f2f2;
    border-color: #999999;

}


/* =========================================================
   FOCUS ACCESSIBILE
========================================================= */

.spisotti-consent-button:focus-visible,
.spisotti-consent-content-button:focus-visible,
.spisotti-consent-service input:focus-visible {

    outline: 2px solid #333333;
    outline-offset: 2px;

}


/* =========================================================
   PLACEHOLDER CONTENUTI BLOCCATI
========================================================= */

.spisotti-consent-placeholder {

    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 14px;

    width: 100%;

    min-height: 220px;

    padding: 30px;

    background: #f5f5f5;

    border: 1px solid #d8d8d8;
    border-radius: 8px;

    text-align: center;

    color: #333333;

}


.spisotti-consent-placeholder p {

    max-width: 520px;

    margin: 0;

    font-size: 0.94rem;
    line-height: 1.5;

}


/* =========================================================
   IFRAME YOUTUBE
========================================================= */

.spisotti-consent-youtube iframe {

    display: block;

    width: 100%;

    aspect-ratio: 16 / 9;

    border: 0;

}


/* =========================================================
   LINK / PULSANTE FOOTER
========================================================= */

#spisotti-consent-settings {

    appearance: none;

    margin: 0;
    padding: 0;

    border: 0;
    background: none;

    color: inherit;

    font: inherit;

    text-decoration: underline;

    cursor: pointer;

}


#spisotti-consent-settings:hover {

    text-decoration-thickness: 2px;

}


#spisotti-consent-settings:focus-visible {

    outline: 2px solid currentColor;
    outline-offset: 3px;

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

    .spisotti-consent-banner {

        right: 12px;
        bottom: 12px;

        width:
            calc(100vw - 24px);

    }


    .spisotti-consent-panel {

        padding: 18px;

        border-radius: 10px;

    }


    .spisotti-consent-actions {

        display: grid;

        grid-template-columns:
            1fr
            1fr;

        width: 100%;

    }


    .spisotti-consent-actions-compact {

        grid-template-columns:
            1fr
            1fr
            1fr;

    }


    .spisotti-consent-button {

        width: 100%;

        padding:
            10px
            8px;

    }


    .spisotti-consent-service {

        padding:
            12px;

    }

}


/* =========================================================
   MOBILE MOLTO STRETTO
========================================================= */

@media (max-width: 380px) {

    .spisotti-consent-actions,
    .spisotti-consent-actions-compact {

        grid-template-columns:
            1fr;

    }

}

.spisotti-consent-privacy-link {
    color: inherit;
    text-decoration: underline;
}

.spisotti-consent-placeholder-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 520px;
}

.spisotti-consent-warning {
    width: 100%;
    max-width: 520px;
    padding: 10px 14px;
    background: #ffffff;
    border: 1px solid #d8d8d8;
    border-radius: 6px;
    font-size: 0.86rem;
    line-height: 1.45;
    color: #222222;
}

@media (max-width: 600px) {

    .spisotti-consent-placeholder {
        padding: 20px 16px;
    }

    .spisotti-consent-placeholder-actions {
        flex-direction: column;
    }

    .spisotti-consent-placeholder-actions .spisotti-consent-content-button,
    .spisotti-consent-placeholder-actions .spisotti-consent-button {
        width: 100%;
    }

}