﻿/*==================================================
=            LOADING PAGE
==================================================*/


.loading-page {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex; /* Siempre flex para que transition funcione bien */
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 1);
    backdrop-filter: blur(0.5px);
    -webkit-backdrop-filter: blur(0.5px);
    /* ESTADO OCULTO LIBRE DE CLICS */
    opacity: 0;
    visibility: hidden;
    pointer-events: none; /* CLAVE: Permite que los clics traspasen cuando no es visible */

    transition: opacity .45s ease, visibility .45s ease, background-color .8s ease, backdrop-filter .8s ease;
}

    .loading-page.show {
        opacity: 1;
        visibility: visible;
        pointer-events: auto; /* Bloquea clics solo cuando está activamente visible */
        background: rgba(255, 255, 255, .95);
        backdrop-filter: blur(0.5px);
        -webkit-backdrop-filter: blur(0.5px);
    }
/*==================================================
=            CIRCLE
==================================================*/

.loading-circle {
    position: relative;
    width: 260px;
    height: 260px;
}

.loading-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

/* Aro gris */

.loading-track {
    fill: none;
    stroke: #d6d6d6;
    stroke-width: 12;
}

/* Segmento negro */

.loading-progress {
    fill: none;
    stroke: #0094ff;
    stroke-width: 12;
    stroke-linecap: round;
    stroke-dasharray: 95 300;
    transform-origin: center;
    animation: loadingRotate 1.2s linear infinite;
}


/*==================================================
=            LOADING TEXT
==================================================*/

.loading-text {
    margin-top: 24px;
    width: max-content;
    max-width: min(320px, 85vw);
    text-align: center;
    align-content:center;
    font-size: 1rem;
    font-weight: 500;
    color: #808080;
    letter-spacing: .5px;
    user-select: none;
    white-space: normal;
    overflow-wrap: break-word;
}
.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}
/*==================================================
=            ANIMATION
==================================================*/

@keyframes loadingRotate {

    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}
/* Cuando la pantalla sea de celular */
@media (max-width: 720px) {
    .loading-circle {
        width: 130px;
        height: 130px;
    }
}