/* ================================================================
   === Futures page ===
   ================================================================ */

.view--futures {
	max-width: 1400px;
}

/* Table wrapper — horizontal scroll for wide column sets */
.futures-table-wrap {
	overflow-x: auto;
}

/* Futures table: fixed layout, auto width (not 100% like spot-table) */
.futures-table {
	table-layout: fixed;
	width: auto;
	min-width: 100%;
}

/* Tighter header — multi-line labels, bottom-aligned */
.futures-table thead th {
	padding: 0.45rem 0.7rem;
	font-size: 0.9rem;
	line-height: 1.35;
	white-space: normal;
	vertical-align: middle;
	text-align: left;
}

/* Tighter data cells, no-wrap by default */
.futures-table tbody td {
	padding: 0.55rem 0.7rem;
	font-size: 1rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	text-align: left;
}

/* Main ticker column — allow wrapping for exchange name + symbol */
.futures-table td.ft-col-main {
	white-space: normal;
}

/* ---- Futures column widths (applied to <th>, fixed layout uses first row) ---- */
.ft-col-main    { width: 155px; }
.ft-col-rate    { width: 78px; }
.ft-col-vol     { width: 88px; }
.ft-col-price2  { width: 122px; }
.ft-col-time    { width: 105px; }
.ft-col-avgprice { width: 108px; }
.ft-col-spread  { width: 70px; }
.ft-col-profit  { width: 65px; }

/* Cell text alignment and colors for data columns */
.futures-table td.ft-col-rate,
.futures-table td.ft-col-time,
.futures-table td.ft-col-spread,
.futures-table td.ft-col-profit,
.futures-table td.ft-col-vol,
.futures-table td.ft-col-price2,
.futures-table td.ft-col-avgprice {
	text-align: left;
}

.futures-table td.ft-col-vol,
.futures-table td.ft-col-price2,
.futures-table td.ft-col-avgprice {
	color: var(--text-muted);
}

/* Sub-label in header cell (e.g. "лонг" / "шорт") */
.ft-th-sub {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--primary);
	opacity: 0.9;
}

/* Separator between paired values (index / mark) */
.ft-price-sep {
	color: var(--text-muted);
	margin: 0 0.2rem;
}

/* Avg price hint when amount_usdt is not set */
.ft-avg-na {
	color: var(--text-muted);
	font-size: 0.8rem;
}

/* Funding rate coloring */
.ft-rate-positive {
	color: #4ade80;
}

.ft-rate-negative {
	color: #f87171;
}

/* ---- Results header: column picker + stats in one row ---- */
.ft-results-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
	flex-wrap: wrap;
	min-height: 2.2rem;
}

/* ---- Column picker ---- */
.ft-col-picker-wrap {
	position: relative;
	display: inline-flex;
	align-items: center;
}

.ft-col-picker-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.35rem 0.85rem;
	font-size: 0.875rem;
}

.ft-col-picker-panel {
	position: absolute;
	top: calc(100% + 0.4rem);
	left: 0;
	z-index: 50;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 0.85rem 1rem 0.9rem;
	min-width: 215px;
	box-shadow: var(--shadow);
}

.ft-col-picker-panel.hidden {
	display: none !important;
}

.ft-col-picker-title {
	font-size: 0.72rem;
	font-weight: 700;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-bottom: 0.65rem;
}

.ft-col-picker-group {
	margin-bottom: 0.6rem;
}

.ft-col-picker-group:last-child {
	margin-bottom: 0;
}

.ft-col-picker-group-label {
	font-size: 0.7rem;
	font-weight: 600;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin-bottom: 0.3rem;
	padding-bottom: 0.25rem;
	border-bottom: 1px solid var(--border);
}

.ft-col-picker-item {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	cursor: pointer;
	font-size: 0.875rem;
	color: var(--text);
	padding: 0.22rem 0;
	transition: color 0.15s;
	user-select: none;
}

.ft-col-picker-item:hover {
	color: var(--primary);
}

.ft-col-picker-item input[type="checkbox"] {
	width: 14px;
	height: 14px;
	accent-color: var(--primary);
	cursor: pointer;
	flex-shrink: 0;
}


