/* List-row action — DESIGN.md §4 extension.
 *
 * A small icon button (typically a trash) that lives inside a
 * `.list-group-item` row and only fades in on row hover/focus. Used
 * by the inspector rule lists (Display logic / Validation rules) to
 * surface a Delete affordance without cluttering the rest state.
 *
 * Anatomy:
 *   .list-row-action  the trigger (icon button). Hidden at rest;
 *                     fades in when the parent .list-group-item is
 *                     hovered OR contains focus (keyboard users).
 *
 * Sibling-level focus is preserved: the button itself is in the
 * tab order, so keyboard users can Tab into the row → button stays
 * visible while focus is inside.
 */
.list-row-action {
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease-out;
}

.list-group-item:hover > .list-row-action,
.list-group-item:focus-within > .list-row-action,
.list-row-action:focus,
.list-row-action:focus-visible {
  opacity: 1;
  pointer-events: auto;
}

/* Touch devices have no `:hover` and no Tab focus — keyboard-style
 * hover-affordance is unreachable. Surface the action at reduced
 * opacity at rest so tablet users (Myras is field-deployable on
 * iPads per the product mission) can still discover + tap the
 * action without first opening the row's primary editor. */
@media (hover: none) {
  .list-row-action {
    opacity: 0.5;
    pointer-events: auto;
  }
}
