/* Pseudo-element survives action text/HTML updates without changing the label. */
.button-loading { cursor: progress; }
.surface-loading { position: relative; }
.surface-loading::after {
  content: '';
  position: absolute;
  top: 10px;
  right: 12px;
  width: 13px;
  height: 13px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: button-loading-spin .7s linear infinite;
  opacity: .8;
  pointer-events: none;
}
.button-loading::after {
  content: '' !important;
  display: inline-block !important;
  flex: 0 0 12px;
  box-sizing: border-box;
  width: 12px; height: 12px;
  margin-left: 8px;
  vertical-align: middle;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: button-loading-spin .7s linear infinite;
  opacity: .9;
}
@keyframes button-loading-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .button-loading::after { animation-duration: 2s; }
}
