$ods-state-is-readonly-background-color: var(--ods-semantic-color-surface-readonly);
$ods-state-is-readonly-border-color: var(--ods-semantic-color-border-readonly);

// A disabled control dims once: the disabled parts it embeds (an Input in a Combobox, a Button in
// an Input) read the reset below instead of stacking a second opacity on top of it.
@mixin ods-is-disabled() {
  opacity: var(--ods-state-is-disabled-opacity, var(--ods-semantic-opacity-disabled));
  cursor: not-allowed;

  > * {
    --ods-state-is-disabled-opacity: 1;
  }
}

@mixin ods-is-readonly() {
  border-color: $ods-state-is-readonly-border-color;
  background-color: $ods-state-is-readonly-background-color;
}
