/* Shared hover for rows with a row-level action. Action buttons inside read-only rows keep their own styles. */
/* The hover tint: the theme's primary colour over its muted surface, clearly stronger than a resting or striped row. */
:is(#list-rows, html) .workspace-v2:not(.driver-mode) { --list-row-hover: color-mix(in srgb, var(--ui-primary) 14%, var(--ui-surface-muted)); }

:is(#list-rows, html) .workspace-v2:not(.driver-mode) :is(
  button:is(.it-account-row, .it-role-head, .order-row, .catalog-record, .work-notice-row, .driver-history-row, .staff-row):not(:disabled),
  .planning-day-row:has(> .planning-day-link:not(:disabled))
):hover { background-color: var(--list-row-hover); cursor: pointer; }

/* Include cells with a background of their own, such as row headers and sticky columns. */
:is(#list-rows, html) .workspace-v2:not(.driver-mode) table > tbody > tr:is(
  .it-staff-row, .sales-work-row, .leader-trip-row, .revenue-contract-row, .tracking-item-row,
  .forecast-editable, [data-catalog-record][tabindex="0"], [data-allocation-id][aria-selected], [data-contract-item][aria-selected]
):hover {
  background-color: var(--list-row-hover);
  cursor: pointer;
}
:is(#list-rows, html) .workspace-v2:not(.driver-mode) table > tbody > tr:is(
  .it-staff-row, .sales-work-row, .leader-trip-row, .revenue-contract-row, .tracking-item-row,
  .forecast-editable, [data-catalog-record][tabindex="0"], [data-allocation-id][aria-selected], [data-contract-item][aria-selected]
):hover > :is(td, th) { background-color: var(--list-row-hover); }

:is(#list-rows, html) .workspace-v2:not(.driver-mode) :is(
  button:is(.it-account-row, .it-role-head, .order-row, .catalog-record, .work-notice-row, .driver-history-row, .staff-row),
  .planning-day-link,
  tr:is(.it-staff-row, .forecast-editable, [data-catalog-record][tabindex="0"], [data-allocation-id][aria-selected], [data-contract-item][aria-selected])
):focus-visible { outline: 2px solid var(--ui-focus); outline-offset: -2px; }

/* The chosen row stays recognisable while the pointer is on another one. */
:is(#list-rows, html) .workspace-v2:not(.driver-mode) :is(.catalog-record[aria-pressed="true"], table > tbody > tr[aria-selected="true"],
  .sales-work-row:has(.selected), .staff-row[aria-pressed="true"]):not(:hover) {
  background-color: var(--ui-selected); box-shadow: inset 3px 0 0 var(--ui-accent);
}
