/*!
 * Elite Crypto Signal - charts.css
 * Styles for assets/js/charts.js (ECSCharts). Colours of the data itself are set by the script
 * from the --ecs-* variables; this file styles the chrome (axes, grid, tooltip, legend, motion).
 */

.ecs-chart {
	position: relative;
	min-width: 0;
	color: var(--ecs-text, #C1C6CE);
	font-family: var(--ecs-font-body, 'Source Sans Pro', sans-serif);
}

.ecs-chart svg {
	display: block;
	max-width: 100%;
	overflow: visible;
}

.ecs-chart--radial {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	line-height: 0;
}

.ecs-chart--donut {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 28px;
	line-height: 0;
}

.ecs-chart--sparkline {
	display: inline-block;
	vertical-align: middle;
	line-height: 0;
}

/* Text inside the SVG ------------------------------------------------------ */

.ecs-chart__axis,
.ecs-chart__cap,
.ecs-chart__val {
	font-family: var(--ecs-font-mono, 'Source Code Pro', monospace);
	letter-spacing: 0;
}

.ecs-chart__axis {
	font-size: 11px;
	fill: var(--ecs-muted, #AAAAB3);
}

.ecs-chart__cap {
	fill: var(--ecs-muted, #AAAAB3);
	text-transform: uppercase;
	letter-spacing: .06em;
}

.ecs-chart__val {
	font-size: 11px;
	fill: var(--ecs-text, #C1C6CE);
}

.ecs-chart__big {
	font-family: var(--ecs-font-mono, 'Source Code Pro', monospace);
	font-weight: 600;
	fill: var(--ecs-heading, #F3F3F3);
}

.ecs-chart__ladder-label,
.ecs-chart__ladder-price {
	font-family: var(--ecs-font-mono, 'Source Code Pro', monospace);
}

.ecs-chart__ref-label {
	font-weight: 600;
}

/* Grid / lines -------------------------------------------------------------- */

.ecs-chart__grid {
	stroke: var(--ecs-border, #393940);
	stroke-opacity: .6;
	shape-rendering: crispEdges;
}

.ecs-chart__cross,
.ecs-chart__dot {
	pointer-events: none;
}

.ecs-chart__hit {
	cursor: crosshair;
}

.ecs-chart__bar {
	cursor: default;
}

/* Entrance motion (only applied when JS adds .ecs-chart--pre) ---------------- */

.ecs-chart__ring {
	transition: stroke-dashoffset 1s cubic-bezier(.22, .8, .3, 1);
}

.ecs-chart__seg {
	transition: opacity .6s ease;
}

.ecs-chart--pre .ecs-chart__seg {
	opacity: 0;
}

.ecs-chart__bar {
	transform-box: fill-box;
	transition: transform .7s cubic-bezier(.22, .8, .3, 1), opacity .2s ease;
}

.ecs-chart--pre .ecs-chart__bar {
	transform: scaleY(0);
}

.ecs-chart__bar:hover {
	opacity: .85;
}

.ecs-chart__line {
	stroke-dasharray: 1;
	stroke-dashoffset: 0;
	transition: stroke-dashoffset 1.1s ease;
}

.ecs-chart--pre .ecs-chart__line {
	stroke-dashoffset: 1;
}

.ecs-chart__fill {
	transition: opacity .9s ease .25s;
}

.ecs-chart--pre .ecs-chart__fill {
	opacity: 0;
}

/* Tooltip ------------------------------------------------------------------ */

.ecs-chart__tip {
	z-index: 5;
	min-width: 84px;
	padding: 8px 10px;
	background: var(--ecs-surface-2, #1a1a1d);
	border: 1px solid var(--ecs-border, #393940);
	border-radius: var(--ecs-radius, 2px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
	color: var(--ecs-text, #C1C6CE);
	font: 12px/1.4 var(--ecs-font-mono, 'Source Code Pro', monospace);
	white-space: nowrap;
}

.ecs-chart__tip-head {
	margin-bottom: 4px;
	color: var(--ecs-muted, #AAAAB3);
	font-size: 11px;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.ecs-chart__tip-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.ecs-chart__tip-name {
	margin-right: auto;
	color: var(--ecs-muted, #AAAAB3);
}

.ecs-chart__tip-val {
	color: var(--ecs-heading, #F3F3F3);
	font-weight: 600;
}

/* Legend ------------------------------------------------------------------- */

.ecs-chart__legend {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
	color: var(--ecs-text, #C1C6CE);
	font: 12px/1.3 var(--ecs-font-mono, 'Source Code Pro', monospace);
}

.ecs-chart__legend li {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
}

.ecs-chart--donut .ecs-chart__legend {
	flex: 1 1 140px;
	flex-direction: column;
	flex-wrap: nowrap;
	gap: 9px;
	margin: 0;
}

.ecs-chart__swatch {
	display: inline-block;
	flex: none;
	width: 10px;
	height: 10px;
	border-radius: 1px;
}

.ecs-chart__legend-val {
	margin-left: auto;
	padding-left: 12px;
	color: var(--ecs-heading, #F3F3F3);
}

/* Reduced motion ------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
	.ecs-chart *,
	.ecs-chart *::before,
	.ecs-chart *::after {
		transition: none !important;
		animation: none !important;
	}

	.ecs-chart--pre .ecs-chart__seg,
	.ecs-chart--pre .ecs-chart__fill {
		opacity: 1;
	}

	.ecs-chart--pre .ecs-chart__bar {
		transform: none;
	}

	.ecs-chart--pre .ecs-chart__line {
		stroke-dashoffset: 0;
	}
}
