/* htmx's built-in indicator class needs this toggle rule — htmx does not ship it */
.htmx-indicator {
  opacity: 0;
  transition: opacity 150ms ease-in;
}
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  opacity: 1;
}

/* the actual spinner visual */
.spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--border-subtle, rgba(255, 255, 255, 0.15));
  border-top-color: var(--accent-blue, #4F8FE0);
  border-radius: 50%;
  animation: spinner-rotate 0.6s linear infinite;
  vertical-align: middle;
}

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

/* respect motion preferences instead of forcing the animation on everyone */
@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation: none;
    opacity: 0.7;
  }
}
