﻿/* HTML: <div class="loader"></div> */
#globalOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.4); /* Màu mờ */
    z-index: 9999; /* Che lên tất cả */
    pointer-events: all; /* Chặn mọi tương tác bên dưới */
    backdrop-filter: blur(6px);
    align-content: center;
    text-align: -webkit-center;
    font-size: 30px;
}

/* HTML: <div class="loader"></div> 
.loader {
    height: 40px;
    aspect-ratio: 2.5;
    --_g: no-repeat radial-gradient(farthest-side,white 90%,#0000);
    background: var(--_g), var(--_g), var(--_g), var(--_g);
    background-size: 20% 50%;
    animation: l43 1s infinite linear;
}

@keyframes l43 {
    0% {
        background-position: calc(0*100%/3) 50%,calc(1*100%/3) 50%,calc(2*100%/3) 50%,calc(3*100%/3) 50%
    }

    16.67% {
        background-position: calc(0*100%/3) 0,calc(1*100%/3) 50%,calc(2*100%/3) 50%,calc(3*100%/3) 50%
    }

    33.33% {
        background-position: calc(0*100%/3) 100%,calc(1*100%/3) 0,calc(2*100%/3) 50%,calc(3*100%/3) 50%
    }

    50% {
        background-position: calc(0*100%/3) 50%,calc(1*100%/3) 100%,calc(2*100%/3) 0,calc(3*100%/3) 50%
    }

    66.67% {
        background-position: calc(0*100%/3) 50%,calc(1*100%/3) 50%,calc(2*100%/3) 100%,calc(3*100%/3) 0
    }

    83.33% {
        background-position: calc(0*100%/3) 50%,calc(1*100%/3) 50%,calc(2*100%/3) 50%,calc(3*100%/3) 100%
    }

    100% {
        background-position: calc(0*100%/3) 50%,calc(1*100%/3) 50%,calc(2*100%/3) 50%,calc(3*100%/3) 50%
    }
}*/

.bg-loader {
    background-clip: padding-box;
    background-color: white;
    border-radius: 0.7rem !important;
    display: flex;
    flex-direction: column;
    outline: 0;
    pointer-events: auto;
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 150px;
}

/* HTML: <div class="loader"></div> */
.loader {
    width: fit-content;
    font-weight: bold;
    font-family: monospace;
    font-size: 30px;
    color: #0000;
    background: linear-gradient(90deg,#006CB5 calc(50% + 0.5ch),#0098EF 0) right/calc(200% + 1ch) 100%;
    -webkit-background-clip: text;
    background-clip: text;
    animation: l7 2s infinite steps(11);
}

    .loader:before {
        content: "Đang tải..."
    }

@keyframes l7 {
    to {
        background-position: left
    }
}

.fade-transition {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.fade-show {
    opacity: 1;
    visibility: visible;
}

.fade-hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none; /* chặn bấm */
}
