/* Crosshair line-dot — a small marker that rides each graph line under
   the cursor. Centered on its point via negative margins; transform
   carries the position (GPU-composited, no layout work per move). */
.line-dot{
  position:absolute;left:0;top:0;width:8px;height:8px;
  margin:-4px 0 0 -4px;border-radius:50%;
  /* Colored center (series color, set inline) + a chart-bg gap ring to
     lift it off the line, then a crisp contrast ring so the marker reads
     clearly in BOTH themes (--text-primary flips dark↔light with theme). */
  box-shadow:
    0 0 0 1.5px var(--chart-bg),
    0 0 0 3px color-mix(in srgb, var(--text-primary) 55%, transparent);
  pointer-events:none;z-index:5;
  opacity:0;transition:opacity .12s ease;
  will-change:transform;
}
.line-dot.on{opacity:1;}

/* TradingView-style sync hairline: one vertical line repeated through
   every pane at the hover x, so the stack reads as ONE instrument.
   Transform-only updates — compositor work, zero canvas repaints. */
.sync-hairline{
  position:absolute;left:0;top:0;bottom:0;width:1px;
  background:color-mix(in srgb, var(--accent) 30%, transparent);
  pointer-events:none;z-index:4;
  opacity:0;will-change:transform;
}
.sync-hairline.on{opacity:1;}

/* Last-value edge chip — DOM value pill pinned to the pane's right
   gutter. DOM so it survives GestureX freezing the pane canvases: the
   bitmap slides under its transform while the chip stays pinned and its
   value/y recompute per frame (EdgeTags). transform carries y —
   compositor-only moves; background is set inline per series
   (series colour mixed 78% into --bg-primary, same recipe as the
   candle countdown so every moving value reads as ONE chip family). */
.edge-tag{
  /* TradingView-style axis chip — spans the FULL axis column (same
     geometry as .candle-countdown): right:0, width = --pane-axis-w,
     centered mono 600 10px on a filled 15px pill. */
  position:absolute;top:0;right:0;
  width:var(--pane-axis-w, 3.75rem);
  height:15px;line-height:15px;box-sizing:border-box;
  padding:0 2px;text-align:center;border:none;border-radius:3px;
  color:var(--on-accent);
  font:600 10px 'IBM Plex Mono','SF Mono',ui-monospace,monospace;
  letter-spacing:.02em;white-space:nowrap;pointer-events:none;z-index:6;
  opacity:0;will-change:transform;
}
.edge-tag.on{opacity:1;}
/* The price chart's last-price chip: the BRIGHT top half of the fused
   price+countdown block — full-strength green/red fill (set in JS),
   square bottom corners so the darker countdown fuses directly under. */
.edge-tag.price-tag{border-radius:3px 3px 0 0;z-index:7;}

/* Fixed right-axis for the custom-canvas panes — mirrors LWC's price
   scale so the plot/numbers boundary looks AND behaves like the price
   chart. A sibling of the pane canvas (not inside it), so it stays put
   while GestureX transforms the canvas mid-gesture. left+top+background
   are set per-render in JS (paneAxis); the opaque fill masks any data the
   frozen bitmap slides into the axis column. z below the edge chips (6)
   and starts below the header, so it never covers a pane's toggle button. */
/* Pane crosshair — the horizontal half of the crosshair when hovering a
   sub-pane, mirroring LWC's on the price chart: a hairline at cursor y
   (color set in JS = the price crosshair's horzLine) + a moving value
   pill on the pane axis (LWC's default crosshair label, --crosshair-label/white,
   same text-sized geometry as .edge-tag). transform-only updates. */
.cross-hline{position:absolute;left:0;top:0;height:1px;
  width:calc(100% - var(--pane-axis-w,44px));
  pointer-events:none;z-index:4;opacity:0;will-change:transform;}
.cross-hline.on{opacity:1;}
.cross-tag{position:absolute;top:0;
  left:var(--pane-sep-x, calc(100% - var(--pane-axis-w,44px)));
  height:15px;line-height:15px;box-sizing:border-box;
  border-radius:0 2px 2px 0;   /* = LWC crosshair label corners */
  padding:0 5px 0 10px;background:var(--crosshair-label);color:var(--on-accent-bright);
  font:400 10px 'JetBrains Mono','IBM Plex Mono','SF Mono',ui-monospace,monospace;
  white-space:nowrap;pointer-events:none;z-index:7;opacity:0;will-change:transform;}
.cross-tag.on{opacity:1;}

.pane-axis{position:absolute;top:0;right:0;bottom:0;z-index:3;pointer-events:none;}
.pane-axis .pa-sep{position:absolute;left:0;top:0;bottom:0;width:1px;}
/* Same font the LWC price scale uses (layout.fontFamily / 10 / muted) so
   the pane numbers read identically to the price numbers. */
/* Left-aligned at separator + 10px — the exact inset LWC gives its
   price-scale labels (pixel-measured; a shorter label shares the LEFT
   edge, so LWC left-aligns), putting pane numbers in the same column. */
.pane-axis .pa-n{position:absolute;left:10px;right:auto;transform:translateY(-50%);
  font:400 10px 'JetBrains Mono','IBM Plex Mono','SF Mono',ui-monospace,monospace;white-space:nowrap;}

/* Next-candle countdown — an accent pill pinned to the price pane's right
   edge at the live candle's close, counting down to bar close (TradingView
   "Countdown to Bar Close"). Sits in the price-scale gutter under the
   last-price label; JS (CandleCountdown) drives translateY + .on. */
.candle-countdown{
  /* TradingView-style: fused directly under the last-price axis label,
     spanning the SAME axis column (width = --pane-axis-w, synced in JS),
     centered, in a slightly darker accent so the pair reads as one block:
     price on top, countdown beneath, one vertical axis. */
  position:absolute;top:0;right:0;z-index:7;
  width:var(--pane-axis-w, 3.75rem);text-align:center;
  height:15px;line-height:15px;box-sizing:border-box;
  padding:0 2px;border-radius:0 0 3px 3px;
  /* Follows the last-price label's candle color (JS toggles .dn), slightly
     darkened so the label stays the brighter half of the fused pair. */
  background:color-mix(in srgb, var(--green) 78%, var(--bg-primary));
  color:var(--on-accent);
  font:600 10px 'IBM Plex Mono','SF Mono',ui-monospace,monospace;
  letter-spacing:.02em;white-space:nowrap;pointer-events:none;
  opacity:0;transition:opacity .18s ease;will-change:transform;
}
.candle-countdown.on{opacity:1;}
.candle-countdown.dn{background:color-mix(in srgb, var(--red) 78%, var(--bg-primary));}
/* Price axis number mask (edge-tags.js AxisTickMask): covers exactly one
   axis number that a chip cuts, in the axis canvas's own sampled colour,
   under the chips (6/7), so the number hides whole. Never shown otherwise. */
.axis-tick-mask{position:absolute;z-index:5;pointer-events:none;display:none;}

/* ── Oscillator panes (top of the graph stack, below the Modify-graphs
   toolbar) ──────────────────────────────────────────────────────────── */
/* flex:0 0 auto — content-sized, never shrinks; the wrapper scrolls
   instead, matching the fixed .cp graph panels. */
#indicatorPanes { display: flex; flex-direction: column; flex: 0 0 auto; gap: 0; }
/* The top border is each pane's ONLY separator — --border-pane is
   bright enough that stacked graphs read as clearly distinct without
   a label-strip box. */
/* Pane height rides the viewport HEIGHT (not rem: the fluid root font
   tracks viewport WIDTH) so the price:pane ratio holds on small screens
   instead of the flex-remainder price pane absorbing every lost pixel.
   22.5vh ≈ the 27-inch look (304px at 1340px innerHeight). */
/* Each oscillator pane sits flush in the one chart panel (owner
   2026-10-17, TradingView), like the sentiment/tape panes in .charts-scroll:
   same surface, no gap, radius, ring or shadow; a 1px top hairline is the
   only seam between two panes (::after, above the pane's canvases, under
   its label and axis chips). */
.indicator-pane {
  position: relative; height: max(7.5rem, 22.5vh); overflow: hidden;
  background: var(--graph-card-bg);
  border-radius: 0;
  box-shadow: none;
}
.indicator-pane::after {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: var(--border-default); z-index: 3; pointer-events: none;
}
/* Label floats directly on the chart — no strip background. The teal
   accent + soft shadow keep it legible over grid lines + phase dots. */
.indicator-pane__label {
  position: absolute; top: 0; left: 0; height: 1.75rem; z-index: 5;
  display: flex; align-items: center;
  font-family: var(--font-sans);
  font-size: max(0.625rem, var(--fs-floor)); font-weight: 700; color: var(--text-secondary);
  text-transform:none; letter-spacing:normal;
  pointer-events: none;
  padding: 0 0.5rem 0 0.75rem;
  text-shadow: var(--chart-label-halo);
}
/* Live series values appended to the pane chip by the chart legend —
   mono digits in each series' color, exempt from the chip's caps. */
.indicator-pane__values {
  display: inline-flex; gap: 0.5rem; margin-left: 0.625rem;
  font-family: var(--font-mono); font-weight: 600;
  letter-spacing: 0; text-transform: none;
  font-variant-numeric: tabular-nums;
}
.indicator-pane__values b { font-weight: 600; }

/* ── Chart legend: OHLC + overlay values, top-left of the price pane,
   under the "PRICE" chip. Pointer-events off so the crosshair works
   through it; text-shadow keeps it legible over candles. ── */
.chart-legend {
  /* left clears Compare's left "%" axis when active (--cp-left-inset on .charts,
     0 otherwise) so the OHLC values never overlap the axis numbers. */
  position: absolute; top: 1.875rem; left: calc(0.75rem + var(--cp-left-inset, 0px)); z-index: 5;
  display: flex; flex-direction: column; gap: 0.125rem;
  pointer-events: none;
  font-family: var(--font-mono); font-size: max(0.625rem, var(--fs-floor)); font-weight: 600;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  text-shadow: var(--chart-label-halo);
}
.chart-legend .cl-row { display: inline-flex; align-items: baseline; gap: 0.4375rem; }
/* Hovered bar's date/time — leads the OHLC row. With the price chart's
   native date row hidden (shared axis lives on the bottom pane), this is
   the precise per-bar timestamp readout while hovering. */
.chart-legend .cl-time { color: var(--text-muted); font-weight: 500; }
.chart-legend i {
  font-style: normal; font-family: var(--font-sans);
  font-size: max(0.5625rem, var(--fs-floor)); font-weight: 700; color: var(--text-muted);
  letter-spacing: .04em;
}
.chart-legend b { font-weight: 600; }

