/* /chart's open position (livepos.js) — LOOK C "Risk band", the user's pick from the position-stops mockup. The band
   and the two ink lines are canvas (a bottom primitive + the draw hook); this sheet styles the two DOM pieces: the
   stop TAB (the drag handle on the stop's line) and the CARD on the band's far side. Every rule is scoped to
   livepos.js's own DOM (.lp-tab, .lp-card), so a page without the script matches none of it. Colours are /chart's
   tokens plus look C's ink (the VWAP Frame's ivory / graphite). Quiet on purpose: no glow, no loud fill.

   Placed by livepos.js with a transform (left 0 / top 0 of #stage); z 8 = orders.js's pills: above the canvas,
   #draw-overlay (5) and #ind-chips (6), below the inspector (10), the rail (15), the toasts (22), #chart-menu (40). */
.lp-tab,
.lp-card {
  --ink: #eae5d8;
  --ink-line: rgba(234, 229, 216, 0.55);
  --ink-soft: rgba(234, 229, 216, 0.76);
  --lp-shadow: rgba(0, 0, 0, 0.45);
  position: absolute; left: 0; top: 0; z-index: 8;
  white-space: nowrap; font-variant-numeric: tabular-nums;
  user-select: none; -webkit-user-select: none;
}
:root[data-theme="light"] .lp-tab,
:root[data-theme="light"] .lp-card {
  --ink: #2f3440;
  --ink-line: rgba(47, 52, 64, 0.55);
  --ink-soft: rgba(47, 52, 64, 0.82);
  --lp-shadow: rgba(16, 22, 40, 0.16);
}
.lp-tab[hidden],
.lp-card[hidden] { display: none; }

/* ---- the stop tab: [⟳ SL][85,601][locks +$12.94] ---- */
.lp-tab {
  display: inline-flex; align-items: center; gap: 6px;
  height: 20px; padding: 0 7px;
  font-size: 11px; line-height: 1;
  background: var(--panel); color: var(--ink-soft);
  border: 1px solid var(--border); border-radius: 3px;
  cursor: ns-resize; touch-action: none;
}
.lp-tab .k { color: var(--neg); font-weight: 700; font-size: 10px; letter-spacing: 0.6px; }
.lp-tab .px { color: var(--ink); font-weight: 600; }
.lp-tab .mut { color: var(--muted); }
.lp-tab .up { color: var(--pos); }
.lp-tab .tob { color: var(--ink); font-size: 9.5px; letter-spacing: 0.3px; }
.lp-tab:hover,
.lp-tab.dragging { border-color: var(--ink-line); color: var(--ink); }
.lp-tab.moving { cursor: progress; opacity: 0.6; }

/* ---- the card: side · size · PnL · R / held · what the stop locks / Trail · Breakeven · Close ---- */
.lp-card {
  --c: var(--pos);
  display: inline-flex; flex-direction: column; align-items: stretch; gap: 6px;
  padding: 7px 9px 8px;
  font-size: 11.5px; line-height: 1.2;
  background: var(--panel); color: var(--fg);
  border: 1px solid var(--border); border-radius: 6px;
  box-shadow: 0 4px 16px var(--lp-shadow);
  cursor: default;
}
.lp-card.short { --c: var(--neg); }
/* no stop: the card says so in red (row 2) and its frame leans red — a state, not an alarm */
.lp-card.nostop { border-color: color-mix(in srgb, var(--neg) 55%, var(--border)); }
.lp-card .r1 { display: flex; align-items: baseline; gap: 8px; }
.lp-card .r1 .mk { color: var(--c); font-size: 10px; }
.lp-card .r1 .sd { color: var(--ink-soft); font-weight: 600; }
.lp-card .big { font-size: 15px; font-weight: 700; margin-left: auto; }
.lp-card .rr { font-weight: 700; }
.lp-card .r2 { color: var(--muted); }
.lp-card .r2 b { color: var(--fg); font-weight: 600; }
.lp-card .r3 { display: flex; gap: 4px; }
.lp-card .up { color: var(--pos); }
.lp-card .dn { color: var(--neg); }
.lp-card .r2 b.up { color: var(--pos); }
.lp-card .r2 b.dn { color: var(--neg); }
.lp-card .cbtn {
  height: 21px; padding: 0 8px; margin: 0;
  border: 1px solid var(--border); border-radius: 4px;
  background: transparent; color: var(--ink-soft);
  font: inherit; font-size: 11px; cursor: pointer;
}
.lp-card .cbtn:hover { background: var(--hover); color: var(--fg); }
.lp-card .cbtn.on { border-color: var(--accent); color: var(--fg); background: color-mix(in srgb, var(--accent) 16%, transparent); }
.lp-card .cbtn:disabled { cursor: default; opacity: 0.5; }
.lp-card .cbtn:disabled:hover { background: transparent; color: var(--ink-soft); }
.lp-card .cbtn.busy { cursor: progress; }
