/* ═══════════════════════════════════════════════════════════════════════════
   TradingView Interface (#/tv-terminal)

   The page is one widget, so this sheet only has to do two things: give the
   terminal the whole window, and get every piece of SpiderX chrome out of its
   way EXCEPT the top bar.

   The top bar stays. Terminal / Legend / Connect collapse it because each has
   its own way back out (a dock, a header); this page does not — TradingView's
   header belongs to TradingView, and with the bar collapsed the only exit would
   be editing the hash. It is also where the button that opens this page lives.

   Colour is the SPIDERX palette, like every other TV surface in the app. This
   route shipped in TradingView's own #131722 for an afternoon — the reference
   IS the product, went the reasoning — but sitting one dock button from Legend's
   chart it read as a second application embedded in the first. The chart itself
   is themed from src/shell/tv-theme.ts and the frame around it from the
   `--tv-color-*` block in charting_library/custom-css.css; the two values below
   are the app's --tm-bg, so the host the widget mounts into matches what the
   widget paints and there is no flash of a different black on load.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Spine and strip out, header row kept. Same shape as `.app--fullbleed`, spelled
   out because that class is applied per-feature and this route is not one. */
.app--mode-tv-terminal {
	grid-template-rows: var(--topbar-h) 1fr 0;
	background: #0a0a0b;
}

.app--mode-tv-terminal .app__body {
	grid-template-columns: 0 1fr;
}

.app--mode-tv-terminal .app__strip {
	display: none;
}

.app--mode-tv-terminal .app__spine-host {
	visibility: hidden;
}

/* The ambient session wash + BTC aura (`.app::before` / `::after`) are fixed
   layers that tint the whole viewport. Over an opaque terminal they do nothing
   but shift its colour away from the reference. */
.app--mode-tv-terminal::before,
.app--mode-tv-terminal::after {
	opacity: 0;
}

.app--mode-tv-terminal .app__page {
	background: #0a0a0b;
	overflow: hidden;
}

/* `.app__page` is `position: relative` + `overflow: hidden`, so the widget host
   is pinned to it rather than sized in flow: TradingView measures its container
   once, at construction, and a host that resolves to `height: auto` measures 0
   and mounts the small fixed-size fallback. */
.tvt {
	position: absolute;
	inset: 0;
	display: flex;
	min-width: 0;
	min-height: 0;
}

.tvt__host {
	flex: 1;
	min-width: 0;
	min-height: 0;
}

/* The library or the datafeed didn't load — say which, in place, rather than
   leaving an empty black page that reads as a broken route. */
.tvt__fail {
	margin: auto;
	max-width: 520px;
	padding: 0 24px;
	text-align: center;
}

.tvt__fail-h {
	margin: 0 0 8px;
	font-size: 16px;
	font-weight: 500;
	color: #d1d4dc;
}

.tvt__fail-b {
	margin: 0;
	font-size: 13.5px;
	line-height: 1.5;
	color: #787b86;
}
