/* played-move.css — "the move this sequence is playing", marked the same way in
 * every display that plays a sequence over a written one.
 *
 * The algorithm trainers (algsTemplate.js), the guides' algorithm cards, the
 * timer's scramble modal, the reconstructor's solution overlay, the chatbot's
 * cubes, /test-analysis, /test-breakdown and the saved solutions on a profile
 * all build their moves as one span each and mark exactly one of them with
 * `is-current-move` (see analysisMoveHighlight.js, and paintScrambleHighlightMove
 * in timer/scrambleManager.js for the one painter that owns its own markup).
 *
 * The class is styled here and nowhere else: a page that needs a different look
 * should change this file, not restate the tint in its own stylesheet.
 */

/* The span classes the displays are built from. Only the transition lives here;
   the type, spacing and colour of the sequence itself belong to the display
   that draws it. Having it here rather than on `.is-current-move` is what lets
   the mark fade *out* again, because the transition is still in force once the
   class is taken off. */
.timer-scramble-move,
.guide-alg-card__move,
.alg-play-seg,
.recon-move-token {
    transition: background-color 0.08s ease, box-shadow 0.08s ease, color 0.08s ease;
}

/* The mark.
 *
 * The room around the tint comes from the same tint repeated as two box-shadows
 * offset left and right, not from padding: a shadow takes no part in layout, so
 * a marked move is exactly as wide and as tall as an unmarked one and nothing on
 * the line shifts when the mark steps from one move to the next. The shadows
 * carry no spread, so they only reach sideways: the tint gets wider without
 * growing taller, which keeps it inside the line's own height. Where they meet
 * the element they abut its background, so the three pieces read as one block
 * rounded at both ends, and no area is covered twice.
 *
 * The offsets are in `em`, so the breathing room follows each display's own type
 * size. */
.is-current-move {
    --played-move-tint: color-mix(in srgb, var(--accent-color, #0d6efd) 20%, transparent);
    background: var(--played-move-tint);
    box-shadow:
        0.28em 0 0 0 var(--played-move-tint),
        -0.28em 0 0 0 var(--played-move-tint);
    color: var(--accent-color, #0d6efd);
    border-radius: 0.24rem;
}
