/* ===================================
   COOKIE BANNER STYLES
   Conforme al GDPR - Cookie Law EU
==================================== */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
    color: white;
    padding: 20px;
    z-index: 10000;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(100%);
    transition: transform 0.4s ease-out;
    font-family: 'Poppins', sans-serif;
}

.cookie-banner.active {
    transform: translateY(0);
}

.cookie-banner-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-banner-text {
    flex: 1;
    min-width: 300px;
}

.cookie-banner-text h3 {
    font-size: 1.1rem;
    margin: 0 0 8px 0;
    color: #ff8c00;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-banner-text p {
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
    color: #bdc3c7;
}

.cookie-banner-text a {
    color: #ff8c00;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.cookie-banner-text a:hover {
    color: #ffb347;
}

.cookie-banner-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-btn-accept {
    background: linear-gradient(135deg, #ff8c00, #ff6b00);
    color: white;
}

.cookie-btn-accept:hover {
    background: linear-gradient(135deg, #ff6b00, #ff5722);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 140, 0, 0.4);
}

.cookie-btn-reject {
    background: transparent;
    color: #bdc3c7;
    border: 2px solid #bdc3c7;
}

.cookie-btn-reject:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: white;
}

.cookie-btn-settings {
    background: transparent;
    color: #bdc3c7;
    border: 2px solid #bdc3c7;
}

.cookie-btn-settings:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: white;
}

/* Cookie Settings Panel */
.cookie-settings-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: 'Poppins', sans-serif;
}

.cookie-settings-panel.active {
    display: flex;
}

.cookie-settings-content {
    background: white;
    border-radius: 15px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cookie-settings-header {
    background: linear-gradient(135deg, #2c3e50, #1a252f);
    color: white;
    padding: 20px 25px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-settings-header h2 {
    margin: 0;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cookie-settings-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    transition: transform 0.3s ease;
}

.cookie-settings-close:hover {
    transform: rotate(90deg);
}

.cookie-settings-body {
    padding: 25px;
}

.cookie-category {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ecf0f1;
}

.cookie-category:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

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

.cookie-category-title {
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-category-title i {
    color: #ff8c00;
}

.cookie-toggle {
    position: relative;
    width: 50px;
    height: 26px;
}

.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: 0.3s;
    border-radius: 34px;
}

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

.cookie-toggle input:checked + .cookie-slider {
    background: linear-gradient(135deg, #ff8c00, #ff6b00);
}

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

.cookie-toggle input:disabled + .cookie-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-category-description {
    font-size: 0.85rem;
    color: #7f8c8d;
    line-height: 1.5;
}

.cookie-privacy-link {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #ecf0f1;
    text-align: center;
}

.cookie-privacy-link a {
    color: #ff8c00;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.cookie-privacy-link a:hover {
    color: #ff6b00;
    text-decoration: underline;
}

.cookie-privacy-link a i {
    font-size: 0.8rem;
}

.cookie-settings-footer {
    padding: 20px 25px;
    background: #f8f9fa;
    border-radius: 0 0 15px 15px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.cookie-btn-save {
    background: linear-gradient(135deg, #ff8c00, #ff6b00);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cookie-btn-save:hover {
    background: linear-gradient(135deg, #ff6b00, #ff5722);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 140, 0, 0.4);
}

/* Cookie Icon Fixed */
.cookie-preferences-link {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(44, 62, 80, 0.9);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    text-decoration: none;
}

.cookie-preferences-link:hover {
    background: #ff8c00;
    transform: translateY(-3px);
}

.cookie-preferences-link i {
    transition: transform 0.3s ease;
}

.cookie-preferences-link:hover i {
    transform: rotate(180deg);
}

/* Responsive */
@media (max-width: 768px) {
    .cookie-banner-container {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-banner-text {
        min-width: 100%;
    }
    
    .cookie-banner-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .cookie-btn {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }
    
    .cookie-settings-content {
        max-height: 90vh;
    }
    
    .cookie-settings-footer {
        flex-direction: column;
    }
    
    .cookie-settings-footer .cookie-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Animazione apparizione */
.cookie-banner {
    animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Necessario sempre attivo */
.cookie-category.always-active .cookie-toggle input:disabled + .cookie-slider {
    background: #27ae60;
    opacity: 1;
}