/* Page-load feedback shared by the staff admin and both portals
   (loading-indicator.js). Colours come from whichever theme is loaded:
   the portals' --gradient-brand, else the admin's --ar-accent tokens. */

.ar-loading-bar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2147483000;
  width: 0;
  height: 3px;
  background: var(--gradient-brand, var(--ar-accent, #9810fa));
  box-shadow: 0 0 8px var(--ar-accent-line, #c27aff);
  opacity: 0;
  pointer-events: none;
  transition: width 0.2s ease, opacity 0.25s ease;
}

.ar-loading-bar.is-on {
  opacity: 1;
}

[aria-busy="true"].ar-busy {
  cursor: progress !important;
  opacity: 0.75;
}

a.ar-busy {
  pointer-events: none;
}

.ar-spinner {
  display: inline-block;
  flex: none;
  width: 0.9em;
  height: 0.9em;
  margin-inline-end: 0.45em;
  vertical-align: -0.1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: ar-spin 0.7s linear infinite;
}

/* Inside Unfold action/sidebar links the spinner stands in for the icon. */
.material-symbols-outlined + .ar-spinner,
.ar-spinner + .material-symbols-outlined {
  margin-inline-end: 0;
}

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

@media (prefers-reduced-motion: reduce) {
  .ar-loading-bar {
    transition: opacity 0.2s ease;
  }

  .ar-spinner {
    animation-duration: 1.6s;
  }
}
