/* Polish pass (audit «Вигляд і зручність»): steady numbers, skeletons, risk summary, screener options, chip tooltips.
   Loaded right before glass.css. Spacing uses the 4 / 8 / 12 / 16 scale (--s1..--s4). */

/* ---------- numbers that change never jump: tabular digits (a `font:` shorthand elsewhere resets them to proportional) */
#hdrPrice, #hdrChange, #hdrBalance, .price, .daily-change, .balance b, .acct b,
.watch td, .screener-table td, #posBody td, #histBody td,
.ob-row, .ob-px, .ob-qty, .ob-mid,
.sd-price, .sd-change, .sd-range, .sd-grid, .sd-prow b,
.ind-leg-sym, .ind-leg-v, .ind-leg-p, .dw-row b, .dw-ind-vals,
.tf-num, .rd-grid, .risk-desk output, .toast {
  font-variant-numeric: tabular-nums;
}

/* ---------- skeletons: shimmer only for people who did not ask for less motion */
.skel-row td { padding-top: var(--s2); padding-bottom: var(--s2); }
.skel-row .skeleton-text { display: block; height: 10px; }
.sd-bar.skeleton { height: 6px; }
/* the pairs list draws its placeholder rows in terminal.css (#watchWrap:has(#watchBody:empty)) */
@media (prefers-reduced-motion: reduce) {
  .skeleton, #watchWrap:has(#watchBody:empty) { animation: none; }
}

/* ---------- risk calculator summary (js/riskDesk.js): TP / SL / liquidation, R:R, risk in USDT and in % of the balance */
.risk-desk output { white-space: normal; font: 12px/1.5 var(--sans); }
.rd-grid { display: grid; grid-template-columns: auto 1fr; gap: var(--s1) var(--s3); padding: var(--s2) var(--s3); border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--panel2); }
.rd-k { color: var(--muted); }
.rd-v { justify-self: end; font: 600 12px/1.5 var(--mono); font-variant-numeric: tabular-nums; color: var(--text); }
.rd-v.up { color: var(--long, var(--green)); }
.rd-v.down { color: var(--short, var(--red)); }
.rd-v.warn { color: var(--warning); }
.rd-warn { margin: var(--s2) 0 0; color: var(--warning); font-size: var(--fs-2xs, 11px); }

/* ---------- screener options */
#screenerPanel .scr-nl { gap: var(--s2); }
.scr-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.scr-opt { display: inline-flex; align-items: center; gap: var(--s2); color: var(--muted); cursor: pointer; }
.scr-opt input { margin: 0; }
.screener-filters .scr-opt { align-self: end; flex-direction: row; }

/* ---------- chip tooltips (HH, plan): also on keyboard focus; hidden while the chip's own popover is open */
[data-tip-pos="left"]:focus-visible::after { left: auto; right: calc(100% + 6px); top: 50%; transform: translateY(-50%); }
.hh-chip[aria-expanded="true"]::after { display: none !important; }

/* ---------- indicator legend: MA 5 / 10 / 30 / 60 one line each, label tinted like its line (js/indicators/legend.js) */
.ind-leg-row.is-lines { align-items: flex-start; }
.ind-leg-row.is-lines .ind-leg-title { display: flex; flex-direction: column; }
.ind-leg-line { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.45; }
