/* ===== BANNER DE COOKIES - CENTRADO PERFECTO ===== */
.cookie-banner-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9998;
}

.cookie-consent-banner {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    z-index: 9999;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    border: 2px solid #00a550;
}

.cookie-consent-banner.active,
.cookie-banner-overlay.active {
    display: block;
    animation: cookiePopIn 0.5s ease-out;
}

.cookie-banner-content {
    text-align: center;
}

.cookie-banner-text {
    color: #2d3748;
    font-weight: 400;
    text-align: center;
    margin-bottom: 25px;
}

.cookie-banner-text strong {
    color: #00a550;
    font-weight: 600;
    font-size: 18px;
}

.cookie-banner-text a {
    color: #00a550;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.cookie-banner-text a:hover {
    color: #008f45;
    border-bottom-color: #008f45;
}

.cookie-banner-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 120px;
    font-family: 'Montserrat', Arial, sans-serif;
}

.cookie-btn-accept {
    background: linear-gradient(135deg, #00a550 0%, #008f45 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 165, 80, 0.3);
}

.cookie-btn-reject {
    background: #ffffff;
    color: #64748b;
    border: 2px solid #e2e8f0;
}

.cookie-btn-settings {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
}

.cookie-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.cookie-btn:active {
    transform: translateY(0);
}

/* MODAL DE CONFIGURACIÓN */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cookie-modal.active {
    display: flex;
    animation: modalFadeIn 0.3s ease-out;
}

.cookie-modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    border: 1px solid #e9ecef;
}

.cookie-modal-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 20px 25px;
    border-radius: 15px 15px 0 0;
    text-align: center;
}

.cookie-modal-header h2 {
    margin: 0 0 8px 0;
    font-size: 22px;
    font-weight: 600;
}

.cookie-modal-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
}

.cookie-modal-body {
    padding: 25px;
}

.cookie-category {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.category-title {
    font-weight: 600;
    font-size: 16px;
    color: #2d3748;
}

.category-description {
    color: #64748b;
    font-size: 14px;
    line-height: 1.4;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-toggle {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #cbd5e0;
    transition: .4s;
    border-radius: 24px;
}

.slider-toggle:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider-toggle {
    background: linear-gradient(135deg, #00a550 0%, #008f45 100%);
}

input:checked + .slider-toggle:before {
    transform: translateX(26px);
}

input:disabled + .slider-toggle {
    background: #a0aec0;
    cursor: not-allowed;
}

.cookie-modal-footer {
    display: flex;
    justify-content: space-between;
    padding: 20px 25px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    border-radius: 0 0 15px 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.modal-buttons-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ANIMACIONES CORREGIDAS */
@keyframes cookiePopIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* RESPONSIVE CORREGIDO */
@media (max-width: 768px) {
    .cookie-consent-banner {
        padding: 25px 20px;
        width: 95%;
    }
    
    .cookie-banner-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .cookie-btn {
        width: 100%;
        min-width: auto;
    }
    
    .cookie-modal-content {
        margin: 10px;
        width: calc(100% - 20px);
    }
    
    .cookie-modal-body {
        padding: 20px;
    }
    
    .cookie-modal-footer {
        flex-direction: column;
        padding: 15px 20px;
    }
    
    .modal-buttons-group {
        width: 100%;
    }
    
    .modal-buttons-group .cookie-btn {
        flex: 1;
    }
}

@media (max-width: 480px) {
    .cookie-consent-banner {
        padding: 20px 15px;
    }
    
    .cookie-banner-text {
        font-size: 13px;
    }
    
    .cookie-modal-header {
        padding: 15px 20px;
    }
    
    .cookie-modal-header h2 {
        font-size: 20px;
    }
}