/* Stili base per il cookie consent banner */
#cookie-consent-banner {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: fadeIn 0.5s ease-in-out;
}

.cookie-consent-content {
    margin: 0 auto;
    max-width: 100%;
}

.cookie-consent-content h3 {
    margin-top: 0;
    font-size: 1.2em;
}

.cookie-consent-content p {
    margin-bottom: 10px;
    font-size: 0.9em;
    line-height: 1.4;
}

.cookie-consent-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.cookie-consent-options {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.cookie-category {
    margin-bottom: 8px;
    padding: 8px;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
}

.cookie-category-header label {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 8px;
}

.cookie-desc {
    margin: 2px 0 0;
    font-size: 0.8em;
    opacity: 0.9;
    line-height: 1.3;
}

.cookie-status {
    font-style: italic;
    font-size: 0.75em;
    opacity: 0.8;
}

.cookie-save-btn {
    display: block;
    width: 100%;
    margin-top: 10px;
}

/* Toggle Switch Moderno */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 22px;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 24px;
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .cookie-slider {
    background-color: #3498db;
}

input:checked + .cookie-slider:before {
    transform: translateX(20px);
}

input:disabled + .cookie-slider {
    background-color: #666;
    cursor: not-allowed;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive design */
@media (max-width: 768px) {
    #cookie-consent-banner {
        width: 95% !important;
        padding: 10px !important;
    }
    
    .cookie-consent-buttons {
        flex-direction: column;
    }
    
    .cookie-consent-buttons button {
        width: 100%;
        margin: 3px 0 !important;
    }
    
    .cookie-toggle {
        width: 36px;
        height: 20px;
    }
    
    .cookie-slider:before {
        height: 16px;
        width: 16px;
    }
    
    input:checked + .cookie-slider:before {
        transform: translateX(16px);
    }
}

/* Aggiungi queste regole in fondo al tuo CSS esistente */

/* Riduci dimensioni generali e migliora lo scrolling */
#cookie-consent-banner {
    max-height: 70vh; /* Altezza massima del 70% dello schermo */
    overflow-y: auto; /* Abilita lo scroll se necessario */
}

/* Testo più compatto */
.cookie-consent-content {
    font-size: 0.9em; /* Riduci dimensione base del testo */
}

.cookie-consent-content h3 {
    font-size: 1.1em;
    margin-bottom: 8px;
}

.cookie-consent-content h4 {
    font-size: 1em;
    margin-bottom: 8px;
}

/* Categorie ancora più compatte */
.cookie-category {
    padding: 6px 8px;
    margin-bottom: 6px;
}

.cookie-desc {
    font-size: 0.75em; /* Testo descrizione più piccolo */
    line-height: 1.3;
    margin-top: 3px;
}

/* Toggle switch più piccoli */
.cookie-toggle {
    width: 36px;
    height: 20px;
}

.cookie-slider:before {
    height: 16px;
    width: 16px;
}

input:checked + .cookie-slider:before {
    transform: translateX(16px);
}

/* Pulsanti più compatti */
.cookie-consent-buttons button,
.cookie-save-btn {
    padding: 6px 12px;
    font-size: 0.85em;
}

/* Miglioramenti per mobile */
@media (max-width: 768px) {
    #cookie-consent-banner {
        max-height: 80vh; /* Più spazio su mobile */
        width: 98% !important;
        padding: 8px !important;
    }
    
    .cookie-consent-content {
        font-size: 0.85em;
    }
    
    .cookie-toggle {
        width: 32px;
        height: 18px;
    }
    
    .cookie-slider:before {
        height: 14px;
        width: 14px;
    }
    
    input:checked + .cookie-slider:before {
        transform: translateX(14px);
    }
    
    .cookie-category-header {
        flex-wrap: wrap;
    }
    
    .cookie-status {
        width: 100%;
        margin-top: 2px;
    }
}