/* UMI Exchange — functional micro-interactions kept under the calm "parish"
   philosophy: only the toast notifications and the refresh spinner. All other
   motion is gentle fades defined in input.css. Disabled under reduced-motion. */

@keyframes umi-toast-in {
  from { opacity: 0; transform: translateX(120%); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes umi-toast-out {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(120%); }
}
@keyframes umi-spin { to { transform: rotate(360deg); } }

/* Toasts (fed by HX-Trigger showToast + server messages, see base.html) */
#umi-toasts {
  position: fixed; top: 1rem; right: 1rem; z-index: 60;
  display: flex; flex-direction: column; gap: 0.5rem;
  width: 22rem; max-width: calc(100vw - 2rem); pointer-events: none;
}
.umi-toast { pointer-events: auto; animation: umi-toast-in 300ms ease-out both; }
.umi-toast.umi-toast-leaving { animation: umi-toast-out 200ms ease-in forwards; }

/* Refresh icon spins while its HTMX request is in flight */
.umi-spin-on-request.htmx-request svg { animation: umi-spin 0.8s linear infinite; }

@media (prefers-reduced-motion: reduce) {
  .umi-toast, .umi-toast.umi-toast-leaving, .umi-spin-on-request.htmx-request svg {
    animation: none !important;
  }
}
