/* CT-322 MEDIA-SELECT-SCOPE
   Goal: when a media item is selected in the Add Media panel, the selection
   effect stays on the THUMBNAIL CARD only (.assetPreview ring + glow). The
   title / meta text (.assetMeta strong + small) must look identical to its
   resting (non-selected) state -- no accent color or extra weight bleeding
   into the whole title row.
   Gated behind html.zed-ux (default OFF => zero regression). The card
   (.assetPreview) selection ring/glow is intentionally left untouched. */

/* ---- Dark / night skins (noir / velvet / capcut) ---- */
html.zed-ux .editorApp[data-theme="dark"] .assetItem.is-selected .assetMeta strong,
html.zed-ux .editorApp[data-theme="night"] .assetItem.is-selected .assetMeta strong {
  color: rgba(226, 232, 240, 0.92) !important;
  font-weight: 500 !important;
}

html.zed-ux .editorApp[data-theme="dark"] .assetItem.is-selected .assetMeta small,
html.zed-ux .editorApp[data-theme="night"] .assetItem.is-selected .assetMeta small {
  color: rgba(148, 163, 184, 0.82) !important;
}

/* ---- Light skins (lumen / glacier) ---- */
html.zed-ux .editorApp:not([data-theme="dark"]):not([data-theme="night"]) .assetItem.is-selected .assetMeta strong {
  color: #0f172a !important;
  font-weight: 600 !important;
}

html.zed-ux .editorApp:not([data-theme="dark"]):not([data-theme="night"]) .assetItem.is-selected .assetMeta small {
  color: #334155 !important;
  font-weight: 450 !important;
}

/* Keep the natural hover affordance identical to a NON-selected card: on hover
   the title may brighten, exactly as an unselected item does. We only strip the
   selection-driven accent, not the hover brightening. */
html.zed-ux .assetItem.is-selected:hover .assetMeta strong {
  color: rgba(248, 250, 252, 0.96) !important;
}
html.zed-ux .editorApp:not([data-theme="dark"]):not([data-theme="night"]) .assetItem.is-selected:hover .assetMeta strong {
  color: #020617 !important;
}

/* CT-323 SELFRAME: ONE selection frame, on the thumbnail card only.
   Bug: a media card showed TWO overlapping selection frames / colors --
   (1) PN5 (zed-pn5-cards.css) puts an accent border + 1px accent ring around
   the WHOLE button.assetItem (thumbnail + title + meta), and (2) the base
   spectrum-editor.css puts a skin-accent ring around the .assetPreview
   thumbnail. Two different accent tokens => two colors, and the outer frame
   wrapped the title box too.
   Fix: strip the OUTER whole-item selection frame so ONLY the thumbnail
   (.assetPreview) shows the selection ring. When the selected card is hovered
   or keyboard-focused it still gets the normal hover/focus affordance (same as
   a NON-selected card), so nothing feels dead. */
html.zed-ux .assetItem.is-selected:not(:hover):not(:focus-visible) {
  border-color: var(--zed-border) !important;
  box-shadow: none !important;
}
