/* Cookie Banner - RGPD/LOPD Compliant Styles */
/* ToallasVIP.com */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1a252f, #2c3e50);
    color: white;
    z-index: 10000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: center;
}

.cookie-banner-text h3 {
    margin: 0 0 1rem 0;
    color: #3498db;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.cookie-banner-text p {
    margin: 0 0 1rem 0;
    line-height: 1.5;
    color: #ffffff;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.cookie-types-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0 0;
}

.cookie-types-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #ffffff;
    font-weight: 500;
}

.cookie-types-list i {
    color: #27ae60;
}

.cookie-banner-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.cookie-banner-actions button,
.cookie-banner-actions a {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.btn-accept-all {
    background: #27ae60;
    color: white;
}

.btn-accept-all:hover {
    background: #219a52;
    transform: translateY(-2px);
}

.btn-accept-essential {
    background: #f39c12;
    color: white;
}

.btn-accept-essential:hover {
    background: #e67e22;
    transform: translateY(-2px);
}

.btn-settings {
    background: #3498db;
    color: white;
}

.btn-settings:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-info {
    background: transparent;
    color: #bdc3c7;
    border: 1px solid #bdc3c7;
}

.btn-info:hover {
    background: #bdc3c7;
    color: #2c3e50;
}

/* 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: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cookie-modal.show {
    opacity: 1;
}

.cookie-modal-content {
    background: #ffffff;
    border-radius: 12px;
    max-width: 650px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    color: #000000;
}

.cookie-modal-content *:not(i) {
    color: #000000 !important;
}

.cookie-modal.show .cookie-modal-content {
    transform: scale(1);
}

.cookie-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #ecf0f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
}

.cookie-modal-header h3 {
    margin: 0;
    color: #000000 !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #95a5a6;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.btn-close:hover {
    background: #ecf0f1;
    color: #e74c3c;
}

.cookie-modal-body {
    padding: 1.5rem;
    background: #ffffff;
    color: #000000;
}

.cookie-modal-body p {
    color: #000000 !important;
    font-weight: 600;
    line-height: 1.6;
}

.cookie-category {
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    background: #ffffff;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.cookie-category-header h4 {
    margin: 0;
    color: #000000 !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
}

/* Switch toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #3498db;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.essential {
    background-color: #27ae60 !important;
    cursor: not-allowed;
}

input:disabled + .slider {
    cursor: not-allowed;
}

.cookie-category-description {
    color: #000000 !important;
    line-height: 1.5;
    margin-bottom: 1rem;
    font-weight: 600;
}

.cookie-details {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    border-left: 4px solid #3498db;
    color: #000000 !important;
    font-weight: 600;
    margin-top: 1rem;
    line-height: 1.6;
}

.cookie-details ul {
    margin: 1rem 0 0 0;
    padding-left: 1.5rem;
    list-style-type: disc;
}

.cookie-details li {
    margin-bottom: 0.8rem;
    color: #000000 !important;
    font-weight: 600;
    line-height: 1.5;
    padding-left: 0.5rem;
}

.cookie-details strong {
    color: #000000 !important;
    font-weight: 700;
}

.cookie-modal-body strong {
    color: #000000 !important;
    font-weight: 700;
}

.cookie-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #ecf0f1;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    background: #ffffff;
}

.btn-save {
    background: #3498db;
    color: white;
}

.btn-save:hover {
    background: #2980b9;
}

/* Mensaje de éxito */
.cookie-success-message {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: #27ae60;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    z-index: 10002;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    font-weight: 500;
}

.cookie-success-message.show {
    transform: translateX(0);
}

/* Botón flotante para configuración */
.cookie-settings-float {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.cookie-settings-float:hover {
    background: #2980b9;
    transform: scale(1.1);
}

.cookie-settings-float:active {
    transform: scale(0.95);
}

/* Animaciones adicionales */
@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.cookie-banner.show {
    animation: slideInUp 0.4s ease-out;
}

.cookie-modal.show {
    animation: fadeIn 0.3s ease-out;
}

/* Estados de hover mejorados */
.cookie-banner-actions button:focus,
.cookie-banner-actions a:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.cookie-modal-content {
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

/* Responsive design */
@media (max-width: 768px) {
    .cookie-banner-content {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1.5rem;
    }
    
    .cookie-banner-actions {
        justify-content: center;
        flex-direction: column;
        width: 100%;
    }
    
    .cookie-banner-actions button,
    .cookie-banner-actions a {
        width: 100%;
        justify-content: center;
    }
    
    .cookie-modal-content {
        width: 95%;
        margin: 1rem;
        max-height: 90vh;
        max-width: none;
    }
    
    .cookie-details {
        padding: 1rem;
        font-size: 0.9rem;
    }
    
    .cookie-category {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .cookie-modal-footer {
        flex-direction: column;
    }
    
    .cookie-modal-footer button {
        width: 100%;
        justify-content: center;
    }
    
    .cookie-success-message {
        right: 1rem;
        left: 1rem;
        transform: translateY(-100%);
        top: 1rem;
    }
    
    .cookie-success-message.show {
        transform: translateY(0);
    }
    
    .cookie-settings-float {
        bottom: 1rem;
        left: 1rem;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .cookie-banner-content {
        padding: 1rem;
    }
    
    .cookie-banner-text h3 {
        font-size: 1.1rem;
    }
    
    .cookie-banner-text p {
        font-size: 0.9rem;
        color: #ffffff;
        font-weight: 600;
        text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    }
    
    .cookie-types-list li {
        font-size: 0.8rem;
        color: #ffffff;
        font-weight: 600;
        text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    }
    
    .cookie-banner-actions button,
    .cookie-banner-actions a {
        padding: 0.7rem 1rem;
        font-size: 0.8rem;
    }
}

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {
    .cookie-banner,
    .cookie-modal,
    .cookie-success-message,
    .cookie-settings-float,
    .slider:before {
        transition: none;
    }
    
    .cookie-banner.show {
        animation: none;
    }
    
    .cookie-modal.show {
        animation: none;
    }
}

/* Forzar tema claro en el modal - OVERRIDE TOTAL */
.cookie-modal-content,
.cookie-modal-header,
.cookie-modal-body,
.cookie-modal-footer,
.cookie-category,
.cookie-details {
    background: #ffffff !important;
}

.cookie-modal-content *:not(.fas):not(.fa):not(i):not(.slider) {
    color: #000000 !important;
}

/* Asegurar texto negro en todos los elementos del modal */
.cookie-modal-content h3,
.cookie-modal-content h4,
.cookie-modal-content p,
.cookie-modal-content li,
.cookie-modal-content strong,
.cookie-category-description,
.cookie-details,
.cookie-details li,
.cookie-details strong {
    color: #000000 !important;
}

/* Print styles */
@media print {
    .cookie-banner,
    .cookie-modal,
    .cookie-success-message,
    .cookie-settings-float {
        display: none !important;
    }
} 