/* wsp_loading.css — global "is it loading?" feedback (busy cursor + nav bar)
 * =============================================================================
 * Purpose : visible signal that the UI is working — a wait cursor on clicks and
 *           a top progress bar during full-page navigation, so a slow round-trip
 *           never looks frozen.
 * Pages   : ALL — injected once by layout.py (shared head) alongside the
 *           header sheets. Pairs with assets/static/wsp_loading.js.
 * Vars    : none — fixed UX affordances. Accent = WSP brand red (#F9423A).
 * Toggled : body classes set by wsp_loading.js (wsp-busy-cursor, wsp-navigating).
 *
 * ── §1 · Busy cursor
 * ── §2 · Nav top progress bar
 */

/* ─── §1 · Busy cursor ──────────────────────────────────────────────────────
 * Canonical app-wide copy (header nav exists on every page, not just grid
 * pages). bdis.css §-busy carries an identical rule for grid pages that load
 * it first; keep the two in sync. `progress` (not `wait`) = "working, still
 * interactive". */
body.wsp-busy-cursor,
body.wsp-busy-cursor * { cursor: progress !important; }

/* ─── §2 · Nav top progress bar ─────────────────────────────────────────────
 * A 3px indeterminate sweep pinned to the very top while a full-page nav is in
 * flight (body.wsp-navigating, set on nav-link click). A real <a href> nav
 * can't paint in-page once it starts, so this is the only pre-paint cue. The
 * destination document loads without the class, so it clears itself. */
body.wsp-navigating::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  z-index: 99999;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, #f9423a 50%, transparent 100%);
  background-size: 40% 100%;
  background-repeat: no-repeat;
  animation: wsp-nav-progress 0.9s linear infinite;
}
@keyframes wsp-nav-progress {
  0%   { background-position: -40% 0; }
  100% { background-position: 140% 0; }
}
