/* Portal-owned additions to the mirrored logon design (public/brand/ stays a
   pristine one-way mirror of GOD sample_logon / grizcam_design_docs).
   Busy-state spinner for any step that waits on the Auth API. */

.grz-spin {
  display: none;
  width: 14px;
  height: 14px;
  flex: none;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: grz-rotate 0.8s linear infinite;
}

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

form.is-busy .grz-spin,
.grz-spin.is-on {
  display: inline-block;
}

form.is-busy button[type='submit'] {
  opacity: 0.7;
  pointer-events: none;
}

button[type='submit'] .grz-spin {
  margin-right: 8px;
  border-color: rgba(26, 24, 18, 0.35);
  border-top-color: var(--color-text-on-accent);
}

.grz-btn--secondary .grz-spin {
  border-color: var(--color-border);
  border-top-color: var(--color-accent);
}

.auth__status .grz-spin {
  vertical-align: -2px;
  margin-right: 6px;
}

@media (prefers-reduced-motion: reduce) {
  .grz-spin {
    animation: none;
    opacity: 0.6;
  }
}
