/* The chart focus and the whole terminal's full screen (focus.js, fstrip.js), ported from the terminal online
   (pro-screen.css) in the v5 look: on a phone on its side the chart covers the window under the account's line and
   above the quick order strip, the chart's bar stays (a computer: the right column of fcol.css, lot G2c). Nothing
   moves in: the layer is drawn at once (the chart is laid out and resized once), no animation. On a phone held upright the chart takes the whole screen (safe areas kept), Sell and Buy above the home
   bar; on its side the phone takes the desk's layer, in one compact row. Tokens only; hover only where a pointer hovers. */

/* ---- the keys: the chart's (end of its bar) and the whole screen's (top bar) ---- */
.ct-focus { margin-inline-start: auto; }
.ct-focus[aria-pressed="true"], #screenBtn[aria-pressed="true"] { color: var(--acc); }
.term[data-form="phone"] #screenBtn { display: none; }        /* a phone's full screen is the chart's (the focus) */

/* ---- the layer: computer (and a phone on its side) ---- */
.fstrip { display: none; }
.term[data-form="desk"][data-focus="1"] { grid-template-rows: minmax(0, 1fr); grid-template-areas: "main"; }
.term[data-form="desk"][data-focus="1"] > :is(.tbar, .banners, .sbar, .visitbar) { display: none; }   /* a computer's banners live in its status bar */
.term[data-form="desk"][data-focus="1"] .tgrid { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas: "acct" "chart"; }
.term[data-form="desk"][data-focus="1"] :is(.bookp, .botp, .ticketp) { display: none; }
.term[data-form="desk"][data-focus="1"] .side { display: contents; }
.term[data-form="desk"][data-focus="1"] .gaugep { grid-area: acct; }
body[data-visitor="true"] .term[data-form="desk"][data-focus="1"]:not([data-frail="1"]):not([data-ftk="1"]) .tgrid { grid-template-rows: minmax(0, 1fr); grid-template-areas: "chart"; }
body[data-visitor="true"] .term[data-focus="1"]:not([data-ftk="1"]) .gaugep { display: none; }   /* the showcase's column: its example */
.term[data-focus="1"] .marketsp { top: auto; bottom: calc(var(--fs-h, 0px) + 12px); }   /* the market list opens above its key */
/* the toasts above the strip, clear of the price scale, the last one only (as in the positions panel's tab row) */
.term[data-form="desk"][data-focus="1"] > .toasts { right: 80px; bottom: calc(var(--fs-h, 0px) + 40px); }
.term[data-form="desk"][data-focus="1"] > .toasts .toast:not(:last-child) { display: none; }

/* the account's line: the band of a short screen (fit.css), on every computer screen while the chart has the focus */
.term[data-form="desk"][data-focus="1"] .gaugep { container-type: inline-size; flex-direction: row; align-items: center; gap: 16px; padding: 7px 14px; }
.term[data-form="desk"][data-focus="1"] .g-head { display: none; }
.term[data-form="desk"][data-focus="1"] .g-eq { order: 1; flex: none; display: grid; gap: 1px; }
.term[data-form="desk"][data-focus="1"] .g-eqv { font-size: 17px; line-height: 1.15; }
.term[data-form="desk"][data-focus="1"] .g-day { font-size: 11px; }
.term[data-form="desk"][data-focus="1"] .g-scale { display: contents; }
.term[data-form="desk"][data-focus="1"] .g-scale span { position: static; order: 2; flex: none; transform: none; text-align: left; }
.term[data-form="desk"][data-focus="1"] .g-scale .s-m { display: none; }
.term[data-form="desk"][data-focus="1"] .g-scale .s-r { order: 4; }
.term[data-form="desk"][data-focus="1"] .g-scale .s-r b { color: var(--acc); }
.term[data-form="desk"][data-focus="1"] .g-track { order: 3; flex: 1 1 96px; min-width: 96px; height: 22px; }
.term[data-form="desk"][data-focus="1"] :is(.g-rail, .g-fill) { top: 10px; }
.term[data-form="desk"][data-focus="1"] :is(.g-limit, .g-goalline) { top: 1px; height: 20px; }
.term[data-form="desk"][data-focus="1"] .g-start { top: 5px; }
.term[data-form="desk"][data-focus="1"] .g-mark { top: 4px; }
.term[data-form="desk"][data-focus="1"] .g-rows { order: 5; flex: none; display: flex; gap: 16px; padding: 0 0 0 16px; border-top: 0; border-left: 1px solid var(--hair); }
.term[data-form="desk"][data-focus="1"] .g-rows div { grid-template-columns: minmax(84px, auto); gap: 2px; align-content: start; }
.term[data-form="desk"][data-focus="1"] .g-rows dt { font-size: 11px; color: var(--dim); white-space: nowrap; }
.term[data-form="desk"][data-focus="1"] .g-rows dd { font-size: 12.5px; white-space: nowrap; }
.term[data-form="desk"][data-focus="1"] .g-rows .g-bar { grid-column: auto; }
@container (max-width: 820px) { .term[data-form="desk"][data-focus="1"] .g-rows div:last-child { display: none; } }
@container (max-width: 640px) { .term[data-form="desk"][data-focus="1"] .g-scale span { display: none; } }
@container (max-width: 470px) { .term[data-form="desk"][data-focus="1"] .g-track { display: none; } }

/* ---- the quick order strip, under the chart ---- */
.term[data-focus="1"] .fstrip { display: grid; gap: 5px; flex: none; padding: 8px 10px 7px; border-top: 1px solid var(--hair); background: var(--surface); }
.fs-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.fs-sym { flex: none; gap: 6px; padding: 0 8px 0 10px; }
.fs-sym b { color: var(--text); font-size: 13px; font-weight: 700; }
.fs-sym .i { width: 12px; height: 12px; color: var(--dim); }
.fs-quote { display: flex; align-items: center; gap: 6px; flex: none; }
.fs-side { flex-direction: column; gap: 2px; min-width: 128px; min-height: 40px; padding: 0 14px; line-height: 1.1; }
.fs-word { font-size: 12.5px; }
.fs-pxv { font-size: 11.5px; font-weight: 600; opacity: 0.92; }
.fs-spread { min-width: 44px; color: var(--dim); font-size: 11px; text-align: center; }
.fs-field { flex: 0 1 150px; min-width: 96px; min-height: 36px; }
.fs-field input { height: 34px; min-width: 0; }
.fs-type { flex: none; }
.fs-full { flex: none; margin-inline-start: auto; }
.fs-foot { display: flex; align-items: baseline; gap: 16px; min-width: 0; min-height: 16px; font-size: 11.5px; line-height: 16px; }
.fs-info { flex: 0 1 auto; min-width: 0; margin: 0; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fs-msg { flex: 1 1 40%; min-width: 0; margin: 0; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fs-msg[data-tone="warn"] { color: var(--warn); }
.fs-msg[data-tone="down"] { color: var(--down); }
.fs-msg, .fs-info { unicode-bidi: plaintext; }

/* ---- lot G2a: the whole ticket docked beside the chart (a computer), as NinjaTrader's Chart Trader; lot G2c moved the
   chart's bar and the account into its column, and a rail when it is hidden: fcol.css. The keys' own looks: ---- */
.ct-sym { flex: none; gap: 6px; padding: 0 8px 0 6px; }
.ct-sym b { color: var(--text); font-size: 13px; font-weight: 700; }
.ct-sym .i { width: 12px; height: 12px; color: var(--dim); }
.ct-ftk[aria-pressed="true"] { background: var(--surface-4); box-shadow: inset 0 0 0 1px var(--hair-3); }
/* no text under 11 px in the focus (the legend's letters, the counters, the account line's scale) */
.term[data-form="desk"][data-focus="1"] :is(.lg-ok, .lg-code, .lg-n, .ctool-n, .g-scale span, .tk-sum dd small) { font-size: 11px; }

/* ---- a phone on its side (the desk's layer): one compact row, the notch and the rounded corners kept clear ---- */
@media (max-height: 500px) {
  .term[data-form="desk"][data-focus="1"] .tgrid { gap: 4px; padding: 4px max(4px, env(safe-area-inset-right, 0px)) 0 max(4px, env(safe-area-inset-left, 0px)); }
  .term[data-form="desk"][data-focus="1"] .gaugep { padding-block: 4px; }
  .term[data-focus="1"] .fstrip { gap: 3px; padding: 5px 8px max(5px, env(safe-area-inset-bottom, 0px)); }
  .term[data-focus="1"] .fs-sym { display: none; }
  .fs-row { gap: 6px; }
  .fs-side { min-width: 96px; min-height: 36px; padding: 0 10px; }
  .fs-field { flex-basis: 120px; min-width: 84px; min-height: 34px; }
  .fs-field input { height: 32px; }
}

/* ---- a phone held upright: the chart over the whole screen, Buy and Sell above the home bar ---- */
/* "pkeys": the site frame's locked Sell / Buy keys stay under the chart, whole width (without that row the grid made them
   a column of their own and the chart took half the screen: founder 2026-11-17, Android Chrome); empty elsewhere */
.term[data-form="phone"][data-focus="1"] { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; grid-template-areas: "strip" "main" "pkeys";
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px); }
.term[data-form="phone"][data-focus="1"] > :is(.tbar, .pkeys, .ptabs, .visitbar) { display: none; }
.term[data-form="phone"][data-focus="1"] .fstrip { position: relative; padding: 8px 10px max(8px, env(safe-area-inset-bottom, 0px)); }
.term[data-form="phone"] :is(.fs-sym, .fs-spread, .fs-field, .fs-type, .fs-full, .fs-info) { display: none; }
.term[data-form="phone"] .fs-quote { flex: 1 1 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.term[data-form="phone"] .fs-quote .key-buy { order: -1; }                /* as the phone's order keys */
.term[data-form="phone"] .fs-side { min-width: 0; min-height: 50px; }
.term[data-form="phone"] .fs-word { font-size: 14px; }
.term[data-form="phone"] .fs-x { width: 44px; min-height: 50px; }
/* the strip's line rises over the chart's foot, a pill, only when it has something to say */
.term[data-form="phone"] .fs-foot { position: absolute; left: 10px; right: 10px; bottom: 100%; justify-content: center; margin-bottom: 8px; pointer-events: none; }
.term[data-form="phone"] .fs-msg { flex: 0 1 auto; padding: 6px 10px; border-radius: var(--r-sm); background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--hair-3);
  font-size: 12px; line-height: 1.35; text-align: center; white-space: normal; }
.term[data-form="phone"] .fs-msg:empty { display: none; }
/* the account's line opens the account tab: that leaves the focus (focus.js) */

/* the chart's focus key on a phone: no room left in the chart's bar, it sits at the chart's foot on the left, over the
   time axis's corner of the candles, a touch key with its own ground */
.term[data-form="phone"] .ct-focus { position: absolute; z-index: 5; inset-inline-start: 8px; bottom: calc(var(--fs-h, 0px) + 34px); width: 44px;
  margin: 0; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--hair-2), 0 6px 14px -8px rgba(0, 0, 0, 0.7); }
.fstrip:empty { display: none !important; }                      /* no account: no strip (a visitor's chart stands alone) */
