/* Shared by messenger, master and company admin. Disabled is not a loading state. */
:disabled,
[aria-disabled="true"] {
  cursor: not-allowed !important;
}

:disabled *,
[aria-disabled="true"] * {
  cursor: inherit !important;
}

/* Only explicit, in-flight operations may override the disabled cursor. */
button[aria-busy="true"],
[data-controls-busy="true"] :disabled,
[data-controls-busy="true"] [aria-disabled="true"],
:is(form, dialog)[aria-busy="true"] :disabled,
:is(form, dialog)[aria-busy="true"] [aria-disabled="true"] {
  cursor: progress !important;
}

button[aria-busy="true"] { position: relative; }

button[aria-busy="true"]::after {
  content: "";
  position: absolute;
  inset-block-start: 3px;
  inset-inline-end: 3px;
  width: .65em;
  height: .65em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: control-request-spin .8s linear infinite;
  pointer-events: none;
}

@keyframes control-request-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  button[aria-busy="true"]::after { animation: none; }
}
