/**
 * GoBharat Simple Page Loader
 * A clean, animated loader that appears on page navigation
 */

/* Loader Container */
#gb-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#gb-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Spinner Container */
.gb-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

/* Dual Ring Spinner - Simple and Always Animates */
.gb-ring {
    width: 50px;
    height: 50px;
    border: 4px solid #e3e8f0;
    border-top: 4px solid #0d6efd;
    border-right: 4px solid #0d6efd;
    border-radius: 50%;
    animation: gb-spin 0.8s linear infinite;
}

@keyframes gb-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Loading Text */
.gb-loading-text {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    letter-spacing: 0.5px;
}

/* Dot Animation for Text */
.gb-loading-text::after {
    content: '';
    animation: gb-dots 1.5s infinite;
}

@keyframes gb-dots {

    0%,
    20% {
        content: '';
    }

    40% {
        content: '.';
    }

    60% {
        content: '..';
    }

    80%,
    100% {
        content: '...';
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .gb-ring {
        animation: none;
        border-top-color: #0d6efd;
        border-right-color: #e3e8f0;
    }

    .gb-loading-text::after {
        animation: none;
        content: '...';
    }
}