/* 1-tap on the Markets page's rows (quick-buy.js, round 9): the toasts, the confirm sheet (trade-guard.js) and 1-tap's
   button format, as Home draws them (home.css), in the site's tokens (theme.css). */
.toasts { position: fixed; z-index: 60; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column-reverse; gap: 8px; width: min(460px, calc(100vw - 32px)); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--ob-material); -webkit-backdrop-filter: var(--ob-material-blur); backdrop-filter: var(--ob-material-blur); box-shadow: var(--ob-shadow-pop); font-size: 13px; line-height: 18px; color: var(--ob-ink); pointer-events: auto; animation: qbToastIn 220ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.toast.out { opacity: 0; transform: translateY(8px); transition: opacity 200ms, transform 200ms; }
.toast i { flex: none; width: 8px; height: 8px; border-radius: 999px; background: var(--ob-mute); }
.toast.ok i { background: var(--ob-ok); } /* it worked: the done-green, never the P&L green (vihan, 18 Nov) */
.toast.bad i { background: var(--ob-down); }
.toast span { flex: 1; min-width: 0; }
.toast a { flex: none; font-weight: 600; color: var(--ob-ink-2); text-decoration: none; }
@media (hover: hover) { .toast a:hover { color: var(--ob-ink); } }
@keyframes qbToastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }
/* a phone: over the bottom nav bar */
@media (max-width: 640px) { .toasts { bottom: calc(76px + env(safe-area-inset-bottom)); } }

/* the confirm sheet (trade-guard.js) when Settings > Trading asks before placing */
.tgc-back { position: fixed; inset: 0; z-index: 90; background: transparent; }
.tgc-back.tgc-phone { background: rgba(0, 0, 0, 0.6); }
.tgc-back[hidden], .tgc[hidden] { display: none; }
.tgc { position: fixed; z-index: 91; width: min(360px, calc(100vw - 24px)); padding: 18px 20px; background: var(--ob-popover); border-radius: 20px; box-shadow: var(--ob-shadow-pop); font-size: 14px; color: var(--ob-ink-2); box-sizing: border-box; }
.tgc-t { margin: 0; font-size: 17px; font-weight: 600; color: var(--ob-ink); }
.tgc-w { margin: 6px 0 0; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.tgc-rows { margin: 12px 0 0; padding: 0; }
.tgc-r { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--ob-line-lo); }
.tgc-r:last-child { border-bottom: 0; }
.tgc-r dt { color: var(--ob-label); flex: 0 0 auto; }
.tgc-r dd { margin: 0; color: var(--ob-ink); text-align: right; min-width: 0; overflow-wrap: anywhere; font-variant-numeric: lining-nums tabular-nums; }
.tgc-n { margin: 8px 0 0; font-size: var(--ob-t-small, 13px); color: var(--ob-label); }
.tgc-b { display: flex; gap: 8px; margin-top: 14px; }
.tgc-b button { flex: 1 1 0; height: 44px; border: 0; border-radius: var(--ob-pill, 999px); font: 600 14px/1 var(--ob-sans); cursor: pointer; }
.tgc-b .secondary { flex: 0 0 110px; background: var(--ob-muted); color: var(--ob-ink); }
@media (hover: hover) { .tgc-b .secondary:hover { background: var(--ob-raise); } }
.tgc-b .primary { background: var(--ob-brand); color: var(--ob-on-brand); }
@media (hover: hover) { .tgc-b .primary:hover { background: var(--ob-brand-2); } }
.tgc.tgc-phone { left: 0; right: 0; bottom: 0; top: auto; width: auto; border-radius: 20px 20px 0 0; padding: 20px 16px calc(16px + env(safe-area-inset-bottom)); font-size: 15px; }
.tgc.tgc-phone .tgc-b button { height: 52px; }

/* 1-tap on: one button format on every page, "Up · $1" on line 1 and the price on line 2 (home.css) */
body.ot-on .mrow .ud { flex-direction: column; justify-content: center; align-items: flex-start; gap: 3px; line-height: 1.1; height: 44px; padding: 0 10px; }
body.ot-on .mrow .ud .amt { display: inline !important; opacity: 1; font-weight: inherit; }
body.ot-on .mrow .ud b { font-size: 12px; font-weight: 500; opacity: 0.85; }
/* the pressed flash */
.mrow .ud.busy, .fc-b .udl.busy { opacity: 0.6; }
.mrow .ud .amt { font-style: normal; }
/* the Most traded cards: the same two-line format, so "Down · $1" and its price fit the card */
body.ot-on .fc-b .udl.fb { flex-direction: column; justify-content: center; align-items: flex-start; gap: 3px; height: 48px; line-height: 1.1; }
body.ot-on .fc-b .udl.fb > b { font-size: 12px; font-weight: 500; opacity: 0.85; }

/* success is its own green (--ob-ok), separate from the P&L / Up green (vihan, 18 Nov) */
.toast.ok i { background: var(--ob-ok, #10b981); }

/* UX-27: a toast never takes a tap meant for the page under it (a burst of 1-tap taps landed on it): only its link
   and its close button take presses. Wide screens: bottom right, clear of the lists' Up / Down columns */
.toast { pointer-events: none; }
.toast a, .toast button { pointer-events: auto; }
.toast .tx { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; margin: -4px -6px -4px 0; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--ob-mute); cursor: pointer; }
.toast .tx svg { width: 12px; height: 12px; }
@media (hover: hover) { .toast .tx:hover { color: var(--ob-ink); background: rgba(255, 255, 255, 0.06); } }
@media (pointer: coarse) { .toast .tx { width: 36px; height: 36px; margin: -10px -10px -10px 0; } }
@media (min-width: 900px) and (min-height: 501px) { .toasts { left: auto; right: 24px; transform: none; width: min(400px, calc(100vw - 48px)); } }
/* a phone held sideways: above the bottom edge, at the side, narrower than the list */
@media (max-height: 500px) and (min-width: 641px) { .toasts { left: auto; right: 16px; transform: none; bottom: 12px; width: min(360px, 45vw); } }
/* UX-59: a trade on its way: the dot turns into a small spinner until it fills or not */
.toast:not(.ok):not(.bad) i { width: 12px; height: 12px; background: none; border: 2px solid rgba(255, 255, 255, 0.18); border-top-color: var(--ob-ink-2); animation: qbSpin 0.8s linear infinite; }
@keyframes qbSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .toast:not(.ok):not(.bad) i { animation: none; border-top-color: rgba(255, 255, 255, 0.18); background: var(--ob-mute); border: 0; width: 8px; height: 8px; } }
