/* ==========================================================================
   HMK Data VTU - Futuristic Animated AJAX Table Loading Spinner Overlay
   ========================================================================== */

/* Prevent Page Scrolling While Loading */
body.ajax-table-loading,
html.ajax-table-loading {
    overflow: hidden !important;
    touch-action: none !important;
    -ms-touch-action: none !important;
    overscroll-behavior: none !important;
}

/* Full Viewport Screen Overlay - Fixed at the Center of the Screen */
.ajax-table-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999999 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.72) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none !important;
    transform: scale(0.98);
    transition: opacity 0.16s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.16s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.16s;
    overflow: hidden !important;
    touch-action: none !important;
    overscroll-behavior: contain !important;
    user-select: none !important;
}

.dark .ajax-table-overlay {
    background: rgba(15, 23, 42, 0.80) !important;
}

.ajax-table-overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: scale(1) !important;
}

.ajax-table-overlay.closing {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: scale(0.98) !important;
    pointer-events: none !important;
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.2s;
}

.ajax-table-overlay.hidden {
    display: none !important;
}

/* Top Laser Shimmer Progress Bar across entire screen top */
.ajax-table-laser {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    height: 4px !important;
    background: linear-gradient(90deg, #4f46e5, #06b6d4, #10b981, #f59e0b, #4f46e5) !important;
    background-size: 300% 100% !important;
    animation: ajaxLaserSweep 1.6s ease-in-out infinite !important;
    box-shadow: 0 0 18px rgba(79, 70, 229, 0.9), 0 0 8px rgba(6, 182, 212, 0.7) !important;
    z-index: 10000000 !important;
}

/* Ambient Radial Aura Glow */
.ajax-spinner-aura {
    position: absolute;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.4) 0%, rgba(6, 182, 212, 0.2) 50%, transparent 70%);
    filter: blur(20px);
    animation: ajaxAuraPulse 2.2s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

/* Pure Cosmic Triple-Orbital Spinner - Free-floating, No box shadow, No container card, No text */
.ajax-cosmic-spinner {
    position: relative;
    width: 76px;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    z-index: 10;
    animation: ajaxSpinnerPop 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Outer Gradient Ring */
.ajax-spinner-outer-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3.5px solid transparent;
    border-top-color: #6366f1;
    border-right-color: #818cf8;
    border-bottom-color: #06b6d4;
    filter: drop-shadow(0 0 12px rgba(99, 102, 241, 0.75));
    animation: ajaxSpinCW 1.1s linear infinite;
}

/* Middle Inverted Ring */
.ajax-spinner-mid-ring {
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #10b981;
    border-left-color: #38bdf8;
    filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.6));
    animation: ajaxSpinCCW 0.85s cubic-bezier(0.42, 0, 0.58, 1) infinite;
}

/* Inner Pulsing Core */
.ajax-spinner-core {
    position: absolute;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 50%, #06b6d4 100%);
    box-shadow: 0 0 18px rgba(79, 70, 229, 0.8), inset 0 0 6px rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 14px;
    animation: ajaxCorePulse 1.6s ease-in-out infinite;
}

.ajax-spinner-core i {
    animation: ajaxIconRotate 2.4s ease-in-out infinite;
}

/* Radar Wave Ring */
.ajax-radar-ring {
    position: absolute;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    border: 1.5px solid rgba(99, 102, 241, 0.6);
    opacity: 0;
    animation: ajaxRadarWave 2s cubic-bezier(0.2, 0.8, 0.4, 1) infinite;
}

/* Keyframe Animations */
@keyframes ajaxSpinCW {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes ajaxSpinCCW {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

@keyframes ajaxLaserSweep {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes ajaxSpinnerPop {
    0% {
        opacity: 0;
        transform: scale(0.85);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes ajaxAuraPulse {
    0%, 100% {
        opacity: 0.4;
        transform: scale(0.9);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.15);
    }
}

@keyframes ajaxCorePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 18px rgba(79, 70, 229, 0.8);
    }
    50% {
        transform: scale(1.12);
        box-shadow: 0 0 28px rgba(6, 182, 212, 0.95);
    }
}

@keyframes ajaxIconRotate {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}

@keyframes ajaxRadarWave {
    0% {
        transform: scale(0.85);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.9);
        opacity: 0;
    }
}
