/* Busy control. The mark sits in the existing padding, out of flow, so the
   label stays and the control keeps its width. No brand colors: currentColor. */

.is-busy,
.is-busy-host {
  position: relative;
}

.is-busy {
  cursor: progress;
}

.busy-spin {
  position: absolute;
  top: 50%;
  inset-inline-end: 0.28em;
  width: 0.5em;
  height: 0.5em;
  box-sizing: border-box;
  margin: 0;
  border: 2px solid currentColor;
  border-inline-end-color: transparent;
  border-radius: 50%;
  transform: translateY(-50%);
  animation: busy-spin 0.7s linear infinite;
  pointer-events: none;
}

@keyframes busy-spin {
  from { transform: translateY(-50%) rotate(0deg); }
  to { transform: translateY(-50%) rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .busy-spin {
    animation: none;
    border: 0;
    background: currentColor;
  }
}

@media (forced-colors: active) {
  .busy-spin {
    border-color: ButtonText;
    border-inline-end-color: transparent;
    background: transparent;
  }
}

@media (forced-colors: active) and (prefers-reduced-motion: reduce) {
  .busy-spin {
    border: 0;
    background: ButtonText;
  }
}

.busy-live {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
