/* studiociba - Banner del consenso cookie, caricato da tutte le pagine.
   Una striscia sola in basso: non deve fermare chi sta guardando il sito.
   Accetta e rifiuta hanno lo stesso peso visivo, per scelta: rifiutare non
   puo' costare piu' fatica di accettare. */

#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 999999; /* Superiore a qualsiasi altro elemento */
    font-family: var(--helv);
    background-color: #000000;
    box-sizing: border-box;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
    transform: translateY(100%);
    opacity: 0;
}

#cookie-banner.cookie-banner-visible {
    transform: translateY(0);
    opacity: 1;
}

#cookie-banner.cookie-banner-hidden {
    display: none;
}

.cookie-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 32px;
    row-gap: 4px;
    /* Nelle home segue la barra (--barra-lato), come la striscia della frase
       che ci sta sopra; nelle schede e nella privacy, che non la definiscono,
       resta 48px. */
    padding: 6px var(--barra-lato, 48px);
    padding-bottom: max(6px, env(safe-area-inset-bottom));
    box-sizing: border-box;
}

.cookie-text {
    flex: 1 1 320px;
    margin: 0;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.35;
    color: #ffffff;
    text-align: left;
    text-transform: lowercase;
    user-select: text;
}

.cookie-policy-link {
    color: #ffffff;
    text-decoration: underline;
    transition: opacity 0.2s ease;
}

.cookie-policy-link:hover {
    opacity: 0.7;
}

/* Pannello Preferenze Granulari */
.cookie-pref-hidden {
    display: none !important;
}

.cookie-pref-options {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 20px;
}

.cookie-pref-option {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: #ffffff;
    text-transform: lowercase;
    cursor: pointer;
    user-select: none;
}

.cookie-pref-option input[type="checkbox"] {
    accent-color: #ffffff;
    cursor: pointer;
    width: 13px;
    height: 13px;
    margin: 0;
}

.cookie-buttons-section {
    display: flex;
    gap: 4px;
    margin-left: auto;
}

.cookie-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-family: var(--helv);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: lowercase;
    white-space: nowrap;
    cursor: pointer;
    padding: 6px 10px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.cookie-btn:hover {
    background-color: #ffffff;
    color: #000000;
}

.cookie-btn:focus-visible {
    outline: 2px solid #ffffff;
}

.cookie-btn-hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .cookie-content {
        padding: 8px var(--barra-lato, 16px);
        padding-bottom: max(4px, env(safe-area-inset-bottom));
    }
    .cookie-text {
        flex-basis: 100%;
    }
    .cookie-buttons-section {
        width: 100%;
        margin-left: 0;
        justify-content: space-between;
    }
    .cookie-btn {
        padding: 10px 4px; /* Bersaglio comodo per il dito, in altezza */
    }
}
