/* ============================================
   MODAL DE ADVERTENCIA DE SESIÓN
   ============================================ */

.session-warning-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.session-warning-modal.active {
    display: flex;
}

.session-warning-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
}

.session-warning-content {
    position: relative;
    background: white;
    border-radius: 20px;
    padding: 48px 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
    animation: sessionModalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
}

@keyframes sessionModalSlideIn {
    from {
        transform: translateY(-60px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.session-warning-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #ff9a56 0%, #ff6b35 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 45px;
    color: white;
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.35);
    animation: sessionIconPulse 2s ease-in-out infinite;
}

@keyframes sessionIconPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 24px rgba(255, 107, 53, 0.35);
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 8px 24px rgba(255, 107, 53, 0.5), 0 0 0 25px rgba(255, 107, 53, 0);
    }
}

.session-warning-content h3 {
    font-size: 26px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 16px 0;
    line-height: 1.3;
}

.session-warning-content p {
    font-size: 16px;
    color: #6b7280;
    margin: 0 0 24px 0;
    line-height: 1.6;
}

.session-countdown {
    font-size: 64px;
    font-weight: 800;
    color: #ff6b35;
    margin: 28px 0;
    font-family: 'Courier New', 'Consolas', monospace;
    letter-spacing: 6px;
    text-shadow: 0 4px 12px rgba(255, 107, 53, 0.2);
    transition: color 0.3s ease;
}

.session-countdown.critical {
    color: #dc2626;
    animation: countdownBlink 1s ease-in-out infinite;
}

@keyframes countdownBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.session-warning-text {
    font-size: 15px;
    color: #9ca3af;
    font-weight: 500;
}

.session-warning-buttons {
    display: flex;
    gap: 14px;
    margin-top: 36px;
}

.session-btn {
    flex: 1;
    padding: 16px 28px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.session-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.session-btn-primary {
    background: linear-gradient(135deg, #ff9a56 0%, #ff6b35 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(255, 107, 53, 0.3);
}

.session-btn-primary:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.4);
}

.session-btn-primary:active:not(:disabled) {
    transform: translateY(-1px);
}

.session-btn-secondary {
    background: #f3f4f6;
    color: #6b7280;
    border: 2px solid #e5e7eb;
}

.session-btn-secondary:hover:not(:disabled) {
    background: #e5e7eb;
    color: #4b5563;
    border-color: #d1d5db;
}

/* Toast notifications */
.session-toast {
    position: fixed;
    top: 24px;
    right: 24px;
    background: white;
    color: #1f2937;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 100000;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 500;
    animation: slideInRight 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    min-width: 320px;
    border-left: 4px solid;
}

.session-toast.success {
    border-left-color: #10b981;
}

.session-toast.error {
    border-left-color: #ef4444;
}

.session-toast.info {
    border-left-color: #3b82f6;
}

.session-toast-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.session-toast.success .session-toast-icon {
    color: #10b981;
}

.session-toast.error .session-toast-icon {
    color: #ef4444;
}

.session-toast.info .session-toast-icon {
    color: #3b82f6;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Loading spinner */
.session-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: sessionSpin 0.6s linear infinite;
}

@keyframes sessionSpin {
    to { transform: rotate(360deg); }
}

/* Responsivo */
@media (max-width: 640px) {
    .session-warning-content {
        padding: 36px 28px;
        max-width: 95%;
    }
    
    .session-warning-icon {
        width: 75px;
        height: 75px;
        font-size: 38px;
    }
    
    .session-warning-content h3 {
        font-size: 22px;
    }
    
    .session-countdown {
        font-size: 52px;
        letter-spacing: 4px;
    }
    
    .session-warning-buttons {
        flex-direction: column;
    }
    
    .session-btn {
        width: 100%;
    }
    
    .session-toast {
        left: 16px;
        right: 16px;
        min-width: auto;
    }
}

/* Animación de entrada para pantallas grandes */
@media (min-width: 641px) {
    .session-toast {
        animation: slideInRight 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
}
