/* The states the mock-up did not draw, on real data: a figure loading or missing, an action pending, done or refused,
   a book waiting or unavailable, a field switched off, the server's P&L tone. Tokens only; hover only where a pointer
   hovers; never italic. Loaded after phone.css. */

/* the terminal never scrolls, not even by a focus on a sheet that is still rising from under it */
.term { overflow: clip; }

/* wrappers that keep the mock-up's layout: their children lay out as the plate's own */
.hud, .tk-live { display: contents; }

/* ---- live tones (data-tone, not the mock-up's up / down classes) ---- */
[data-tone="up"].num, .tbl td[data-tone="up"], .g-day[data-tone="up"], .st-day[data-tone="up"], .tr-row [data-tone="up"] { color: var(--up); }
[data-tone="down"].num, .tbl td[data-tone="down"], .g-day[data-tone="down"], .st-day[data-tone="down"], .tr-row [data-tone="down"] { color: var(--down); }

/* ---- an action on a key, a field or a row: pending, done (for a moment), refused ---- */
[data-act="pending"] { cursor: progress; }
.key[data-act="pending"] { opacity: 0.6; }
.key[data-act="done"] { box-shadow: inset 0 0 0 1px var(--acc), 0 1px 0 var(--key-edge); color: var(--text); }
.key[data-act="refused"] { box-shadow: inset 0 0 0 1px var(--down), 0 1px 0 var(--key-edge); color: var(--down); }
.field[data-act="pending"] { box-shadow: inset 0 0 0 1px var(--hair-3); opacity: 0.7; }
.field[data-act="done"] { box-shadow: inset 0 0 0 1px var(--acc); }
.field[data-act="refused"] { box-shadow: inset 0 0 0 1px var(--down); }
.key[aria-busy="true"] { cursor: progress; }

/* ---- the gauge ---- */
.g-goal { display: inline-flex; gap: 0.3em; }
.g-head { min-width: 0; }
.g-prog { overflow: hidden; text-overflow: ellipsis; }

/* ---- the ticket ---- */
span.tk-lev { cursor: default; box-shadow: none; background: none; color: var(--dim); font-size: 11px; padding: 0 2px; min-height: 0; }
/* a row too short for the order types and the whole leverage sentence (three types, a long word): the word leaves
   whole, onto a second line the box clips, and the figure stays at the row's end; the name read aloud keeps both */
.tk-lev { flex: 0 1 auto; min-width: 0; }
.tk-lev-in { flex: 0 1 auto; min-width: 0; display: flex; flex-flow: row-reverse wrap; align-content: flex-start; column-gap: 1ch; height: 1.5em; line-height: 1.5em; overflow: hidden; overflow: clip; white-space: nowrap; }
.tk-lev-in > * { flex: none; }
.tk-lev-w { order: 1; }
.tk-row > .tk-hint { flex: 1 1 auto; min-width: 0; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.field[data-off="1"] { opacity: 0.45; }
.field input:disabled { cursor: not-allowed; }
.tk-notes { color: var(--text); }
.tk-check[data-state="warn"] .tk-notes { color: var(--warn); }
.tk-check b:empty { display: none; }
.tk-go[data-armed="1"] { box-shadow: inset 0 0 0 2px var(--warn), 0 1px 0 var(--key-edge); }
.ticketp .tk-msg { flex: none; margin-top: -2px; font-size: 11.5px; }

/* ---- the book's states ---- */
.book { position: relative; }
.bk-state { display: none; }
.book > .bk-head { order: 0; }
.book > .bk-side[data-side="a"], .book > .bk-state { order: 1; }
.book > .bk-mid { order: 2; }
.book > .bk-side[data-side="b"] { order: 3; }
/* not live: the words take the asks' place, the price line stays in the middle */
.book:not([data-state="live"]) > .bk-side[data-side="a"] { display: none; }
.book:not([data-state="live"]) > .bk-state:not(:empty) { flex: 1 1 0; min-height: 0; display: grid; place-items: center; padding: 12px 18px; color: var(--mute);
  font-size: 12px; line-height: 1.5; text-align: center; }
.book[data-state="waiting"] > .bk-state { animation: pstate-breathe 1.6s var(--ease) infinite alternate; }
.book:not([data-state="live"]) .bk-mid { color: var(--dim); }
.book:not([data-state="live"]) > .ld-foot ~ .bk-state:not(:empty) { order: 3; flex: none; padding: 6px 12px; border-top: 1px solid var(--hair); }
div.bk-row { cursor: default; }
.bk-row:focus-visible, .mk-row:focus-visible, .tbl td[data-sym]:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.tr-row[hidden] { display: none; }

/* ---- the bottom panel ---- */
.tbl td.leg { padding-right: 6px; }
.tbl .mini input::placeholder { color: var(--dim); }
.tbl .acts .part { min-width: 44px; }
.term[data-form="phone"] .tbl th, .term[data-form="phone"] .tbl td { padding: 0 6px; }
.term[data-form="phone"] .tbl th:first-child, .term[data-form="phone"] .tbl td:first-child { padding-left: 12px; }
.log li[data-tone="down"] span { color: var(--down); }
.tab .n:empty { display: none; }

/* ---- the market picker ---- */
.mk-star-i { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.mk-star[data-on="1"] .mk-star-i { fill: currentColor; }
.mk-star { border: 0; background: none; padding: 0; cursor: pointer; }
.mk-star:focus-visible { outline: 2px solid var(--focus); outline-offset: -4px; }
.mk-row .r[data-paused="1"] { color: var(--warn); font-family: var(--font-ui); font-size: 11px; }
.mk-row[aria-selected="true"] .sym { color: var(--acc); }

@media (hover: hover) {
  .mk-star:hover { color: var(--text); }
  .tbl td[data-sym]:hover { color: var(--acc); }
  div.bk-row:hover { background: none; color: var(--mute); }
}
@media (prefers-reduced-motion: reduce) {
  .book[data-state="waiting"] > .bk-state { animation: none; }
}
