/* ============================================
   COOKIE CONSENT BANNER - GDPR COMPLIANT
   ============================================ */

.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.98), rgba(40, 40, 40, 0.98));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 3px solid #c41e3a;
    box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.5);
    z-index: 999999;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    padding: 25px 20px;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

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

.cookie-consent-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
}

.cookie-consent-icon {
    font-size: 50px;
    animation: cookieBounce 2s infinite;
}

@keyframes cookieBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

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

.cookie-consent-text h3 {
    color: #fff;
    font-size: 1.3rem;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.cookie-consent-text p {
    color: #ddd;
    margin: 0 0 15px 0;
    line-height: 1.6;
    font-size: 0.95rem;
}

.cookie-consent-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.cookie-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    color: #ccc;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.cookie-option:hover {
    color: #fff;
}

.cookie-option input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #c41e3a;
}

.cookie-option strong {
    color: #fff;
}

.cookie-privacy-link {
    color: #c41e3a;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    display: inline-block;
}

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

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

.cookie-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cookie-btn-decline {
    background: transparent;
    color: #999;
    border: 2px solid #555;
}

.cookie-btn-decline:hover {
    background: #555;
    color: #fff;
    border-color: #666;
}

.cookie-btn-accept {
    background: linear-gradient(135deg, #555, #666);
    color: #fff;
}

.cookie-btn-accept:hover {
    background: linear-gradient(135deg, #666, #777);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.cookie-btn-accept-all {
    background: linear-gradient(135deg, #c41e3a, #8b1429);
    color: #fff;
}

.cookie-btn-accept-all:hover {
    background: linear-gradient(135deg, #e63950, #a01530);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.5);
}

/* Responsive */
@media (max-width: 768px) {
    .cookie-consent-banner {
        padding: 20px 15px;
        /* Rimuovi backdrop-filter per compatibilità mobile */
        backdrop-filter: none;
        /* Background solido su mobile */
        background: rgba(20, 20, 20, 0.98);
        /* Assicura che sia sopra tutto */
        z-index: 9999999 !important;
        /* Più spazio sotto per toolbar mobile */
        padding-bottom: 30px;
    }

    .cookie-consent-content {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .cookie-consent-icon {
        text-align: center;
        font-size: 35px;
    }

    .cookie-consent-text {
        text-align: center;
    }

    .cookie-consent-text h3 {
        font-size: 1.1rem;
    }

    .cookie-consent-text p {
        font-size: 0.85rem;
    }

    .cookie-consent-details {
        text-align: left;
    }

    .cookie-option {
        font-size: 0.85rem;
    }

    .cookie-consent-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .cookie-btn {
        width: 100%;
        text-align: center;
        padding: 14px 20px;
        font-size: 1rem;
    }
}

/* Accessibility */
.cookie-btn:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.cookie-option input[type="checkbox"]:focus {
    outline: 2px solid #c41e3a;
    outline-offset: 2px;
}

/* Impostazioni cookie link nel footer */
.cookie-settings-link {
    color: #c41e3a;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

.cookie-settings-link:hover {
    color: #e63950;
    text-decoration: underline;
}
