/* ACTIVE VERSION MARK (Simon, 12 Nov 2026 13:25: "Make it so when we're editing images in the edit tool, either with the
   crop setting or the image edit setting, it's obvious which version we've selected is used in the keyframe. Make it so it
   has a more noticeable border and something that says 'active' over the selected one.")

   Every versions strip in the Edit tool (js/cropvid.js) already lights the version in use with .on, worked out from the very
   state the send reads, on every draw:
     - a crop's takes strip (.cv-row .tk .t): a still is .on when it is p.takeIdx -- set together with p.stillPath, the still
       the crop shows and Generate Video / Render use (useTake, cvpKeepStill); a clip when its path is p.vpath, the crop's clip;
     - a keyframe's Versions (.kfp-vs .kv, the Image Edit setting, the Original first): .on is the picture pinShown(k) sends --
       k.edited unless k.useOrig, else the Original frame (edKfPic / chgFlPic / the next Generate's first picture);
     - an edit's video Versions (.sec-vers .t): .on is s.result, "on show, and what Render and Flatten use".
   So the mark hangs off .on and nothing else: it moves the moment another version is pressed, comes back with every redraw
   (the strips are rebuilt from state), and is on the one sent. With a single version, that one is .on and is marked.

   The mark: a 3px brand-colour border with a soft glow, an "ACTIVE" pill (brand background, white bold 9px) at its top left
   (a ::before, so no draw code changes), and the others dimmed to .7, full on hover. Badges that sat top left on the active
   tile (a still's "Video", a clip's play glyph, an edit version's "On" / "Picked") step down under the pill.
   :root is in front of each rule so it outranks the room's own rules, injected after this sheet. */

/* ACTIVE VERSION MARK -- the border and glow */
:root .cv-row .tk .t.on:not(.gen),
:root .kfp-vs .kv.on:not(.kv-pending),
:root .sec-vers .t.on:not(.gen) {
  box-sizing: border-box;
  border: 3px solid var(--accent, #E50A4E);
  box-shadow: 0 0 0 1px rgba(229, 10, 78, .45), 0 0 10px 2px rgba(229, 10, 78, .55);
  opacity: 1;
  position: relative;
}

/* ACTIVE VERSION MARK -- the mark over it.
   CROP STRIP TIDY (Simon, 18 Nov 2026 14:26: "Instead of it saying "active", make it just be a tick, a white tick in a circle
   of the brand color."): a white tick in a 14px brand-colour circle, no word. RECORDED REVERSAL: content "ACTIVE", a pill
   (padding 1px 4px, radius 999px, white bold 9px uppercase). The tooltip of the crop's tile says "In use"
   (js/cropvid-croptidy.js). */
:root .cv-row .tk .t.on:not(.gen)::before,
:root .kfp-vs .kv.on:not(.kv-pending)::before,
:root .sec-vers .t.on:not(.gen)::before {
  content: "";   /* CROP STRIP TIDY */
  position: absolute; left: 3px; top: 3px; z-index: 4;
  width: 14px; height: 14px; padding: 0; border-radius: 50%; box-sizing: border-box;   /* CROP STRIP TIDY */
  background: var(--accent, #E50A4E) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.2 8.4l2.5 2.5 5.1-5.3' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 11px 11px no-repeat;   /* CROP STRIP TIDY */
  box-shadow: 0 1px 3px rgba(0, 0, 0, .55);
  pointer-events: none;
}

/* ACTIVE VERSION MARK -- the others, dimmed; full on hover */
:root .cv-row .tk .t:not(.on):not(.gen),
:root .kfp-vs .kv:not(.on):not(.kv-pending),
:root .sec-vers .t:not(.on):not(.gen) {
  opacity: .7;
  transition: opacity .12s;
}
:root .cv-row .tk .t:not(.on):not(.gen):hover,
:root .kfp-vs .kv:not(.on):not(.kv-pending):hover,
:root .sec-vers .t:not(.on):not(.gen):hover {
  opacity: 1;
}

/* ACTIVE VERSION MARK -- what sat top left on the active tile steps down under the pill */
:root .cv-row .tk .t.on .vs:not(.cv-bs):not(.cv-dft) { top: 16px; }
:root .cv-row .tk .t.clip.on:not(.gen)::after { top: 18px; }
:root .sec-vers .t.on .pk { top: 17px; }
