/* ============================================================
   COOKIE CONSENT MODAL - GDPR Compliant
   ============================================================ */

.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cookie-modal.active {
    opacity: 1;
    visibility: visible;
}

.cookie-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.cookie-content {
    position: relative;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 2px solid rgba(37, 99, 235, 0.3);
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.cookie-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0;
}

.cookie-body {
    padding: 2rem;
}

.cookie-description {
    color: #cbd5e1;
    line-height: 1.6;
    margin-bottom: 2rem;
    font-size: 1rem;
}

.cookie-categories {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.cookie-category {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.cookie-category:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(37, 99, 235, 0.3);
}

.cookie-category-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.cookie-category-info {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex: 1;
}

.cookie-category-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #f1f5f9;
    margin: 0 0 0.3rem 0;
}

.cookie-category-desc {
    font-size: 0.9rem;
    color: #94a3b8;
    margin: 0;
}

/* Toggle Switch */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
    margin-top: 2px;
}

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

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

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

.cookie-switch input:checked + .cookie-slider {
    background-color: #2563eb;
}

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

.cookie-switch input:disabled + .cookie-slider {
    background-color: #64748b;
    opacity: 0.6;
    cursor: not-allowed;
}

.cookie-policy-link {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-top: 1.5rem;
}

.cookie-policy-link a {
    color: #3b82f6;
    text-decoration: underline;
    transition: color 0.2s;
}

.cookie-policy-link a:hover {
    color: #60a5fa;
}

.cookie-footer {
    padding: 1.5rem 2rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.cookie-btn {
    flex: 1;
    min-width: 140px;
    padding: 0.9rem 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 10px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.cookie-btn-primary {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #fff;
    border-color: #2563eb;
}

.cookie-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.4);
}

.cookie-btn-secondary {
    background: rgba(37, 99, 235, 0.2);
    color: #60a5fa;
    border-color: rgba(37, 99, 235, 0.4);
}

.cookie-btn-secondary:hover {
    background: rgba(37, 99, 235, 0.3);
    border-color: #2563eb;
}

.cookie-btn-outline {
    background: transparent;
    color: #cbd5e1;
    border-color: rgba(255, 255, 255, 0.2);
}

.cookie-btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Responsive */
@media (max-width: 640px) {
    .cookie-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .cookie-header {
        padding: 1.5rem 1.5rem 1rem;
    }
    
    .cookie-title {
        font-size: 1.5rem;
    }
    
    .cookie-body {
        padding: 1.5rem;
    }
    
    .cookie-category {
        padding: 1rem;
    }
    
    .cookie-footer {
        padding: 1rem 1.5rem 1.5rem;
        flex-direction: column;
    }
    
    .cookie-btn {
        width: 100%;
        min-width: auto;
    }
}

/* Scrollbar per il modal */
.cookie-content::-webkit-scrollbar {
    width: 8px;
}

.cookie-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.cookie-content::-webkit-scrollbar-thumb {
    background: rgba(37, 99, 235, 0.5);
    border-radius: 10px;
}

.cookie-content::-webkit-scrollbar-thumb:hover {
    background: rgba(37, 99, 235, 0.7);
}
