/* console: tape round (Nov 4) */
/* Live trades tape: column header + empty states. Loaded after console.css; light overrides at the bottom
   beat light.css (which loads later) by specificity. */

/* rows never stretch: with only the header visible the grid used to blow it up into a tall black slab */
.cx .cx-tape { align-content: start; grid-auto-rows: max-content; }

/* column header: same treatment as the console's other table headers (muted 11px labels, hairline under,
   subtle frosted fill so rows scrolling beneath stay readable). It shares .tp-r's grid, so columns line up. */
.cx .cx-tape .tp-r.tp-h {
  position: sticky; top: 0; z-index: 2;
  min-height: 28px; padding-top: 0; padding-bottom: 0;
  font: 500 11px/1 var(--f); letter-spacing: 0; text-transform: none; color: var(--tx3);
  background: rgba(22,27,35,.55) !important;
  -webkit-backdrop-filter: blur(14px) saturate(1.1); backdrop-filter: blur(14px) saturate(1.1);
  border: 0; border-radius: 8px 8px 0 0;
  box-shadow: inset 0 -1px 0 rgba(201,220,242,.08);
  margin-bottom: 2px;
}
.cx .cx-tape .tp-r.tp-h > * { color: inherit; font-weight: 500; }
.cx .cx-tape .tp-r.tp-h:hover { background: rgba(22,27,35,.55) !important; }
/* track column: header and row both centre on the 20px cell */
.cx .cx-tape .tp-r > :last-child { justify-self: center; }
/* six visible columns (Amount stays hidden): Total and Trader share the slack so small totals never run into chips */
.cx .cx-tape .tp-r { grid-template-columns: 28px 30px 54px minmax(84px, 1fr) minmax(0, 1.1fr) 20px; }
/* narrow docks (beside the chart at <1400px, about 300px): MC hides, so the grid drops to five columns. console.css
   re-declares the six-column grid after its own narrow rule, which left Total in the 52px MC slot overlapping Trader. */
@container (max-width: 330px) {
  .cx .cx-tape .tp-r { grid-template-columns: 26px 30px minmax(78px, 1fr) minmax(0, 1.2fr) 20px; gap: 6px; }
  .cx .cx-tape .tp-r > :nth-child(3) { display: none; }
}
/* one row of breathing room above the header so it does not butt into the panel header */
.cx .cx-tape { padding-top: 4px; }

/* empty states: the tape (and its column header) hides, a centred note fills the frosted panel */
.cx .cx-tape:has(~ .cx-tape-empty:not([hidden])) { display: none; }
.cx .cx-tape-empty:not([hidden]) {
  flex: 1; min-height: 160px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 24px 20px 32px; text-align: center; background: none;
}
.cx .cx-tape-empty .cx-te-ic {
  display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 4px; border-radius: 10px;
  color: var(--ac-ice, #dfe9f5); background: rgba(201,220,242,.06); box-shadow: inset 0 0 0 1px rgba(201,220,242,.1);
}
.cx .cx-tape-empty b { color: var(--tx); font-weight: 600; font-size: 13px; }
.cx .cx-tape-empty > span { max-width: 270px; text-wrap: balance; font-size: 12px; line-height: 1.45; color: var(--tx3); }
.cx .cx-tape-empty .cx-te-add { margin-top: 8px; display: inline-flex; align-items: center; gap: 6px; }

/* Live trades panel header in a bottom tab bar (split view): when the dock is narrow, the All / Others / Dev / Tracked
   filter drops to its own full-width row so ETH | USD and the split button never get pushed off the edge */
@container (max-width: 560px) {
  .cx-dock.s-trades > .cx-tabbar { flex-wrap: wrap; row-gap: 9px; column-gap: 4px; padding-top: 4px; padding-bottom: 8px; overflow: visible; }
  .cx-dock.s-trades > .cx-tabbar .cx-tff { order: 9; flex: 1 1 100%; display: flex; }
  .cx-dock.s-trades > .cx-tabbar .cx-tff button { flex: 1; padding: 0 4px; }
}

/* tracked manager: hang it from the panel header's right edge (not the small button) so it never runs past the
   panel's left edge in a narrow dock, and sits below the filter row when that row wraps */
.cx-dock.s-trades > :is(.cx-zh, .cx-tabbar) { position: relative; }
.cx-dock.s-trades > .cx-tabbar:has(.cx-trkm.on) { overflow: visible; }
.cx-dock.s-trades > :is(.cx-zh, .cx-tabbar) .cx-trkw { position: static; }
.cx-dock.s-trades > :is(.cx-zh, .cx-tabbar) .cx-trkm { top: calc(100% + 4px); right: 8px; width: min(300px, calc(100% - 16px)); }

/* light theme */
html:root:root:root[data-theme="light"] .cx .cx-tape .tp-r.tp-h,
html:root:root:root[data-theme="light"] .cx .cx-tape .tp-r.tp-h:hover { background: rgba(246,248,252,.72) !important; box-shadow: inset 0 -1px 0 rgba(20,40,70,.09); }
html:root:root:root[data-theme="light"] .cx .cx-tape-empty .cx-te-ic { color: var(--ac); background: color-mix(in srgb, var(--ac) 8%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ac) 16%, transparent); }
