/* Nesterchain KPIs Widget Styles */

.kpis {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
	padding: 20px 0px;
	background: transparent;
}

.kpi-card {
	background: linear-gradient(135deg, #1a2332 0%, #0f1419 100%);
	border: 1px solid #2a3a4a;
	border-radius: 12px;
	padding: 24px;
	position: relative;
	overflow: hidden;
	transition: all 0.3s ease;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
	min-height: auto;
}

.kpi-card:hover {
	border-color: #3a4a5a;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
	transform: translateY(-2px);
}

.kpi-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.kpi-header {
	margin-bottom: 16px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
	padding-bottom: 12px;
}

.kpi-title {
	font-size: 13px;
	font-weight: 600;
	color: #ffffff;
	margin: 0;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.kpi-content {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.kpi-value {
	font-size: 32px;
	font-weight: 700;
	color: #ffffff;
	word-break: break-word;
	line-height: 1.2;
}

.kpi-label {
	font-size: 11px;
	color: #8899aa;
	text-transform: uppercase;
	letter-spacing: 1px;
	font-weight: 500;
}

/* Market Cap Card - Zig Zag Chart */
.market-cap-card {
	min-height: 280px;
	display: flex;
	flex-direction: column;
}

.market-cap-card .kpi-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

#marketCapChart {
	width: 100% !important;
	height: 100px !important;
	margin: 12px 0 8px 0;
	display: block;
}

.market-cap-value {
	font-size: 28px;
	font-weight: 700;
	margin-top: 8px;
}

/* BTC Dominance Card - Progress Bar Yellow to Green */
.btc-dominance-card {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-height: auto;
}

.btc-dominance-value {
	font-size: 42px;
	font-weight: 700;
	background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	margin: 8px 0;
}

/* BTC Progress Bar Container */
.btc-progress-container {
	width: 100%;
	height: 12px;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 6px;
	overflow: hidden;
	margin-top: 12px;
	box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
	position: relative;
}

/* BTC Progress Bar Fill */
.btc-progress-bar {
	height: 100%;
	width: 0%;
	background: linear-gradient(90deg, #ffd700 0%, #ffed4e 50%, #98d8c8 100%);
	border-radius: 6px;
	transition: width 0.5s ease;
	box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* Fear & Greed Card - SVG Gauge */
.fear-greed-card {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-height: auto;
}

.gauge-container {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 12px 0;
	min-height: 140px;
}

#fngSvg {
	width: 100%;
	height: auto;
	max-width: 200px;
}

.gauge-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
}

.gauge-labels-top {
	display: flex;
	width: 100%;
	max-width: 200px;
	justify-content: space-between;
	align-items: center;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	padding: 0 8px;
	color: #a1a5b0;
	gap: 8px;
}

.gauge-label-left {
	flex: 1;
	text-align: left;
	color: #EA8C00;
}

.gauge-label-center {
	flex: 0 0 auto;
	text-align: center;
	color: #a1a5b0;
	font-size: 11px;
}

.gauge-label-right {
	flex: 1;
	text-align: right;
	color: #16C784;
}

.fear-greed-gauge {
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.gauge-zone {
	transition: stroke-width 0.3s ease;
}

.gauge-zone:hover {
	stroke-width: 8;
}

.fear-greed-marker {
	filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5));
	transition: cx 0.5s ease, cy 0.5s ease;
	opacity: 0;
}

.fear-greed-value {
	font-weight: 800;
	font-size: 22px;
	fill: #e5e7eb;
	transition: fill 0.3s ease;
}

.fear-greed-status {
	display: flex;
	justify-content: center;
	align-items: center;
	margin-top: 12px;
	min-height: 24px;
}

.fear-greed-sentiment {
	font-size: 14px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	padding: 6px 12px;
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.1);
	color: #e5e7eb;
	transition: all 0.3s ease;
}

.fear-greed-sentiment.extreme-fear {
	color: #EA3943;
	background: rgba(234, 57, 67, 0.2);
	border: 1px solid rgba(234, 57, 67, 0.4);
}

.fear-greed-sentiment.fear {
	color: #EA8C00;
	background: rgba(234, 140, 0, 0.2);
	border: 1px solid rgba(234, 140, 0, 0.4);
}

.fear-greed-sentiment.neutral {
	color: #F3D42F;
	background: rgba(243, 212, 47, 0.2);
	border: 1px solid rgba(243, 212, 47, 0.4);
}

.fear-greed-sentiment.greed {
	color: #93D900;
	background: rgba(147, 217, 0, 0.2);
	border: 1px solid rgba(147, 217, 0, 0.4);
}

.fear-greed-sentiment.extreme-greed {
	color: #16C784;
	background: rgba(22, 199, 132, 0.2);
	border: 1px solid rgba(22, 199, 132, 0.4);
}

/* Altcoin Season Index Card - Full Bar with Dot Indicator */
.altcoin-season-card {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-height: auto;
}

.season-index {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.season-value {
	font-size: 32px;
	font-weight: 700;
	color: #ffffff;
	margin-bottom: 4px;
}

.season-slider-container {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.season-label {
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	font-weight: 600;
}

.season-label.bitcoin {
	color: #ff6b6b;
	text-align: left;
}

.season-label.altcoin {
	color: #51cf66;
	text-align: right;
}

/* Full Slider Bar (100% width) */
.season-slider-full {
	width: 100%;
	height: 8px;
	background: linear-gradient(90deg, #ff6b6b 0%, #ffa500 50%, #51cf66 100%);
	border-radius: 4px;
	margin: 6px 0;
	box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
	position: relative;
	overflow: visible;
}

/* Dot Indicator */
.season-indicator-dot {
	position: absolute;
	width: 16px;
	height: 16px;
	background: #ffffff;
	border: 2px solid #ffd700;
	border-radius: 50%;
	top: 50%;
	left: 0%;
	transform: translate(-50%, -50%);
	transition: left 0.5s ease;
	box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

/* Responsive Design */
@media (max-width: 1440px) {

	.kpi-card {
		padding: 20px;
	}

	.kpi-value {
		font-size: 28px;
	}

	.btc-dominance-value {
		font-size: 36px;
	}
}

@media (max-width: 768px) {
	.kpis {
		grid-template-columns: 1fr;
		gap: 12px;
		padding: 12px;
	}

	.kpi-card {
		padding: 16px;
	}

	.kpi-value {
		font-size: 24px;
	}

	.btc-dominance-value {
		font-size: 32px;
	}

	.kpi-title {
		font-size: 12px;
	}

	.market-cap-card {
		min-height: auto;
	}
}

@media (max-width: 480px) {
	.kpis {
		grid-template-columns: 1fr;
		gap: 10px;
		padding: 10px;
	}

	.kpi-card {
		padding: 12px;
	}

	.kpi-value {
		font-size: 20px;
	}

	.btc-dominance-value {
		font-size: 28px;
	}

	.kpi-title {
		font-size: 11px;
	}

	#marketCapChart {
		height: 80px !important;
	}

	#fearGreedGauge {
		height: 100px !important;
	}
}

/* Loading and Error States */
.kpi-loading {
	opacity: 0.6;
	pointer-events: none;
}

.kpi-loading .kpi-value {
	color: rgba(255, 255, 255, 0.3);
}

.kpi-error {
	border-color: #ff6b6b;
}

.kpi-error .kpi-value {
	color: #ff6b6b;
	font-size: 14px;
}

/* Animation */
@keyframes pulse {
	0%, 100% {
		opacity: 1;
	}
	50% {
		opacity: 0.7;
	}
}

.kpi-card.updating {
	animation: pulse 0.8s ease-in-out;
}

/* Smooth transitions for data updates */
.kpi-value,
.progress-fill,
.season-fill,
.btc-dominance-value {
	transition: all 0.4s ease;
}

/* Canvas responsive fix */
canvas {
	display: block !important;
	max-width: 100%;
}
