.instant-refresh-feedback svg.lucide-refresh-cw,
.instant-refresh-feedback svg.lucide-rotate-cw,
.instant-refresh-feedback i[data-lucide="refresh-cw"],
.instant-refresh-feedback i[data-lucide="rotate-cw"] {
  animation: instant-refresh-spin .72s linear infinite !important;
}

.instant-refresh-feedback.instant-refresh-text-only::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 6px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  vertical-align: -2px;
  animation: instant-refresh-spin .72s linear infinite;
}

.teacher-quota-refresh.instant-quota-blink svg,
.teacher-quota-refresh.is-refreshing svg,
[data-web-quota-card].instant-quota-blink .teacher-stat strong,
[data-web-quota-card]:has(.teacher-quota-refresh.is-refreshing) .teacher-stat strong {
  animation: instant-quota-flash .72s ease-in-out infinite !important;
}

@keyframes instant-quota-flash {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

/* Keep the full-page loading indicator moving in either theme. */
.student-profiles-loading-state > .student-profiles-spinner,
.current-profile-loading-dot,
.web-login-qr-spinner,
.personal-memory-summary-spinner,
.group-batch-status-spinner {
  border-color: var(--web-accent-light, #e4edfc);
  border-top-color: var(--web-accent-primary, #3971d3);
  animation: instant-refresh-spin .72s linear infinite !important;
}

body:not(.personal-web) :is(.student-profiles-loading-state > .student-profiles-spinner, .web-login-qr-spinner, .group-batch-status-spinner) {
  border-color: var(--group-green-line, #d1e8df);
  border-top-color: var(--group-green, #117a65);
}

@media (prefers-reduced-motion: reduce) {
  .instant-refresh-feedback svg.lucide-refresh-cw,
  .instant-refresh-feedback svg.lucide-rotate-cw,
  .instant-refresh-feedback i[data-lucide="refresh-cw"],
  .instant-refresh-feedback i[data-lucide="rotate-cw"],
  .instant-refresh-feedback.instant-refresh-text-only::before,
  .student-profiles-loading-state > .student-profiles-spinner,
  .current-profile-loading-dot,
  .web-login-qr-spinner,
  .personal-memory-summary-spinner,
  .group-batch-status-spinner,
  .web-quota-history-status.is-loading::before {
    animation-duration: .72s !important;
    animation-iteration-count: infinite !important;
  }
  .teacher-quota-refresh.instant-quota-blink svg,
  .teacher-quota-refresh.is-refreshing svg,
  [data-web-quota-card].instant-quota-blink .teacher-stat strong,
  [data-web-quota-card]:has(.teacher-quota-refresh.is-refreshing) .teacher-stat strong {
    animation-duration: .72s !important;
    animation-iteration-count: infinite !important;
  }
}

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