﻿
/* ================================
   LOADING GLOBAL
================================ */

.app-loading {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(248, 250, 252, 0.75);
    backdrop-filter: blur(3px);
}

    /* Ocultar cuando no está activo */
    .app-loading[hidden] {
        display: none !important;
    }

/* Tarjeta central */
.app-loading-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: 100%;
    max-width: 320px;
    padding: 32px 24px;
    background: #ffffff;
    border: 1px solid #e5eaf0;
    border-radius: 14px;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.12);
    text-align: center;
}

/* Spinner animado */
.app-loading-spinner {
    width: 42px;
    height: 42px;
    border: 4px solid #e5eaf0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: appLoadingSpin 0.8s linear infinite;
}

/* Mensaje principal */
.app-loading-card strong {
    color: #172033;
    font-size: 15px;
    font-weight: 600;
}

/* Mensaje secundario */
.app-loading-card small {
    color: #778397;
    font-size: 12px;
    line-height: 1.5;
}

/* Animación del spinner */
@keyframes appLoadingSpin {
    to {
        transform: rotate(360deg);
    }
}

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {
    .app-loading-spinner {
        animation-duration: 2s;
    }
}
