/* Global Loader Styles */

.loader-bg {
    /* Centered small loader box (does NOT cover whole page) */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    z-index: 9999;
    pointer-events: none; /* allow clicks through when loader showing */
    width: auto;
    height: auto;
}

.loader-bg.show {
    display: flex;
    justify-content: center;
    align-items: center;
}



/* Fullscreen modifier: use when you want the overlay to cover the page */
.loader-bg.fullscreen {
    top: 0;
    left: 0;
    transform: none;
    width: 100%;
    height: 100%;
    background: rgba(255, 85, 0, 0.95);
    /* background: #000; */
    pointer-events: auto;
    backdrop-filter: blur(20px);
}


/* Loader Container */
.loader-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    /* background: rgb(227, 225, 225); */
    background: #258C78;;
    padding: 12px 18px;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    pointer-events: auto; /* the small box should not block interactions globally */
}

/* Main Track */
.loader-track {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(0, 0, 0, 0.06);
    border-radius: 50%;
    position: relative;
    background: transparent;
}


/* Loader Fill - Spinning Animation */
.loader-fill {
    position: absolute;
    width: 60px;
    height: 60px;
    border: 4px solid transparent;
    /* border-top-color: #000000;
    border-right-color: #000000; */
    border-top-color: #ffffff;
    border-right-color: #ffffff;
    border-radius: 50%;
    top: -4px;
    left: -4px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Loading Text */
/* .loader-text {
    margin-top: 12px;
    font-size: 13px;
    color: #333;
    font-weight: 500;
    letter-spacing: 0.2px;
    animation: pulse-text 1.5s ease-in-out infinite;
} */
 .loader-text {
    margin-top: 12px;
    font-size: 14px;
    color: #fff;                       /* new — pure white text */
    font-weight: 600;
    letter-spacing: 0.3px;
    animation: pulse-text 1.5s ease-in-out infinite;
}


@keyframes pulse-text {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Dots Animation */
.loader-dots {
    margin-top: 10px;
    display: flex;
    gap: 6px;
    justify-content: center;
}

.loader-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    /* background: #4680ff; */
    background: #ffffff;
    animation: bounce 1.4s infinite ease-in-out both;
}



.loader-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.loader-dot:nth-child(2) {
    animation-delay: -0.16s;
}

.loader-dot:nth-child(3) {
    animation-delay: 0s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0) translateY(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1) translateY(-10px);
        opacity: 1;
    }
}

/* Small Loader for AJAX Requests (Top Bar) */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(to right, #4680ff, #5bb7ff);
    z-index: 10000;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(70, 128, 255, 0.5);
}

.page-loader.active {
    width: 85%;
}

.page-loader.complete {
    width: 100%;
    animation: fadeOut 0.5s ease forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
    }
}

/* Inline Loader (for small elements) */
.inline-loader {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #4680ff;
    animation: spin 0.8s linear infinite;
}


/* Fade In/Out Animations */
/* @keyframes fadeInLoader {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
} */
 @keyframes fadeInLoader {
    from {
        opacity: 0;
        /* no transform here */
    }
    to {
        opacity: 1;
    }
}


.loader-bg.show {
    animation: fadeInLoader 0.3s ease-out;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .loader-track {
        width: 50px;
        height: 50px;
        border-width: 3px;
    }

    .loader-fill {
        width: 50px;
        height: 50px;
        border-width: 3px;
        top: -3px;
        left: -3px;
    }

    .loader-text {
        font-size: 12px;
        margin-top: 15px;
    }

    .loader-dots {
        margin-top: 20px;
    }

    .loader-dot {
        width: 6px;
        height: 6px;
    }
}

/* Support for minimal loader */
.loader-minimal {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top: 3px solid #4680ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

