/* ============================================
   COOKIE BANNER - Progetto Corpo Libero
   Stile banner cookie GDPR
   ============================================ */

.cookie-banner-overlay {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background: rgba(2, 67, 69, 0.97);
    color: #fff;
    padding: 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.cookie-banner-overlay.visible {
    transform: translateY(0);
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.cookie-banner-text {
    flex: 1;
    min-width: 280px;
    font-size: 14px;
    line-height: 1.6;
}

.cookie-banner-text strong {
    color: #7fd4d7;
    font-weight: 700;
}

.cookie-banner-text a {
    color: #7fd4d7;
    text-decoration: underline;
    font-weight: 600;
}

.cookie-banner-text a:hover {
    color: #ffffff;
}

.cookie-banner-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    font-family: inherit;
    white-space: nowrap;
}

.cookie-btn:hover {
    transform: translateY(-2px);
}

.cookie-btn-primary {
    background: linear-gradient(135deg, #5cbfc3, #7fd4d7);
    color: #024345;
    box-shadow: 0 4px 12px rgba(92, 191, 195, 0.4);
}

.cookie-btn-primary:hover {
    box-shadow: 0 6px 16px rgba(92, 191, 195, 0.6);
}

.cookie-btn-secondary {
    background: transparent;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.cookie-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
}

.cookie-btn-link {
    background: transparent;
    color: #7fd4d7;
    border: none;
    text-decoration: underline;
    padding: 12px 8px;
    font-size: 12px;
}

.cookie-btn-link:hover {
    color: #ffffff;
}

/* ============================================
   IMPOSTAZIONI COOKIE (pannello dettagli)
   ============================================ */

.cookie-settings-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.cookie-settings-panel.active {
    display: flex;
}

.cookie-settings-content {
    background: #fff;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.cookie-settings-content h2 {
    color: #024345;
    font-size: 22px;
    margin-bottom: 8px;
}

.cookie-settings-content .intro {
    color: #7f8c8d;
    font-size: 13px;
    margin-bottom: 24px;
    line-height: 1.6;
}

.cookie-category {
    padding: 16px;
    border-radius: 10px;
    background: #f0f7f7;
    margin-bottom: 12px;
    border-left: 4px solid #5cbfc3;
}

.cookie-category.always-on {
    border-left-color: #00b894;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.cookie-category-header h3 {
    color: #024345;
    font-size: 15px;
    margin: 0;
}

.cookie-category-header .badge-always {
    font-size: 10px;
    font-weight: 700;
    color: #155724;
    background: #d4edda;
    padding: 3px 10px;
    border-radius: 10px;
    text-transform: uppercase;
}

.cookie-category p {
    color: #7f8c8d;
    font-size: 12px;
    line-height: 1.5;
    margin: 0;
}

.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.cookie-toggle .slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.cookie-toggle input:checked + .slider {
    background-color: #00b894;
}

.cookie-toggle input:checked + .slider:before {
    transform: translateX(20px);
}

.cookie-settings-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.cookie-settings-actions .cookie-btn {
    flex: 1;
    min-width: 140px;
}

/* ============================================
   PULSANTE "GESTISCI COOKIE" NEL FOOTER
   ============================================ */

.cookie-manage-link {
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
    font-size: inherit;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        gap: 16px;
    }

    .cookie-banner-actions {
        width: 100%;
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
        padding: 14px 20px;
    }

    .cookie-settings-content {
        padding: 24px 20px;
    }

    .cookie-settings-actions {
        flex-direction: column;
    }

    .cookie-settings-actions .cookie-btn {
        width: 100%;
    }
}

/* ============================================
   ANIMAZIONI
   ============================================ */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.cookie-settings-panel.active {
    animation: fadeIn 0.3s ease;
}