/* Estilos Modernos del Modal de Privacidad - Tierra Genio LMS */

/* IMPORTANTE: Sobrescribir estilos existentes */
.cookie-security-dialog.p-20.bg-gray.rounded-lg,
.cookie-security-dialog.p-20,
.cookie-security-dialog.bg-gray,
.cookie-security-dialog.rounded-lg {
    padding: 28px !important;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%) !important;
    border-radius: 20px !important;
}

/* ================================
   ICONO DE COOKIE SVG
================================ */
.cookie-icon {
    width: 24px;
    height: 24px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2a10 10 0 1 0 10 10 4 4 0 0 1-5-5 4 4 0 0 1-5-5'/%3E%3Cpath d='M8.5 8.5v.01'/%3E%3Cpath d='M16 15.5v.01'/%3E%3Cpath d='M12 12v.01'/%3E%3Cpath d='M11 17v.01'/%3E%3Cpath d='M7 14v.01'/%3E%3C/svg%3E") no-repeat center center;
    background-size: contain;
}

/* ================================
   DIÁLOGO PRINCIPAL DE COOKIES
================================ */
.cookie-security-dialog {
    position: fixed;
    left: 24px;
    bottom: 24px;
    width: 440px;
    z-index: 9999;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 28px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 10px 20px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    animation: slideInUp 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform-origin: bottom center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

@keyframes slideInUp {
    0% {
        opacity: 0;
        transform: translateY(100%) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Efecto de brillo sutil */
.cookie-security-dialog::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.05) 50%, transparent 70%);
    border-radius: 20px;
    pointer-events: none;
}

/* ================================
   TÍTULO DEL MODAL
================================ */
.cookie-security-dialog h3 {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ================================
   DESCRIPCIÓN DEL MODAL
================================ */
.cookie-security-dialog p {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 24px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* ================================
   CONTENEDOR DE BOTONES
================================ */
.cookie-security-dialog .d-flex {
    gap: 12px;
}

/* ================================
   BOTONES MODERNOS
================================ */
.cookie-security-dialog .btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-transform: none;
    letter-spacing: 0.5px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Botón Primario - Aceptar */
.cookie-security-dialog .btn-primary {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #ffffff;
    box-shadow: 
        0 8px 16px rgba(79, 172, 254, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.cookie-security-dialog .btn-primary:hover {
    background: linear-gradient(135deg, #3a8bfe 0%, #00d4fe 100%);
    transform: translateY(-2px);
    box-shadow: 
        0 12px 24px rgba(79, 172, 254, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.cookie-security-dialog .btn-primary:active {
    transform: translateY(0);
}

/* Botón Secundario - Personalizar */
.cookie-security-dialog .btn-light {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.cookie-security-dialog .btn-light:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.cookie-security-dialog .btn-light:active {
    transform: translateY(0);
}

/* Efecto ripple para botones */
.cookie-security-dialog .btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.5s ease;
}

.cookie-security-dialog .btn:active::before {
    width: 300px;
    height: 300px;
}

/* ================================
   MODAL DE CONFIGURACIÓN
================================ */
#cookieSecuritySwalModal .section-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 20px;
    position: relative;
    padding-left: 40px;
}

#cookieSecuritySwalModal .section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234facfe' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2a10 10 0 1 0 10 10 4 4 0 0 1-5-5 4 4 0 0 1-5-5'/%3E%3Cpath d='M8.5 8.5v.01'/%3E%3Cpath d='M16 15.5v.01'/%3E%3Cpath d='M12 12v.01'/%3E%3Cpath d='M11 17v.01'/%3E%3Cpath d='M7 14v.01'/%3E%3C/svg%3E") no-repeat center center;
    background-size: contain;
}

/* ================================
   TARJETAS DE CONFIGURACIÓN
================================ */
.cookie-settings-modal-items-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid rgba(79, 172, 254, 0.1);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cookie-settings-modal-items-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
    border-radius: 16px 16px 0 0;
}

.cookie-settings-modal-items-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(79, 172, 254, 0.15);
    border-color: rgba(79, 172, 254, 0.3);
}

/* ================================
   CHECKBOXES PERSONALIZADOS
================================ */
.cookie-settings-modal-items-card .custom-control {
    padding-left: 0;
    margin-right: 16px;
}

.cookie-settings-modal-items-card .custom-control-input {
    display: none;
}

.cookie-settings-modal-items-card .custom-control-label {
    position: relative;
    padding-left: 32px;
    font-weight: 600;
    color: #1a1a2e;
    cursor: pointer;
    font-size: 15px;
    line-height: 1.5;
}

.cookie-settings-modal-items-card .custom-control-label::before {
    position: absolute;
    left: 0;
    top: 2px;
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: #ffffff;
    content: '';
    transition: all 0.3s ease;
}

.cookie-settings-modal-items-card .custom-control-label::after {
    position: absolute;
    left: 5px;
    top: 7px;
    width: 6px;
    height: 10px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    content: '';
    opacity: 0;
    transition: all 0.3s ease;
}

.cookie-settings-modal-items-card .custom-control-input:checked + .custom-control-label::before {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border-color: #4facfe;
    transform: scale(1.1);
}

.cookie-settings-modal-items-card .custom-control-input:checked + .custom-control-label::after {
    opacity: 1;
}

/* ================================
   BOTÓN DE AYUDA
================================ */
.js-cookie-settings-modal-items-help {
    background: rgba(79, 172, 254, 0.1);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.js-cookie-settings-modal-items-help:hover {
    background: rgba(79, 172, 254, 0.2);
    transform: scale(1.1);
}

/* ================================
   DESCRIPCIÓN DESPLEGABLE
================================ */
.cookie-settings-modal-items-card__description {
    background: rgba(79, 172, 254, 0.05);
    border-radius: 12px;
    padding: 16px;
    margin-top: 12px;
    border-left: 4px solid #4facfe;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

/* ================================
   BOTONES DEL MODAL DE CONFIGURACIÓN
================================ */
#cookieSecuritySwalModal .btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

#cookieSecuritySwalModal .btn-primary {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.3);
}

#cookieSecuritySwalModal .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 172, 254, 0.4);
}

#cookieSecuritySwalModal .btn-outline-primary {
    background: transparent;
    color: #4facfe;
    border: 2px solid #4facfe;
}

#cookieSecuritySwalModal .btn-outline-primary:hover {
    background: #4facfe;
    color: #ffffff;
    transform: translateY(-2px);
}

#cookieSecuritySwalModal .close-swl {
    color: #dc3545;
    background: transparent;
    border: none;
    font-weight: 600;
}

#cookieSecuritySwalModal .close-swl:hover {
    color: #c82333;
    text-decoration: underline;
}

/* ================================
   RESPONSIVE DESIGN
================================ */
@media (max-width: 767px) {
    .cookie-security-dialog {
        width: calc(100% - 20px);
        left: 10px;
        right: 10px;
        bottom: 10px;
        border-radius: 20px 20px 0 0;
        padding: 24px 20px;
    }
    
    .cookie-security-dialog .d-flex {
        flex-direction: column;
        gap: 8px;
    }
    
    .cookie-security-dialog .btn {
        width: 100%;
        margin: 0;
    }
    
    .cookie-icon {
        width: 20px;
        height: 20px;
    }
}

/* ================================
   MEJORAS ADICIONALES
================================ */

/* Elemento disabled mejorado */
.c-not-allowed .custom-control-label {
    opacity: 0.6;
    cursor: not-allowed !important;
}

.c-not-allowed .custom-control-label::before {
    background: #f8f9fa !important;
    border-color: #dee2e6 !important;
}

/* Animación de entrada para las tarjetas */
.cookie-settings-modal-items-card {
    animation: cardFadeIn 0.4s ease forwards;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mejora del SweetAlert2 */
.swal2-container {
    backdrop-filter: blur(5px);
}

.swal2-popup {
    border-radius: 20px !important;
    border: 1px solid rgba(79, 172, 254, 0.1) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
}

/* Efecto de focus mejorado */
.cookie-security-dialog .btn:focus,
#cookieSecuritySwalModal .btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.3);
}

/* Mejora del texto de descripción del modal */
.cookie-security-modal-description,
.cookie-security-modal-description * {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

/* Estados hover para elementos interactivos */
.cookie-settings-modal-items-card .form-group:hover .custom-control-label {
    color: #4facfe;
}

/* Mejora del border-top del footer */
#cookieSecuritySwalModal .border-top {
    border-top: 1px solid rgba(79, 172, 254, 0.1) !important;
    margin-top: 24px;
    padding-top: 20px;
}

/* ================================
   CLASE ESPECIAL PARA EL MODAL POPUP
================================ */
.modern-cookie-modal-popup {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}

/* ================================
   ANIMACIONES ADICIONALES
================================ */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Efecto pulse para el icono de cookie */
.cookie-icon {
    animation: pulse 2s infinite;
}

/* Hover states mejorados */
.cookie-security-dialog:hover {
    transform: translateY(-2px);
    transition: transform 0.3s ease;
}

/* Mejora de la descripción del modal principal */
.cookie-security-modal-description {
    margin-bottom: 20px;
}

/* Efecto de carga para el modal */
.cookie-security-dialog {
    opacity: 0;
    animation: slideInUp 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

/* Mejoras para el texto de la configuración */
#cookieSecuritySwalModal .cookie-security-modal-description {
    background: rgba(79, 172, 254, 0.05);
    padding: 16px;
    border-radius: 12px;
    border-left: 4px solid #4facfe;
    margin-bottom: 24px;
}

/* Efectos adicionales para los botones */
.cookie-security-dialog .btn,
#cookieSecuritySwalModal .btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Tema nocturno para el modal (opcional) */
@media (prefers-color-scheme: dark) {
    .cookie-security-dialog {
        background: linear-gradient(135deg, #0d1117 0%, #161b22 50%, #21262d 100%);
        border-color: rgba(255, 255, 255, 0.15);
    }
    
    .cookie-security-dialog h3,
    .cookie-security-dialog p {
        color: rgba(255, 255, 255, 0.9);
    }
} 