﻿/* Loader global "Cargando..." (assets/js/cargando.js). Cubre la pantalla, bloquea los clics mientras dura el postback y
   muestra los cuatro puntos de adminPYME (los mismos colores de la bienvenida del Dashboard) con el mensaje al centro. */
.cargando-fondo {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 20000; /* sobre los modales de Bootstrap (1050), los #ventana1 (9999) y el de soporte (10000); bajo el splash */
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    cursor: progress;
}

.cargando-fondo.visible {
    display: flex;
    animation: cargandoEntra 0.2s ease;
}

.cargando-caja {
    min-width: 220px;
    max-width: 90vw;
    padding: 28px 40px;
    text-align: center;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(20, 30, 60, 0.18);
}

.cargando-puntos {
    display: flex;
    justify-content: center;
    gap: 10px;
    height: 34px;
    align-items: flex-end;
}

.cargando-puntos span {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    animation: cargandoSalto 1.2s ease-in-out infinite;
}

/* Dos parejas que se alternan: saltan azul y menta; cuando bajan, saltan morado y gris */
.cargando-puntos span:nth-child(1) { background: var(--c1, #00A2E8); }
.cargando-puntos span:nth-child(2) { background: var(--c2, #800080); animation-delay: 0.6s; }
.cargando-puntos span:nth-child(3) { background: var(--c3, #00c9a7); }
.cargando-puntos span:nth-child(4) { background: var(--c4, #9aa8bb); animation-delay: 0.6s; }

.cargando-texto {
    margin-top: 14px;
    font-size: 15px;
    font-weight: 600;
    color: #4a5568;
}

/* El salto ocupa la primera mitad del ciclo; en la segunda mitad (con el retraso de 0.6 s) salta la otra pareja */
@keyframes cargandoSalto {
    0%, 50%, 100% { transform: translateY(0); }
    25% { transform: translateY(-14px); }
}

@keyframes cargandoEntra {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .cargando-fondo.visible { animation: none; }
    .cargando-puntos span { animation: none; }
}
