/* Cella007FX PRO panel-setup.css — panel v2 (11 Nov 2026): <TF> setup card (#w-setup); classes su2-*. Tokens only; shared kit in panel.css.
   Layout (widgets/setup.js build): TF switcher · status band · stop -> target rail · peek line · replay well (was "live record", 11 Nov 2026) · switches +
   alert state · alerting-TF chips · lot line · short disclaimer. The old .setup-* rules in app.css / mobile.css are no longer used by this card (left in place). */

#w-setup [hidden] { display: none !important; }   /* flex / grid rules below must never re-show a hidden part */

/* ---- header actions ------------------------------------------------------------------------------------------- */
#w-setup .su2-copy { min-height: 32px; padding: 2px 10px; border: 1px solid var(--line); border-radius: 6px; font-weight: 600; color: var(--text-0); }
#w-setup .su2-copy:hover { background: var(--bg-3); border-color: var(--text-2); }
#w-setup .lnk { color: var(--vz-ink-info); }

/* ---- 0. timeframe switcher (11 Nov 2026): kit segmented laid out as a grid of separate TILES, styled like the Trend
   card's heat tiles (.vz-tile in panel.css: own hairline border, --radius corners, --bg-3 fill, bold label, the chosen
   one = 2 px gold ring + gold label), so the two TF rows on the Setup tab read as one family. The tiles ARE the chart
   timeframe (a tap switches the chart; 11 Nov 2026 the separate "Chart" tile and its dashed is-shown outline went).
   Grid: M1 M5 M15 M30 / H1 H4 D1 (W1 left out of the card) — fits the 288 px sheet (320 px phone) and the 270 px
   desktop panel without a horizontal scroll; one row of seven from a 420 px wide panel.
   A gold dot in the top-right corner marks a TF whose Alert is on (.is-alert, setup.js syncAlertTfs). */
#w-setup .su2-tfs { min-width: 0; container-type: inline-size; }
#w-setup .su2-tfs .vz-segctl {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; width: 100%; box-sizing: border-box;
  padding: 0; border: 0; border-radius: 0; background: none;
}
#w-setup .su2-tfs .vz-segctl-b {
  position: relative; min-width: 0; min-height: 30px; padding: 0 2px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-3);
  font: 700 var(--vz-fs-sm)/1 var(--font-ui); letter-spacing: .04em; color: var(--text-1); font-variant-numeric: tabular-nums;
  -webkit-tap-highlight-color: transparent;
}
#w-setup .su2-tfs .vz-segctl-b:hover { border-color: var(--text-2); }
#w-setup .su2-tfs .vz-segctl-b[aria-checked="true"] { background: var(--bg-3); border-color: var(--gold); box-shadow: inset 0 0 0 2px var(--gold); color: var(--vz-ink-gold); }
#w-setup .su2-tfs .vz-segctl-b:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
#w-setup .su2-tfs .vz-segctl-b.is-alert::after,
#w-setup .su2-atfs > .vz-micro::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
#w-setup .su2-tfs .vz-segctl-b.is-alert::after { position: absolute; top: 3px; right: 3px; }
#w-setup .su2-atfs > .vz-micro::before { display: inline-block; margin-right: 4px; vertical-align: 1px; }   /* the same dot = the legend */
@container (min-width: 420px) {   /* a panel widened to 420 px or more: one row of seven */
  #w-setup .su2-tfs .vz-segctl { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}

/* ---- 1. status band ------------------------------------------------------------------------------------------- */
#w-setup .su2-band { display: flex; flex-direction: column; gap: 4px; border-left: 3px solid var(--vz-c, var(--line)); }
#w-setup .su2-band.vz-t-off { border-left-color: var(--line-ctl); }
/* 15 Nov 2026 (review UX10-4): on a 320 px phone and in the 300 px desktop panel 'WAITING · M15' and the 'no open
   trade' pill did not fit one row, so both were cut ('WAITING · …'). Neither shrinks now: when they do not fit side by
   side the pill drops to a second row (still at the right edge). The ellipsis stays as the last resort for one word
   wider than the card. */
#w-setup .su2-band-l1 { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; min-width: 0; min-height: 28px; }
#w-setup .su2-side { flex: 0 0 auto; min-width: 0; max-width: 100%; font: 800 var(--vz-fs-hero)/1.1 var(--font-ui); letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#w-setup .su2-band-l1 .vz-pill { margin-left: auto; flex: 0 0 auto; min-width: 0; max-width: 100%; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
#w-setup .su2-band-l2 { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
#w-setup .su2-headline { flex: 1 1 auto; font: 600 var(--vz-fs-body)/1.35 var(--font-ui); color: var(--text-0); }
#w-setup .su2-headline[data-peek] { cursor: pointer; }
#w-setup .su2-settings { flex: 0 0 auto; min-height: var(--vz-tap); padding: 0 2px; font-size: var(--vz-fs-sm); }
#w-setup .su2-tags { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
#w-setup .su2-last { display: inline-flex; min-width: 0; max-width: 100%; }
#w-setup .su2-band.su2-ping { animation: vzPing .6s ease-out 1; }
#w-setup .su2-back { align-self: flex-start; min-height: var(--vz-tap); padding: 0 2px; text-align: left; font-size: var(--vz-fs-sm); }   /* "Not chart TF · back to Chart" */

/* ---- 2. rail -------------------------------------------------------------------------------------------------- */
#w-setup .su2-rail { min-width: 0; }
#w-setup .su2-rail .vz-seg-l { font-size: var(--vz-fs-micro); }
#w-setup .su2-hit { margin: 2px 0 0; font: 600 var(--vz-fs-sm)/1.3 var(--font-ui); text-align: center; }
#w-setup .su2-skel .vz-skel { display: block; border-radius: var(--radius); }
/* group 5 (11 Nov 2026): "Late · skip" under the rail (L20) and the "Also open" row of older open trades (L17) */
#w-setup .su2-late { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2px 8px; margin-top: 4px; }
#w-setup .su2-late .vz-pill { font-weight: 700; cursor: pointer; }
#w-setup .su2-late-why { color: var(--text-2); text-align: center; text-transform: none; letter-spacing: normal; }   /* review UX5-9: the reason without a tap */
#w-setup .su2-more { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0; margin-top: 6px; padding-top: 4px; border-top: 1px dashed var(--line); }
#w-setup .su2-more .vz-pill { font-family: var(--font-mono); font-variant-numeric: tabular-nums; cursor: pointer; }
#w-setup .su2-more-x { color: var(--text-2); }
@media (max-width: 767px) { #w-setup .su2-late .vz-pill, #w-setup .su2-more .vz-pill { min-height: 28px; display: inline-flex; align-items: center; } }

/* ---- 4. replay (past signals on the loaded history; was "live record") ----------------------------------------- */
#w-setup .su2-record { display: flex; flex-direction: column; gap: 4px; }
#w-setup .su2-rec-main { display: flex; align-items: center; gap: 12px; min-width: 0; border-radius: var(--radius); }
#w-setup .su2-rec-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
#w-setup .su2-net { font: 800 var(--vz-fs-big)/1.05 var(--font-mono); font-variant-numeric: tabular-nums; }
/* review UX10-4: 'only 4 trades · 1 W · 3 L · 1 near news' is one nowrap line (vz-num) and lost its end on a phone
   ('… 3 L · 1 n'); it may take a second line */
#w-setup .su2-wl { font-size: var(--vz-fs-body); font-weight: 600; color: var(--text-1); white-space: normal; overflow-wrap: anywhere; }
#w-setup .su2-dots { display: flex; min-width: 0; border-top: 1px solid var(--line); padding-top: 2px; }
#w-setup .su2-dots .vz-dots { flex: 1 1 auto; }
/* 12 Nov 2026 (audit L18): a replay trade the news filter would have paused = an amber RING round its dot (review P4: was
   a 4 px pip above it, barely visible on a phone and close to the open-trade gold); a round ring is a different shape from
   the square dots, the key line under the dots says what it means */
#w-setup .vz-dot.su2-news::after { content: ""; position: absolute; top: 50%; left: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; box-sizing: border-box; border-radius: 50%; border: 2px solid var(--warn); pointer-events: none; }
@media (max-width: 767px) { #w-setup .vz-dot.su2-news::after { width: 18px; height: 18px; margin: -9px 0 0 -9px; } }
#w-setup .su2-newskey { margin: 0; font-size: var(--vz-fs-micro); color: var(--warn); line-height: 1.3; }
/* reviews P2 / P9: the full disclaimer is a few short lines (\n in the text), not one dense paragraph */
#w-setup .vz-peek { white-space: pre-line; }
/* 12 Nov 2026 (audit M6): 'Swap ≈ $0.68/oz per night' while the Swap switch is on (tap = its details in the peek) */
#w-setup .su2-swap { margin: 0; padding: 2px 0 0; border-top: 1px dashed var(--line); font-size: var(--vz-fs-sm); color: var(--text-1); cursor: pointer; overflow-wrap: anywhere; white-space: normal; }   /* review P7's longer line wraps on a phone (vz-num is nowrap) */

/* ---- 5. controls ---------------------------------------------------------------------------------------------- */
#w-setup .su2-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0 14px; min-width: 0; }
#w-setup .su2-alertstate { flex: 1 1 110px; min-height: var(--vz-tap); padding: 6px 0; box-sizing: border-box; font-size: var(--vz-fs-sm); line-height: 1.4; cursor: pointer; }
#w-setup .su2-lines-note { flex: 1 1 100%; min-height: var(--vz-tap); padding: 0 2px; text-align: left; font-size: var(--vz-fs-sm); }
/* which TFs alert: "Alerts H1 M30" (pills shown / hidden in place) */
#w-setup .su2-atfs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-width: 0; margin-top: -4px; }
#w-setup .su2-atfs .vz-micro { margin-right: 2px; }
#w-setup .su2-atfs .vz-pill { height: 20px; font-size: var(--vz-fs-micro); font-family: var(--font-mono); }
#w-setup .su2-atfs .su2-atf { cursor: pointer; }   /* a chip shows its TF (setup.js) */
#w-setup .su2-atf-none { font-size: var(--vz-fs-sm); color: var(--text-2); }

/* ---- 6. lot line ---------------------------------------------------------------------------------------------- */
#w-setup .su2-lots { display: flex; align-items: center; min-width: 0; font-size: var(--vz-fs-sm); color: var(--text-1); white-space: pre; }
#w-setup .su2-lots-txt { flex: 0 1 auto; line-height: var(--vz-tap); cursor: pointer; }   /* one clamped line = one full tap row */
#w-setup .su2-lots-txt.is-open { white-space: normal; line-height: 1.4; padding: 4px 0; }
#w-setup .su2-change { flex: 0 0 auto; min-height: var(--vz-tap); padding: 0 2px; }
#w-setup .su2-lots.warn { color: var(--vz-ink-warn); align-items: flex-start; }
#w-setup .su2-lots.warn .su2-lots-txt { white-space: normal; overflow: visible; overflow-wrap: anywhere; text-overflow: clip; line-height: 1.4; padding: 4px 0; cursor: default; }

/* ---- 7. footer ------------------------------------------------------------------------------------------------ */
/* 11 Nov 2026 (audit M18): the permanent "about 1 in 5 trades can differ from your MT5" line; tap = the 2026 H1 check */
#w-setup .su2-mt5 { margin: 0; padding: 2px 0 2px 8px; border-left: 2px solid var(--vz-ink-warn, var(--warn)); font-size: var(--vz-fs-sm); line-height: 1.4; color: var(--text-1); cursor: pointer; }
#w-setup .su2-mt5:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
#w-setup .su2-disc { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; margin: 0; font-size: var(--vz-fs-micro); line-height: 1.4; color: var(--text-2); }
#w-setup .su2-disc-t { flex: 1 1 180px; min-width: 0; }
#w-setup .su2-disc .vz-pill { height: 18px; font-size: var(--vz-fs-micro); }
#w-setup .su2-disc #su-paxg-chip { font-size: var(--vz-fs-sm); }   /* review G3-UX-7: a warning chip is read, not glanced at */

/* ---- phones (the bottom sheet) -------------------------------------------------------------------------------- */
@media (max-width: 767px) {
  #w-setup .su2-band { min-height: 44px; }
  #w-setup .su2-copy { min-height: 36px; padding: 2px 12px; font-size: 13px; }
  #w-setup .su2-rail .vz-tlabel-v { font-size: 12px; }
  #w-setup .su2-disc { font-size: 11px; }
  #w-setup .su2-mt5 { font-size: 12px; min-height: 32px; display: flex; align-items: center; }   /* a tap row on the phone */
  #w-setup .su2-disc .vz-pill[role="button"] { height: 32px; }   /* PAXG chip: 24 px visible inside the kit's 32 px tap row */
  #w-setup .su2-tfs .vz-segctl-b { min-height: 36px; font-size: 12px; }
  #w-setup .su2-atfs .vz-pill[role="button"] { height: 32px; }
}
/* touch screens of any width (landscape phone, tablet): the phone's 36 px tiles, not the mouse 30 px (review UX F9) */
@media (pointer: coarse) {
  #w-setup .su2-tfs .vz-segctl-b { min-height: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  #w-setup .su2-band.su2-ping { animation: none; }
}
