/* Macrolyx — COT Report widgets. */

.mlx-cot { display: flex; flex-direction: column; height: 100%; min-height: 0; }

.mlx-cot-toolbar {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	padding: 0 0 10px;
}
.mlx-cot-reports,
.mlx-cot-ranges,
.mlx-cot-modes,
.mlx-cot-catsel { display: flex; gap: 6px; }

.mlx-cot-date { margin-inline-start: auto; font-size: 12px; color: var(--mlx-muted); font-variant-numeric: tabular-nums; }

/* Chip (scoped copy — module CSS is self-contained). */
.mlx-cot-ccount { color: var(--mlx-accent); }

/* Selects */
.mlx-cot select {
	background: rgba(255, 255, 255, .05);
	border: 1px solid var(--mlx-border);
	color: var(--mlx-text);
	border-radius: 8px;
	padding: 2px 8px;
	font-family: inherit;
	font-size: 10px;
	outline: none;
	cursor: pointer;
	max-width: 220px;
}
.mlx-cot select:focus { border-color: var(--mlx-accent); }
.mlx-cot select option { background: var(--mlx-bg2); color: var(--mlx-text); }

/* Popover (fixed portal, same pattern as Sentiment). */
.mlx-cot-cwrap { position: relative; }
.mlx-cot-cpop {
	display: none;
	position: fixed;
	z-index: 1200;
	background: var(--mlx-bg2);
	border: 1px solid var(--mlx-border);
	border-radius: 10px;
	padding: 8px 10px;
	max-height: 280px;
	overflow-y: auto;
	min-width: 190px;
	scrollbar-width: thin;
}
.mlx-cot-cpop.is-open { display: block; }
.mlx-cot-copt {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: 13px;
	color: var(--mlx-text);
	padding: 3px 2px;
	cursor: pointer;
	white-space: nowrap;
}
.mlx-cot-call {
	border-bottom: 1px solid var(--mlx-border);
	padding-bottom: 6px;
	margin-bottom: 5px;
	color: var(--mlx-muted);
}

/* Body / tables */
.mlx-cot-body { flex: 1; min-height: 0; overflow: auto; scrollbar-width: thin; }
.mlx-cot-loading,
.mlx-cot-empty { color: var(--mlx-muted); font-size: 13px; padding: 14px 4px; }

.mlx-cot-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 12px;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}
.mlx-cot-table th.mlx-sort { cursor: pointer; user-select: none; white-space: nowrap; }
.mlx-cot-table th.mlx-sort:hover { color: var(--mlx-text); }
.mlx-sort-arr { margin-inline-start: 3px; font-size: 8px; color: var(--mlx-accent); }

.mlx-cot-table th {
	position: sticky;
	top: 0;
	background: var(--mlx-bg2);
	color: var(--mlx-muted);
	font-weight: 600;
	text-align: start;
	padding: 6px 8px;
	border-bottom: 1px solid var(--mlx-border);
	z-index: 2;
}
.mlx-cot-table td {
	padding: 5px 8px;
	border-bottom: 1px solid rgba(255, 255, 255, .04);
	color: var(--mlx-text);
}
.mlx-cot-table tr:hover td { background: rgba(255, 255, 255, .03); }

.mlx-cot-table .is-up   { color: var(--mlx-long); }
.mlx-cot-table .is-down { color: var(--mlx-short); }
.mlx-cot-table .is-hot-up   { color: var(--mlx-long); font-weight: 700; }
.mlx-cot-table .is-hot-down { color: var(--mlx-short); font-weight: 700; }
.mlx-cot-table .mlx-cot-sig-up {
	color: var(--mlx-long);
	font-weight: 600;
	text-shadow: 0 0 8px var(--mlx-long);
	animation: mlx-glow 2.2s ease-in-out infinite;
}
.mlx-cot-table .mlx-cot-sig-down {
	color: var(--mlx-short);
	font-weight: 600;
	text-shadow: 0 0 8px var(--mlx-short);
	animation: mlx-glow 2.2s ease-in-out infinite;
}
.mlx-cot-table .mlx-cot-sig-flip {
	color: var(--mlx-danger);
	font-weight: 700;
	text-shadow: 0 0 8px var(--mlx-danger);
	animation: mlx-glow 2.2s ease-in-out infinite;
}

@keyframes mlx-glow {
	0%, 100% { filter: brightness(1); }
	50%      { filter: brightness(1.45); }
}
.mlx-cot-muted { color: var(--mlx-muted); }

/* Chart area */
.mlx-cot-chart { flex: 1; min-height: 220px; }
