/* Barari Gold — the repricing cue
   FE-10 · public/assets/barari/reprice.js
        · layouts/front-end/partials/_grid-reprice.blade.php

   One state, three elements, and nothing else. reprice.js adds .is-repriced to
   a figure it has just changed and removes it 900ms later; these rules are all
   that state means.

   WHY IT DOES NOT SHOW DIRECTION
   ------------------------------
   A rising/falling tint is the obvious treatment and it is deliberately not
   here. Telling the two apart means parsing a price to a float in JavaScript,
   which is the one thing the money rule forbids, and it would buy a colour.
   The cue says "this number is not the one you were looking at" — which is the
   whole of what a reader needs from it, and all this page can honestly claim.

   WHY A TRANSITION AND NOT A KEYFRAME
   -----------------------------------
   These three hooks sit on elements with four different resting colours: the
   price inherits the card's ink, the premium line is --barari-ink-52, and the
   stock line is cedar, caution or alarm depending on the count. A keyframe
   would have to name the colour it returns to and would flatten all four to
   one. A transition returns each element to whatever its own rule says, so the
   low-stock amber comes back amber and the out-of-stock alarm comes back
   alarm, with nothing here having to know that.

   RTL
   ---
   No [dir="rtl"] counterpart, and this is the one case where that is correct
   rather than an omission: the rule set contains no gradient, no transform, no
   background-position, no shadow offset and no physical margin — a colour
   change reads identically in both directions. Every other Barari sheet pairs
   its directional rules; this one has none to pair.
   ========================================================================== */

[data-barari-price],
[data-barari-prem],
[data-barari-stock] {
  transition:color 480ms ease-out;
}

/* Bronze rather than gold: --barari-gold is the wash colour and sits too close
   to the ivory ground to read as a lift on a figure. Bronze is the same warmth
   at a contrast a reader can actually see move.

   The attribute selectors carry (0,2,0) here, which is what lets the cue sit
   over .barari-card__stock--out and --low for the moment it is held. */
[data-barari-price].is-repriced,
[data-barari-prem].is-repriced,
[data-barari-stock].is-repriced {
  color:var(--barari-bronze);
}

/* A reader who has asked the operating system for less motion still needs to
   see that a figure changed, so the state stays — it simply arrives and leaves
   without the fade. Same choice rate.css made for the live pulse. */
@media (prefers-reduced-motion:reduce) {
  [data-barari-price],
  [data-barari-prem],
  [data-barari-stock] {
    transition:none;
  }
}
