/* ========================================
   BANNER DE COOKIES - Sevan Centre Salut
   RGPD Compliant - Febrer 2026
   ======================================== */

#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    z-index: 9999;
    padding: 1.5rem;
    animation: slideUp 0.4s ease;
}

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

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

.cookie-banner-text {
    flex: 1;
}

.cookie-banner-text p {
    margin: 0;
    color: var(--text);
    line-height: 1.6;
}

.cookie-banner-text a {
    color: var(--primary);
    text-decoration: underline;
    font-weight: 500;
}

.cookie-banner-buttons {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.cookie-btn-accept {
    background: var(--primary);
    color: white;
}

.cookie-btn-accept:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

.cookie-btn-reject {
    background: var(--pearl);
    color: var(--text);
}

.cookie-btn-reject:hover {
    background: var(--accent);
}

.cookie-btn-settings {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.cookie-btn-settings:hover {
    background: var(--accent);
}

/* ========================================
   MODAL DE CONFIGURACIÓN
   ======================================== */

#cookie-settings-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
}

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

.cookie-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.cookie-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 2px solid var(--accent);
}

.cookie-modal-header h2 {
    color: var(--dark);
    margin: 0;
}

.cookie-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--primary);
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.cookie-modal-close:hover {
    transform: rotate(90deg);
    color: var(--secondary);
}

.cookie-modal-body {
    padding: 2rem;
}

.cookie-category {
    margin-bottom: 2rem;
}

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

.cookie-category h3 {
    color: var(--primary);
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.cookie-category p {
    margin: 0;
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ========================================
   SWITCH TOGGLE
   ======================================== */

.cookie-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}

.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: var(--pearl);
    transition: 0.4s;
    border-radius: 34px;
}

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

.cookie-switch input:checked + .cookie-slider {
    background-color: var(--primary);
}

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

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

/* ========================================
   FOOTER DEL MODAL
   ======================================== */

.cookie-modal-footer {
    display: flex;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-top: 2px solid var(--accent);
    justify-content: flex-end;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    #cookie-banner {
        padding: 1rem;
    }
    
    .cookie-banner-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cookie-banner-buttons {
        flex-direction: column;
    }
    
    .cookie-btn {
        width: 100%;
    }
    
    .cookie-modal-content {
        width: 95%;
    }
    
    .cookie-modal-header,
    .cookie-modal-body,
    .cookie-modal-footer {
        padding: 1.5rem;
    }
    
    .cookie-modal-footer {
        flex-direction: column-reverse;
    }
}

@media (max-width: 480px) {
    .cookie-banner-text p {
        font-size: 0.9rem;
    }
    
    .cookie-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .cookie-modal-header,
    .cookie-modal-body,
    .cookie-modal-footer {
        padding: 1rem;
    }
}