/* ================================================================
 * Vilkax · Wolf Loader (Pass 142)
 * ================================================================
 *
 * Reusable loading affordance.
 *
 * Two-phase reveal — the wrapper starts at opacity 0 with a
 * `transition: opacity 200ms`.  Callers attach `.is-visible`
 * AFTER a 250ms delay (via wolf-loader.js).  Result: fast loads
 * never flash the loader; only genuinely slow ones (> 250ms)
 * see a calm fade-in.
 *
 * Markup the JS produces:
 *
 *   <div class="vlx-wolf-loader" aria-live="polite" aria-busy="true">
 *     <div class="vlx-wolf-loader-glow">
 *       <img src="/wolf-emblem.svg" alt="" />
 *     </div>
 *     <span class="vlx-wolf-loader-label">loading…</span>
 *   </div>
 * ================================================================ */

.vlx-wolf-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 32px 24px;
  opacity: 0;
  transition: opacity 240ms ease;
  pointer-events: none;
}
.vlx-wolf-loader.is-visible {
  opacity: 1;
}

.vlx-wolf-loader-glow {
  position: relative;
  width: 72px;
  height: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.vlx-wolf-loader-glow::before {
  /* Ambient radial halo behind the wolf — pulses softly. */
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(59, 130, 246, 0.40) 0%, rgba(59, 130, 246, 0) 65%);
  animation: vlx-wolf-loader-halo 2.4s ease-in-out infinite;
}
.vlx-wolf-loader-glow::after {
  /* Spinning conic ring framing the wolf — reads as "thinking". */
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: rgba(96, 165, 250, 0.85);
  border-right-color: rgba(96, 165, 250, 0.30);
  animation: vlx-wolf-loader-spin 1.3s linear infinite;
}
.vlx-wolf-loader-glow img {
  position: relative;
  z-index: 1;
  width: 44px;
  height: 44px;
  display: block;
  color: #93c5fd;       /* drives currentColor on the SVG */
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35));
}

.vlx-wolf-loader-label {
  font-family: var(--font-brand, "Manrope", system-ui, sans-serif);
  font-size: 11px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: rgba(147, 197, 253, 0.85);
  font-weight: 700;
}

@keyframes vlx-wolf-loader-halo {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%      { opacity: 1.0; transform: scale(1.10); }
}
@keyframes vlx-wolf-loader-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .vlx-wolf-loader-glow::before { animation: none; }
  .vlx-wolf-loader-glow::after  { animation: none; }
  /* In reduced-motion, the loader is the static halo + wolf. */
}
