/*
  Shared Doma button state language.
  Disabled-but-idle buttons keep the brand border/text on a gray background.
  The button actively doing work receives the full grayscale treatment.
*/
:where(button, input[type="button"], input[type="submit"], input[type="reset"]):disabled,
:where(button, input[type="button"], input[type="submit"], input[type="reset"])[aria-disabled="true"] {
  cursor: not-allowed !important;
  background-color: #ccc !important;
  color: var(--doma-button-state-accent, #71614B) !important;
  border-color: var(--doma-button-state-accent, #71614B) !important;
  opacity: 1 !important;
  box-shadow: none !important;
  transform: none !important;
}

:where(button, input[type="button"], input[type="submit"], input[type="reset"]).is-processing:disabled,
:where(button, input[type="button"], input[type="submit"], input[type="reset"]).doma-is-processing:disabled,
:where(button, input[type="button"], input[type="submit"], input[type="reset"]).button-pending:disabled,
:where(button, input[type="button"], input[type="submit"], input[type="reset"]).waiting-last-task:disabled,
:where(button, input[type="button"], input[type="submit"], input[type="reset"]).generating:disabled,
:where(button, input[type="button"], input[type="submit"], input[type="reset"]).submitting:disabled,
:where(button, input[type="button"], input[type="submit"], input[type="reset"]).ca-generating:disabled,
:where(button, input[type="button"], input[type="submit"], input[type="reset"]).is-loading:disabled,
:where(button, input[type="button"], input[type="submit"], input[type="reset"])[aria-busy="true"]:disabled,
:where(button, input[type="button"], input[type="submit"], input[type="reset"])[data-processing="true"]:disabled {
  background-color: #ccc !important;
  color: #888 !important;
  border-color: #ccc !important;
}
