/* BANNER DE COOKIES - NORMATIVA RGPD ESPAÑA 2025 */
/* Última actualización: 11/08/2025 */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-top: 3px solid #0081BA;
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
}

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

.cookie-banner.hidden {
    display: none;
}

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

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

.cookie-text h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

.cookie-text p {
    margin: 0 0 8px 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.cookie-text a {
    color: #0081BA;
    text-decoration: underline;
}

.cookie-text a:hover {
    color: #005a85;
}

.cookie-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.cookie-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    min-width: 120px;
    text-align: center;
}

.cookie-btn-accept {
    background: #0081BA;
    color: white;
}

.cookie-btn-accept:hover {
    background: #005a85;
}

.cookie-btn-reject {
    background: #6c757d;
    color: white;
}

.cookie-btn-reject:hover {
    background: #545b62;
}

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

.cookie-btn-settings:hover {
    background: #0081BA;
    color: white;
}

/* Modal de configuración */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.cookie-modal-content {
    background: white;
    max-width: 600px;
    max-height: 80vh;
    margin: 20px;
    border-radius: 12px;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.cookie-modal-header {
    padding: 25px 30px 20px;
    border-bottom: 2px solid #e9ecef;
    position: relative;
}

.cookie-modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.4rem;
}

.cookie-modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 5px;
    line-height: 1;
}

.cookie-modal-close:hover {
    color: #333;
}

.cookie-modal-body {
    padding: 25px 30px;
}

.cookie-category {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #0081BA;
}

.cookie-category h4 {
    margin: 0 0 10px 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

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

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

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: #0081BA;
}

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

.cookie-toggle.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.cookie-category p {
    margin: 8px 0 0 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.cookie-modal-footer {
    padding: 20px 30px 30px;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    border-top: 2px solid #e9ecef;
}

/* Responsive */
@media (max-width: 768px) {
    .cookie-banner {
        padding: 15px;
    }
    
    .cookie-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .cookie-btn {
        flex: 1;
        min-width: 100px;
    }
    
    .cookie-modal-content {
        margin: 10px;
        max-height: 90vh;
    }
    
    .cookie-modal-header,
    .cookie-modal-body,
    .cookie-modal-footer {
        padding: 20px;
    }
    
    .cookie-modal-footer {
        flex-direction: column;
    }
}