/* The pieces every trade surface shares (the trade page and the three labs), so they read as one product:
   the price block (icon + name row over a 32/600 price, its change pill on one line) and the direction track (one 44px
   track, the selected side tinted 26% with a 45% inset ring, the other side still in its colour). Linked after each
   page's own stylesheet; written with theme.css tokens only. docs/DESIGN-LANGUAGE.md 2.7, 2.10. */

/* ---------- price block ---------- */
.pxblock { min-width: 0; }
.pxblock .sym { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; line-height: 20px; color: var(--ob-label); white-space: nowrap; }
.pxblock .coin { flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--ob-fill); color: var(--ob-ink-2); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.pxblock .coin.g { width: auto; min-width: 20px; padding: 0 6px; border-radius: 10px; }
.pxblock .symn { color: var(--ob-ink); font-weight: 510; overflow: hidden; text-overflow: ellipsis; }
.pxblock .symt { color: var(--ob-label); }
.pxblock .feed { font-size: 12px; color: var(--ob-label); }
.pxblock .feed:empty { display: none; }
.pxblock .feed.bad { color: var(--ob-amber); }
.pxblock .pxrow { display: flex; align-items: baseline; gap: 10px; margin-top: 6px; min-width: 0; white-space: nowrap; }
.pxblock .px { font-size: 32px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; color: var(--ob-ink); }
.pxblock .px.wait { font-size: 17px; font-weight: 510; letter-spacing: 0; color: var(--ob-label); }
.pxblock .chg { flex: none; white-space: nowrap; font-size: 13px; font-weight: 510; line-height: 18px; padding: 2px 6px; border-radius: 4px; background: var(--ob-hover); color: var(--ob-label); }
.pxblock .chg:empty { display: none; }
.pxblock .chg.up { background: var(--ob-up-bg); color: var(--ob-up); }
.pxblock .chg.down { background: var(--ob-down-bg); color: var(--ob-down); }
.pxblock .chgl { flex: none; white-space: nowrap; font-size: 12px; color: var(--ob-label); }
@media (max-width: 640px) {
  .pxblock .px { font-size: 28px; }
  .pxblock .chgl { display: none; }
}

/* ---------- direction track ---------- */
.seg.dir { display: flex; height: 44px; padding: 3px; gap: 3px; border-radius: 8px; background: var(--ob-track); box-shadow: var(--ob-track-edge); border: 0; }
.seg.dir[hidden] { display: none; }
.seg.dir > :is(button, span) { position: relative; flex: 1 1 0; min-width: 0; height: 38px; min-height: 0; margin: 0; padding: 0 10px; display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 15px; font-weight: 510; border: 0; border-radius: 6px; background: transparent; box-shadow: none; cursor: pointer; transition: background-color 160ms cubic-bezier(.2, .8, .2, 1), color 160ms cubic-bezier(.2, .8, .2, 1), box-shadow 160ms cubic-bezier(.2, .8, .2, 1); }
.seg.dir > :is(button, span)::after { display: none; }
.seg.dir > :is(button, span) { color: var(--ob-ink-2); }
.seg.dir > :is(button, span) svg { flex: none; width: 10px; height: 10px; }
.seg.dir > :is(button, span).up { color: color-mix(in srgb, var(--ob-up) 62%, var(--ob-label)); }
.seg.dir > :is(button, span).down { color: color-mix(in srgb, var(--ob-down) 62%, var(--ob-label)); }
@media (hover: hover) { .seg.dir > :is(button, span).up:hover { color: var(--ob-up); background: transparent; } }
@media (hover: hover) { .seg.dir > :is(button, span).down:hover { color: var(--ob-down); background: transparent; } }
.seg.dir > :is(button, span).up.on { color: var(--ob-up); background: color-mix(in srgb, var(--ob-up) 26%, var(--ob-panel)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ob-up) 45%, transparent); }
.seg.dir > :is(button, span).down.on { color: var(--ob-down); background: color-mix(in srgb, var(--ob-down) 26%, var(--ob-panel)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ob-down) 45%, transparent); }
.seg.dir > :is(button, span).on:not(.up):not(.down) { color: var(--ob-ink); background: var(--ob-thumb); box-shadow: var(--ob-shadow-thumb); }
.seg.dir > :is(button, span):disabled { cursor: default; } /* still its side's colour (62% toward the label): never a washed-out tint */
@media (max-width: 640px) { .seg.dir { height: 50px; } .seg.dir > :is(button, span) { height: 44px; } }
/* the side's price inside each half: "Up 52¢" / "Down 48¢" (no triangles: the word and its colour carry the side) */
.seg.dir > :is(button, span) svg { display: none; }
.seg.dir .dpx { font-size: 15px; font-weight: 510; }
.seg.dir .dpx:empty { display: none; }

/* ---------- the trading action layer: one look on the trade page, the three labs and the agent dock ----------
   .tbtn  the trading button (Take now · Up $10): filled in its side's colour with dark ink, 44px radius 8 at 15/600,
          48px radius 10 at 17/600 on phones. data-side="up"|"down"|"both". Disabled = waiting ("Getting a price…").
   .sbtn  the secondary action (Ask every maker): rgba(250,248,240,.08) at 44px, never teal, never a text link. */
.tbtn, .sbtn { display: inline-flex; align-items: center; justify-content: center; gap: 0; width: 100%; height: 44px; padding: 0 16px; border: 0; border-radius: 8px; font: inherit; font-size: 15px; line-height: 1; white-space: nowrap; cursor: pointer; font-variant-numeric: tabular-nums; transition: filter 160ms cubic-bezier(.2, .8, .2, 1), background-color 160ms cubic-bezier(.2, .8, .2, 1), color 160ms cubic-bezier(.2, .8, .2, 1); }
.tbtn { font-weight: 600; background: color-mix(in srgb, var(--ob-up) 88%, var(--ob-panel)); color: var(--ob-ground); }
.tbtn[data-side="down"] { background: var(--ob-down); }
.tbtn[data-side="both"] { background: var(--ob-ink); }
@media (hover: hover) { .tbtn:hover { filter: brightness(1.06); } }
.tbtn:active { filter: brightness(.88); }
.tbtn .tsep { opacity: .55; font-weight: 400; white-space: pre; }
.tbtn:disabled, .tbtn.wait { background: var(--ob-hover); color: var(--ob-label); box-shadow: inset 0 0 0 1px var(--ob-line-hi); cursor: default; filter: none; }
.sbtn { font-weight: 510; background: rgba(250, 248, 240, .08); color: var(--ob-ink); }
@media (hover: hover) { .sbtn:hover { background: rgba(250, 248, 240, .12); } }
.sbtn:disabled { background: var(--ob-hover); color: var(--ob-label); cursor: default; }
@media (max-width: 640px) {
  .tbtn { height: 48px; border-radius: 10px; font-size: 17px; }
  .sbtn { height: 48px; border-radius: 10px; }
}

/* ---------- amount chips: $5 $10 $25 $50, quiet 28px pills under the field (2.8); 44px on phones ---------- */
.qchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.qchips > button { flex: 0 0 auto; height: 28px; min-width: 44px; padding: 0 10px; border: 0; border-radius: 6px; background: rgba(250, 248, 240, .06); color: var(--ob-ink-2); font: inherit; font-size: 12px; font-weight: 400; cursor: pointer; transition: background-color 160ms cubic-bezier(.2, .8, .2, 1), color 160ms cubic-bezier(.2, .8, .2, 1); }
@media (hover: hover) { .qchips > button:hover { background: rgba(250, 248, 240, .10); } }
.qchips > button.on, .qchips > button[aria-pressed="true"] { background: rgba(250, 248, 240, .14); color: var(--ob-ink); font-weight: 510; }
@media (max-width: 640px) { .qchips > button { flex: 1 1 0; height: 44px; font-size: 13px; } }

/* ---------- the warning banner (2.11): a full-width 36px amber row, not a line of prose ---------- */
.obanner { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 8px 12px; border-radius: 6px; font-size: 12px; font-weight: 510; line-height: 16px; color: var(--ob-amber); background: rgba(232, 176, 75, .10); }
.obanner:empty { display: none; }
.obanner.info { color: var(--ob-label); background: var(--ob-panel); box-shadow: inset 0 0 0 1px var(--ob-line); }
