/****** BANNER COOKIE - Linee guida Garante Privacy ******/
/* Classi con prefisso gsp-cc per non interferire con il tema. */

.gsp-cc {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99998;
    background: rgba(20, 24, 28, .55);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 16px;
}

.gsp-cc[hidden] {
    display: none;
}

.gsp-cc__banner {
    position: relative;
    width: 100%;
    max-width: 760px;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    color: #2b3742;
    border-radius: 6px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .3);
    padding: 28px 32px 24px;
    font-family: 'Open Sans', 'Lato', sans-serif;
    font-size: 14px;
    line-height: 1.6;
}

.gsp-cc__close {
    position: absolute;
    top: 8px;
    right: 12px;
    border: 0;
    background: none;
    color: #8a949e;
    font-size: 28px;
    line-height: 1;
    padding: 4px 8px;
    cursor: pointer;
}

.gsp-cc__close:hover {
    color: #2b3742;
}

.gsp-cc__title {
    margin: 0 0 12px;
    font-size: 20px;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #2b3742;
}

.gsp-cc__text {
    margin: 0 0 20px;
    color: #4a545e;
}

.gsp-cc__text a {
    color: #e31d3b;
    text-decoration: underline;
}

.gsp-cc__azioni {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.gsp-cc__azioni--pannello {
    margin-top: 20px;
}

/* Accetta e Rifiuta hanno lo stesso peso grafico, come richiesto dal Garante. */
.gsp-cc__btn {
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 12px 22px;
    border-radius: 3px;
    cursor: pointer;
    transition: opacity .2s ease;
}

.gsp-cc__btn:hover {
    opacity: .85;
}

.gsp-cc__btn--primario {
    flex: 1 1 180px;
    border: 2px solid #e31d3b;
    background: #e31d3b;
    color: #fff;
}

.gsp-cc__btn--link {
    flex: 1 1 140px;
    border: 2px solid #c4ccd3;
    background: transparent;
    color: #2b3742;
}

.gsp-cc__pannello {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e4e8eb;
}

.gsp-cc__pannello[hidden] {
    display: none;
}

.gsp-cc__categoria {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid #f0f3f5;
}

.gsp-cc__categoria:last-of-type {
    border-bottom: 0;
}

.gsp-cc__categoria-testo strong {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}

.gsp-cc__categoria-testo p {
    margin: 0;
    font-size: 13px;
    color: #6b757e;
}

.gsp-cc__sempre {
    font-weight: 400;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #8a949e;
    margin-left: 6px;
}

/* Interruttore on/off */
.gsp-cc__switch {
    position: relative;
    flex: 0 0 auto;
    width: 46px;
    height: 26px;
    margin: 2px 0 0;
}

.gsp-cc__switch input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
    z-index: 1;
}

.gsp-cc__switch input:disabled {
    cursor: not-allowed;
}

.gsp-cc__slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 46px;
    height: 26px;
    background: #c4ccd3;
    border-radius: 26px;
    transition: background .2s ease;
}

.gsp-cc__slider:before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s ease;
}

.gsp-cc__switch input:checked + .gsp-cc__slider {
    background: #e31d3b;
}

.gsp-cc__switch input:checked + .gsp-cc__slider:before {
    transform: translateX(20px);
}

.gsp-cc__switch input:disabled + .gsp-cc__slider {
    background: #a7b0b8;
}

.gsp-cc__switch input:focus-visible + .gsp-cc__slider {
    outline: 2px solid #2b3742;
    outline-offset: 2px;
}

/* Pulsante per riaprire le preferenze in qualsiasi momento */
.gsp-cc__riapri {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 9990;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #2b3742;
    color: #fff;
    line-height: 1;
    cursor: pointer;
    opacity: .55;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
    transition: opacity .2s ease;
}

.gsp-cc__riapri svg {
    display: block;
    width: 22px;
    height: 22px;
}

.gsp-cc__riapri:hover {
    opacity: 1;
}

.gsp-cc__riapri[hidden] {
    display: none;
}

@media all and (max-width: 767px) {
    .gsp-cc {
        padding: 0;
    }

    .gsp-cc__banner {
        max-height: 92vh;
        border-radius: 6px 6px 0 0;
        padding: 24px 20px 20px;
    }

    .gsp-cc__btn--primario,
    .gsp-cc__btn--link {
        flex: 1 1 100%;
    }

    .gsp-cc__riapri {
        width: 38px;
        height: 38px;
    }

    .gsp-cc__riapri svg {
        width: 20px;
        height: 20px;
    }
}
