/* ================================
   MODAL SPINNER DE CARGA
   APARECE SOLO AL HACER SUBMIT
   ================================ */

/* Contenedor general del modal */
#modal-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);  /* fondo oscuro */
    justify-content: center;
    align-items: center;
    z-index: 999999;              /* siempre encima */
    display: none;                /* OCULTO por defecto */
}

/* Cuando se activa, se muestra */
.spinner-activo {
    display: flex !important;     /* LO MUESTRA */
}

/* Caja interna */
.spinner-contenido {
    background: white;
    padding: 20px 40px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0px 0px 10px rgba(0,0,0,0.3);
}

/* El círculo giratorio */
.loader {
    border: 6px solid #ddd;
    border-top: 6px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: girar 0.8s linear infinite;
    margin: 0 auto;
}

/* Animación del spinner */
@keyframes girar {
    to {
        transform: rotate(360deg);
    }
}
