/* Keep the pointer stable across the complete visual surface of enabled controls. */
:where(
  button:not(:disabled),
  a[href],
  select:not(:disabled),
  input[type="checkbox"]:not(:disabled),
  input[type="radio"]:not(:disabled),
  [role="button"]:not([aria-disabled="true"]),
  [role="tab"]:not([aria-disabled="true"]),
  [role="menuitem"]:not([aria-disabled="true"]),
  [data-clickable="true"]:not([aria-disabled="true"])
) {
  cursor: pointer;
}

/* SVG paths, labels and icon wrappers must not replace the control cursor. */
:where(
  button,
  a[href],
  [role="button"],
  [role="tab"],
  [role="menuitem"],
  [data-clickable="true"]
) *,
:where(
  button,
  a[href],
  [role="button"],
  [role="tab"],
  [role="menuitem"],
  [data-clickable="true"]
)::before,
:where(
  button,
  a[href],
  [role="button"],
  [role="tab"],
  [role="menuitem"],
  [data-clickable="true"]
)::after {
  cursor: inherit;
}

label:has(input[type="checkbox"]:not(:disabled)),
label:has(input[type="radio"]:not(:disabled)),
label:has(input[type="checkbox"]:not(:disabled)) *,
label:has(input[type="radio"]:not(:disabled)) * {
  cursor: pointer;
}

/* Disabled controls never advertise an action. Loading submits keep their wait state. */
:where(
  button:disabled,
  select:disabled,
  input[type="checkbox"]:disabled,
  input[type="radio"]:disabled,
  [role="button"][aria-disabled="true"],
  [role="tab"][aria-disabled="true"],
  [role="menuitem"][aria-disabled="true"],
  [data-clickable="true"][aria-disabled="true"]
) {
  cursor: not-allowed;
}

.login-layout-shell .login-submit:disabled {
  cursor: wait;
}

:where(button:disabled, select:disabled, input[type="checkbox"]:disabled, input[type="radio"]:disabled) * {
  cursor: inherit;
}

/* Text entry, dragging and resizing remain native even inside composite widgets. */
:where(input:not([type="checkbox"]):not([type="radio"]), textarea) {
  cursor: text;
}

:where([draggable="true"], [data-draggable="true"]) {
  cursor: grab;
}

:where([draggable="true"], [data-draggable="true"]):active {
  cursor: grabbing;
}
