/* ============================================
   Global Loading Spinner Overlay
   ============================================ */

#globalSpinnerOverlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

#globalSpinnerOverlay.active {
    opacity: 1;
    visibility: visible;
}

/* Spinner ring */
.spinner-ring {
    width: 56px;
    height: 56px;
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--accent-color, #3B82F6);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Pulsing glow behind the spinner */
.spinner-ring::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.25) 0%, transparent 70%);
    animation: pulse-glow 1.6s ease-in-out infinite;
}

.spinner-label {
    margin-top: 1rem;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    animation: fade-dots 1.4s steps(4, end) infinite;
}

/* Keyframes */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50%      { opacity: 1;   transform: scale(1.15); }
}

@keyframes fade-dots {
    0%   { content: 'Processing';    }
    25%  { content: 'Processing.';   }
    50%  { content: 'Processing..';  }
    75%  { content: 'Processing...'; }
}
