/* Shared card transport skin — feed + detail (user 2026-08-27: the panel is
   the SAME component as on /explore, so it gets the same polished look; the
   only delta here is that the feed KEEPS the roster + fine-tune buttons, so
   the rail simply takes less horizontal room).

   Canonical origin of these rules: assets/zz_compare.css (the /explore
   transport). Keep the two files in step when the skin evolves; a future
   cleanup can merge them into one scope list.

   Positioning is NOT touched — the reels card keeps its floating panel
   placement from styles.css; this file only reskins it. The doubled-ID
   :is() outranks the shared ID-level playbar rules. */

/* ---- panel ----------------------------------------------------------------- */

:is(#main-feed-shell#main-feed-shell, #detail-feed-shell#detail-feed-shell) .sp-card-interactive-action-panel {
  background: var(--sp-chrome) !important;
  border: 1px solid var(--sp-border-strong) !important;
  border-radius: 14px !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  padding: 8px 12px 10px !important;
  height: auto !important;
  min-height: 0 !important;
}

:is(#main-feed-shell#main-feed-shell, #detail-feed-shell#detail-feed-shell) .sp-card-interactive-control-stack {
  position: relative;
  padding-top: 0 !important;
  gap: 0 !important;
}

/* no collapse chevron (explore parity) */
:is(#main-feed-shell#main-feed-shell, #detail-feed-shell#detail-feed-shell) .sp-card-interactive-panel-close {
  display: none !important;
}

/* ---- playbar row ------------------------------------------------------------ */

:is(#main-feed-shell#main-feed-shell, #detail-feed-shell#detail-feed-shell) .sp-card-int-playbar {
  align-items: center;
  gap: 10px;
}

:is(#main-feed-shell#main-feed-shell, #detail-feed-shell#detail-feed-shell) .sp-card-interactive-play {
  width: 36px !important;
  height: 36px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  background: var(--sp-accent) !important;
  color: var(--sp-bg) !important;
  --ai-bg: var(--sp-accent);
  --ai-hover: var(--sp-accent-hover);
  --ai-color: var(--sp-bg);
}

:is(#main-feed-shell#main-feed-shell, #detail-feed-shell#detail-feed-shell) .sp-card-interactive-play:hover {
  background: var(--sp-accent-hover) !important;
}

/* FEED DELTA vs /explore: roster + fine-tune STAY — compact dark ghosts */
:is(#main-feed-shell#main-feed-shell, #detail-feed-shell#detail-feed-shell) .sp-card-int-playbar .mantine-ActionIcon-root:not(.sp-card-interactive-play) {
  width: 32px !important;
  height: 32px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  flex: 0 0 auto;
  border-radius: 50% !important;
  background: var(--sp-surface) !important;
  border: 1px solid var(--sp-border-strong) !important;
  color: var(--sp-text-2) !important;
  box-shadow: none !important;
  --ai-bg: var(--sp-surface);
  --ai-hover: var(--sp-chip);
  --ai-color: var(--sp-text-2);
}

:is(#main-feed-shell#main-feed-shell, #detail-feed-shell#detail-feed-shell) .sp-card-int-playbar .mantine-ActionIcon-root:not(.sp-card-interactive-play):hover {
  background: var(--sp-chip) !important;
  color: var(--sp-text) !important;
}

/* ---- scrub rail: progress fill + trim strips, no end labels ---------------- */
/* padding-top 20 is load-bearing: the DOM playhead dot is anchored a fixed
   distance from the scrub top; overflow clips the dot's full-width fill */

:is(#main-feed-shell#main-feed-shell, #detail-feed-shell#detail-feed-shell) .sp-card-int-scrub {
  flex: 1 1 auto !important;
  min-width: 0;
  padding-top: 20px !important;
  overflow: hidden;
}

:is(#main-feed-shell#main-feed-shell, #detail-feed-shell#detail-feed-shell) .sp-card-int-scrub .mantine-RangeSlider-root {
  padding-inline: 0 !important;
}

:is(#main-feed-shell#main-feed-shell, #detail-feed-shell#detail-feed-shell) .sp-card-int-scrub .mantine-RangeSlider-trackContainer {
  padding-inline: 0 !important;
  margin-inline: 0 !important;
}

:is(#main-feed-shell#main-feed-shell, #detail-feed-shell#detail-feed-shell) .sp-card-int-scrub .mantine-RangeSlider-track {
  margin-inline: 0 !important;
  height: 6px !important;
}

:is(#main-feed-shell#main-feed-shell, #detail-feed-shell#detail-feed-shell) .sp-card-int-scrub .mantine-RangeSlider-track::before {
  background: var(--sp-chip) !important;
  border-radius: 999px;
  inset-inline: 0 !important;
}

/* filled range bar hidden — the orange playhead fill carries the position */
:is(#main-feed-shell#main-feed-shell, #detail-feed-shell#detail-feed-shell) .sp-card-int-scrub .mantine-RangeSlider-bar {
  display: none !important;
}

/* trim handles: thin cream strips, EDGE-anchored (explore geometry) */
:is(#main-feed-shell#main-feed-shell, #detail-feed-shell#detail-feed-shell) .sp-card-int-scrub .mantine-RangeSlider-thumb {
  width: 4px !important;
  height: 16px !important;
  border: 0 !important;
  border-radius: 2px !important;
  background: var(--sp-text) !important;
  box-shadow: none !important;
  transform: translate(0, -50%) !important;
}

:is(#main-feed-shell#main-feed-shell, #detail-feed-shell#detail-feed-shell) .sp-card-int-scrub .mantine-RangeSlider-thumb + .mantine-RangeSlider-thumb {
  transform: translate(-100%, -50%) !important;
}

/* end labels hidden (the info row shows the position) */
:is(#main-feed-shell#main-feed-shell, #detail-feed-shell#detail-feed-shell) .sp-card-int-scrub-ends {
  display: none !important;
}

/* ---- playhead: orange knob + CSS-only progress fill ------------------------ */

:is(#main-feed-shell#main-feed-shell, #detail-feed-shell#detail-feed-shell) .sp-card-int-playhead-dot {
  position: relative;
  z-index: 0;
  width: 14px !important;
  height: 14px !important;
  background: var(--sp-accent) !important;
  border: 2px solid var(--sp-bg) !important;
  box-shadow: none !important;
}

:is(#main-feed-shell#main-feed-shell, #detail-feed-shell#detail-feed-shell) .sp-card-int-playhead-dot::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 50%;
  transform: translateY(-50%);
  width: 200vw;
  height: 6px;
  border-radius: 999px;
  background: var(--sp-accent);
  z-index: -1;
}

/* value chip replaced by the info row (visibility keeps the dot on the rail
   line — display:none would lift it) */
:is(#main-feed-shell#main-feed-shell, #detail-feed-shell#detail-feed-shell) .sp-card-int-playhead-chip {
  visibility: hidden !important;
}

/* ---- frame label + percent readout ----------------------------------------
   Upserted by the transport-info clientside callback (pages/feed/page.py)
   into the scrub's top padding zone; absolute so the slider (and the
   top-anchored playhead dot) never move. */

:is(#main-feed-shell#main-feed-shell, #detail-feed-shell#detail-feed-shell) .cmp-transport-info {
  position: absolute;
  top: 0;
  left: 2px;
  right: 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 11px;
  line-height: 1;
  color: var(--sp-text-2);
  pointer-events: none;
  z-index: 2;
}

:is(#main-feed-shell#main-feed-shell, #detail-feed-shell#detail-feed-shell) .cmp-transport-info b {
  font-weight: 700;
  color: var(--sp-text);
}

:is(#main-feed-shell#main-feed-shell, #detail-feed-shell#detail-feed-shell) .cmp-transport-pct {
  color: var(--sp-accent);
  font-weight: 700;
}
