/* The rating input fills UP TO the chosen star.

   rv-20260831.css tried to do this with the sibling combinator and could
   not: `~` only matches forward, and every label below the chosen rating
   sits BEFORE its radio in the source, so twenty of the twenty-five pairs
   it wrote out by hand could never match. Only the chosen star lit.

   :has() is the selector that looks backwards. [data-picked] is the same
   rule for engines without :has(), set by the change handler that already
   updates the label under the stars. Both read the same number.

   Source order, not visual order: in RTL the first star is the rightmost,
   so a rating fills from the right, which is what it should do. */

.rv-rate:has(#rv-star-1:checked) :is(label[for="rv-star-1"]).rv-star-lbl .rv-star,
.rv-rate:has(#rv-star-2:checked) :is(label[for="rv-star-1"], label[for="rv-star-2"]).rv-star-lbl .rv-star,
.rv-rate:has(#rv-star-3:checked) :is(label[for="rv-star-1"], label[for="rv-star-2"], label[for="rv-star-3"]).rv-star-lbl .rv-star,
.rv-rate:has(#rv-star-4:checked) :is(label[for="rv-star-1"], label[for="rv-star-2"], label[for="rv-star-3"], label[for="rv-star-4"]).rv-star-lbl .rv-star,
.rv-rate:has(#rv-star-5:checked) .rv-star-lbl .rv-star { fill: #ffb524; }

.rv-rate[data-picked="1"] :is(label[for="rv-star-1"]).rv-star-lbl .rv-star,
.rv-rate[data-picked="2"] :is(label[for="rv-star-1"], label[for="rv-star-2"]).rv-star-lbl .rv-star,
.rv-rate[data-picked="3"] :is(label[for="rv-star-1"], label[for="rv-star-2"], label[for="rv-star-3"]).rv-star-lbl .rv-star,
.rv-rate[data-picked="4"] :is(label[for="rv-star-1"], label[for="rv-star-2"], label[for="rv-star-3"], label[for="rv-star-4"]).rv-star-lbl .rv-star,
.rv-rate[data-picked="5"] .rv-star-lbl .rv-star { fill: #ffb524; }

/* Hovering the fourth star previews four, not the fourth alone. Adds gold
   only — never removes it — so with a rating already chosen the display
   shows whichever is larger, identically under both rules above. */
.rv-rate:has(label[for="rv-star-1"]:hover) :is(label[for="rv-star-1"]).rv-star-lbl .rv-star,
.rv-rate:has(label[for="rv-star-2"]:hover) :is(label[for="rv-star-1"], label[for="rv-star-2"]).rv-star-lbl .rv-star,
.rv-rate:has(label[for="rv-star-3"]:hover) :is(label[for="rv-star-1"], label[for="rv-star-2"], label[for="rv-star-3"]).rv-star-lbl .rv-star,
.rv-rate:has(label[for="rv-star-4"]:hover) :is(label[for="rv-star-1"], label[for="rv-star-2"], label[for="rv-star-3"], label[for="rv-star-4"]).rv-star-lbl .rv-star,
.rv-rate:has(label[for="rv-star-5"]:hover) .rv-star-lbl .rv-star { fill: #ffb524; }
