﻿/* =========================
   LOADING MODERNO
========================= */



.global-loading {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(12px);
    /*background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);*/
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: all .25s ease;
}

    /* cuando se activa */
    .global-loading.active {
        opacity: 1;
        visibility: visible;
    }

.loader-box {
    background: rgba(255,255,255,0.95);
    padding: 30px 40px;
    border-radius: 22px;
    text-align: center;
    min-width: 260px;
    box-shadow: 0 10px 25px rgba(0,0,0,.15), 0 0 0 1px rgba(255,255,255,.1);
    animation: popup .35s ease;
}

/* spinner moderno */
.spinner {
    width: 58px;
    height: 58px;
    margin: auto;
    position: relative;
}

    /* círculo externo */
    .spinner::before,
    .spinner::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 50%;
    }

    /* aro girando */
    .spinner::before {
        border: 4px solid rgba(37, 99, 235, 0.15);
    }

    /* aro animado */
    .spinner::after {
        border: 4px solid transparent;
        border-top-color: #2563eb;
        border-right-color: #2563eb;
        animation: spin .8s linear infinite;
    }

/* punto central */
.spinner-dot {
    width: 12px;
    height: 12px;
    background: #2563eb;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 1s infinite;
}

.loader-text {
    margin-top: 18px;
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: .3px;
}

.loader-subtext {
    margin-top: 6px;
    font-size: 13px;
    color: #64748b;
}

/* animaciones */

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.4);
        opacity: .6;
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes popup {
    from {
        transform: scale(.9) translateY(10px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}
