/* ===================== PAGE LOADER (shared across all pages) =====================
   Full-screen overlay + spinner shown right before a real page navigation
   (form submit / link click) so the customer isn't staring at a frozen page
   during the brief gap before the next page loads. Self-contained — hardcoded
   colors rather than each page's own CSS variables, same reasoning as
   style/lang-switcher.css (page stylesheets don't share a consistent
   design-token naming scheme). */

/* No backdrop-filter here. Blurring the backdrop has to be re-rasterised from
   page content every frame, on the main thread - and this overlay's whole job
   is to be on screen while the browser is busy waiting on a POST that can take
   the gateway's full 15s timeout to answer. That is exactly when the main
   thread stops producing frames, and the spinner appears frozen. A flat
   translucent fill composites once and cannot stall. */
.page-loader {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(3, 2, 14, 0.88);
  z-index: 100000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease;
}

.page-loader.visible {
  opacity: 1;
  visibility: visible;
}

/* will-change promotes the spinner to its own compositor layer, so its rotation
   is driven off the main thread and keeps turning while the page waits. */
.page-loader-spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 4px solid rgba(139, 70, 255, 0.22);
  border-top-color: #a54cff;
  animation: page-loader-spin 0.7s linear infinite;
  will-change: transform;
}

@keyframes page-loader-spin {
  to { transform: rotate(360deg); }
}
