/* ============================================================
   loader.css — Universal Theme-Bound Loading System
   ============================================================ */

/* ── 1. TOP PROGRESS ACCENT BAR ── */
#globalTopLoader {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--clr-accent, #38bdf8), var(--clr-accent-light, #7dd3fc), #facc15);
  box-shadow: 0 0 10px var(--clr-accent, #38bdf8), 0 0 5px var(--clr-accent, #38bdf8);
  z-index: 99999;
  transition: width 0.25s ease-out, opacity 0.4s ease;
  pointer-events: none;
}

/* ── 2. FULLSCREEN OVERLAY SPINNER ── */
#globalOverlayLoader {
  position: fixed;
  inset: 0;
  background: var(--clr-bg, #0a0e1a);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 99998;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

#globalOverlayLoader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Glassmorphic Spinner Ring */
.cs-loader-ring {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.08);
  border-top-color: var(--clr-accent, #38bdf8);
  border-right-color: var(--clr-accent, #38bdf8);
  animation: csSpinner 0.8s linear infinite;
  box-shadow: 0 0 20px var(--glow-accent, rgba(56, 189, 248, 0.25));
}

@keyframes csSpinner {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.cs-loader-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--clr-text-muted, #94a3b8);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── 3. INLINE CONTENT / CONTAINER LOADER ── */
.cs-inline-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: var(--clr-accent, #38bdf8);
}

.cs-inline-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--clr-accent, #38bdf8);
  border-radius: 50%;
  animation: csSpinner 0.7s linear infinite;
}