/*
 * Changed-row wash — the transient .is-changed state a Turbo Stream sets on the row it
 * just replaced (docs/design-system/component-inventory.md "Changed-row wash").
 *
 * The row's background starts at --wash-changed and fades to transparent, letting the
 * row's own ground show, over --duration-slow. --duration-slow is already multiplied by
 * --motion-scale, which prefers-reduced-motion sets to zero, so the animation has zero
 * duration there and the row simply shows its ground. The class is removed by the
 * controller after the animation ends (or left in place; the fill-mode is forwards).
 * The gem's provisional .animate-highlight is not reused: it reads neither --motion-scale
 * nor Seq's golden wash.
 *
 * Non-color cue: the wash is a transient attention cue on a row whose content already
 * changed; it carries no meaning of its own, so it needs no glyph. Applies to any element,
 * typically <tr>, <li> or a .seq-* row. This file is the only owner of .is-changed and of
 * the wash keyframes; no component declares its own. It sits in 09-utilities because
 * .is-changed is a state class with no seq- prefix, and sorting last lets the wash win over
 * a row's own ground. --wash-changed is golden-400 at 10 %, low enough that --text-primary
 * and --text-secondary stay above 4.5:1 on the composite (_color-semantic.css).
 */

@keyframes seq-changed-wash {
  from { background-color: var(--wash-changed); }
  to   { background-color: transparent; }
}

.is-changed {
  animation-name: seq-changed-wash;
  animation-duration: var(--duration-slow);
  animation-timing-function: var(--ease-standard);
  animation-fill-mode: forwards;
}

/* Table rows: paint the wash on the cells too, so browsers that do not animate a <tr>
   background still show it. */
tr.is-changed > td,
tr.is-changed > th {
  animation-name: seq-changed-wash;
  animation-duration: var(--duration-slow);
  animation-timing-function: var(--ease-standard);
  animation-fill-mode: forwards;
}

/* On paper a change wash means nothing. */
@media print {
  .is-changed,
  tr.is-changed > td,
  tr.is-changed > th {
    animation: none;
    background-color: transparent;
  }
}
