/* ==========================================================================
   JoomElection - Results Page Styles
   ========================================================================== */

/* Statistics Dashboard Cards */
.je-stat-card {
	border-left-width: 4px !important;
	border-left-style: solid !important;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.je-stat-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.je-stat-card .je-stat-icon {
	width: 56px;
	height: 56px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	flex-shrink: 0;
}

.je-stat-card .je-stat-icon span {
	font-size: 1.5rem;
}

.je-stat-card .je-stat-value {
	font-size: 2rem;
	font-weight: 700;
	line-height: 1.1;
}

.je-stat-card .je-stat-label {
	font-size: 0.85rem;
	color: #6c757d;
	margin-top: 2px;
}

/* Chart Containers */
.je-chart-container {
	position: relative;
	width: 100%;
}

.je-chart-container canvas {
	max-width: 100%;
}

.je-chart-bar {
	height: 100%;
}

/* Turnout Gauge */
.je-turnout-wrapper {
	max-width: 220px;
	margin: 0 auto;
}

/* Winner Podium */
.je-podium {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding: 20px 0 0;
	gap: 12px;
}

.je-podium-place {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	flex: 0 0 auto;
}

.je-podium-place .je-podium-image {
	margin-bottom: 8px;
}

.je-podium-place .je-podium-image img {
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 50%;
	border: 3px solid #dee2e6;
}

.je-podium-1st .je-podium-image img {
	width: 80px;
	height: 80px;
	border-color: #ffc107;
}

.je-podium-place .je-podium-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background-color: #f8f9fa;
	border: 3px solid #dee2e6;
}

.je-podium-2nd .je-podium-placeholder,
.je-podium-3rd .je-podium-placeholder {
	width: 64px;
	height: 64px;
}

.je-podium-1st .je-podium-placeholder {
	width: 80px;
	height: 80px;
	border-color: #ffc107;
}

.je-podium-place .je-podium-name {
	font-weight: 600;
	font-size: 0.95rem;
	margin-bottom: 4px;
	max-width: 140px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.je-podium-place .je-podium-votes {
	font-size: 0.85rem;
	color: #6c757d;
	margin-bottom: 8px;
}

.je-podium-bar {
	width: 120px;
	border-radius: 8px 8px 0 0;
	display: flex;
	align-items: flex-end;
	justify-content: center;
}

.je-podium-1st .je-podium-bar {
	width: 140px;
	height: 140px;
	background: linear-gradient(to top, #ffc107, #ffdb58);
}

.je-podium-2nd .je-podium-bar {
	height: 100px;
	background: linear-gradient(to top, #adb5bd, #ced4da);
}

.je-podium-3rd .je-podium-bar {
	height: 70px;
	background: linear-gradient(to top, #cd7f32, #daa06d);
}

.je-podium-rank {
	font-size: 1.8rem;
	font-weight: 800;
	color: rgba(255, 255, 255, 0.85);
	padding-bottom: 8px;
}

/* Candidate Result Cards */
.je-result-card {
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	overflow: hidden;
}

.je-result-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.je-result-card.je-winner {
	border: 2px solid #ffc107 !important;
}

.je-result-card .je-rank-badge {
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	font-weight: 700;
	font-size: 1rem;
	flex-shrink: 0;
}

.je-result-card .je-candidate-img {
	width: 56px;
	height: 56px;
	object-fit: cover;
	border-radius: 50%;
	flex-shrink: 0;
}

.je-result-card .je-candidate-placeholder {
	width: 56px;
	height: 56px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background-color: #f8f9fa;
	flex-shrink: 0;
}

.je-result-card .progress {
	height: 8px;
	border-radius: 4px;
}

/* List Comparison Section */
.je-list-compare .je-chart-container {
	height: 100%;
}

/* Admin-specific overrides */
.je-admin-results .je-stat-card {
	margin-bottom: 15px;
}

.je-admin-results .table .je-winner-row {
	background-color: rgba(255, 193, 7, 0.08) !important;
}

.je-admin-results .table .je-winner-row td {
	font-weight: 600;
}

/* Responsive */
@media (max-width: 767.98px) {
	.je-podium {
		flex-direction: column;
		align-items: center;
	}

	.je-podium-place {
		order: 0;
	}

	.je-podium-1st {
		order: -1;
	}

	.je-podium-bar {
		width: 100% !important;
		max-width: 200px;
		height: 50px !important;
		border-radius: 8px;
	}

	.je-podium-1st .je-podium-bar {
		height: 60px !important;
	}

	.je-stat-card .je-stat-value {
		font-size: 1.5rem;
	}

	.je-stat-card .je-stat-icon {
		width: 44px;
		height: 44px;
	}
}
