﻿/**
 * BIMMERS - Session Timeout Styles
 * ================================
 * Estilos para el modal de advertencia de sesión
 */

/* ==========================================
   OVERLAY (Fondo oscuro)
   ========================================== */
.session-timeout-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    animation: fadeIn 0.3s ease;
}

/* ==========================================
   MODAL (Ventana central)
   ========================================== */
.session-timeout-modal {
    background: linear-gradient(145deg, #ffffff, #f5f5f5);
    border-radius: 16px;
    padding: 40px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
    animation: slideUp 0.4s ease;
}

/* ==========================================
   ICONO
   ========================================== */
.session-timeout-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

    .session-timeout-icon svg {
        color: white;
        width: 40px;
        height: 40px;
    }

/* ==========================================
   TEXTOS
   ========================================== */
.session-timeout-title {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 12px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.session-timeout-message {
    font-size: 16px;
    color: #6b7280;
    margin: 0 0 8px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.session-timeout-submessage {
    font-size: 14px;
    color: #9ca3af;
    margin: 16px 0 24px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ==========================================
   COUNTDOWN (Contador)
   ========================================== */
.session-timeout-countdown {
    font-size: 56px;
    font-weight: 800;
    color: #dc2626;
    margin: 16px 0;
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    text-shadow: 0 2px 4px rgba(220, 38, 38, 0.2);
    animation: countdownPulse 1s infinite;
}

/* ==========================================
   BOTONES
   ========================================== */
.session-timeout-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.session-timeout-btn {
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-width: 140px;
}

    .session-timeout-btn:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
    }

/* Botón Primario - Continuar */
.session-timeout-btn-primary {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

    .session-timeout-btn-primary:hover {
        background: linear-gradient(135deg, #059669, #047857);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
    }

    .session-timeout-btn-primary:active {
        transform: translateY(0);
    }

/* Botón Secundario - Cerrar sesión */
.session-timeout-btn-secondary {
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #e5e7eb;
}

    .session-timeout-btn-secondary:hover {
        background: #e5e7eb;
        color: #374151;
    }

/* ==========================================
   ANIMACIONES
   ========================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
    }

    50% {
        box-shadow: 0 0 0 15px rgba(245, 158, 11, 0);
    }
}

@keyframes countdownPulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 480px) {
    .session-timeout-modal {
        padding: 30px 20px;
        margin: 16px;
    }

    .session-timeout-title {
        font-size: 20px;
    }

    .session-timeout-countdown {
        font-size: 44px;
    }

    .session-timeout-buttons {
        flex-direction: column;
    }

    .session-timeout-btn {
        width: 100%;
    }
}

/* ==========================================
   TEMA OSCURO (opcional, detecta preferencia del sistema)
   ========================================== */
@media (prefers-color-scheme: dark) {
    .session-timeout-modal {
        background: linear-gradient(145deg, #1f2937, #111827);
    }

    .session-timeout-title {
        color: #f9fafb;
    }

    .session-timeout-message {
        color: #9ca3af;
    }

    .session-timeout-submessage {
        color: #6b7280;
    }

    .session-timeout-btn-secondary {
        background: #374151;
        color: #e5e7eb;
        border-color: #4b5563;
    }

        .session-timeout-btn-secondary:hover {
            background: #4b5563;
            color: #f9fafb;
        }
}
