button[data-action-state=pending] { cursor: wait; opacity: .85; }
button[data-action-state=pending]::after {
  content: '';
  display: inline-block;
  width: .75em;
  height: .75em;
  margin-inline-start: .45em;
  vertical-align: -.08em;
  border: 2px solid currentColor;
  border-inline-end-color: transparent;
  border-radius: 50%;
  animation: action-spin .8s linear infinite;
}
button[data-action-state=success] { background: #31513b; color: #fff; border-color: #31513b; opacity: 1; }
@keyframes action-spin { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) {
  button[data-action-state=pending]::after { animation: none; }
}
