/* =========================================================================
   RELATIA STATISTICS - Platform Leaderboards
   ========================================================================= */

/* -------------------------------------------------------------------------
   CONTAINER
   ------------------------------------------------------------------------- */
.relatia-statistics {
	max-width: 900px;
	margin: 0 auto;
	padding: 20px;
	font-family: inherit;
}

.relatia-statistics-title {
	font-size: 24px;
	font-weight: 700;
	color: #18181b;
	margin: 0 0 24px;
	text-align: center;
}

.relatia-statistics-login {
	text-align: center;
	padding: 40px 20px;
	color: #888;
	font-size: 15px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.relatia-statistics-login .material-icons-outlined {
	font-size: 20px;
	color: #aaa;
}

/* -------------------------------------------------------------------------
   SECTION (one leaderboard card)
   ------------------------------------------------------------------------- */
.relatia-statistics-section {
	background: #fff;
	border: 1px solid #e4e4e7;
	border-radius: 12px;
	padding: 20px 24px 16px;
	margin-bottom: 20px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.relatia-statistics-section-header {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid #f0f0f3;
}

.relatia-statistics-section-header .material-icons-outlined {
	font-size: 24px;
	color: var(--relatia-color-main, #4a6cf7);
}

.relatia-statistics-section-header h3 {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
	color: #18181b;
}

.relatia-statistics-empty {
	color: #999;
	font-size: 14px;
	text-align: center;
	padding: 16px 0;
	margin: 0;
}

/* -------------------------------------------------------------------------
   LEADERBOARD LIST
   ------------------------------------------------------------------------- */
.relatia-statistics-leaderboard {
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: none;
}

.relatia-statistics-entry {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	border-radius: 8px;
	transition: background 0.15s;
}

.relatia-statistics-entry:hover {
	background: #f9f9fb;
}

.relatia-statistics-entry + .relatia-statistics-entry {
	border-top: 1px solid #f5f5f7;
}

/* -------------------------------------------------------------------------
   RANK BADGE
   ------------------------------------------------------------------------- */
.relatia-statistics-rank {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	font-size: 13px;
	font-weight: 700;
	flex-shrink: 0;
	background: #f0f0f3;
	color: #71717a;
}

/* Gold */
.relatia-statistics-entry-1 .relatia-statistics-rank {
	background: linear-gradient(135deg, #fbbf24, #f59e0b);
	color: #fff;
	box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

/* Silver */
.relatia-statistics-entry-2 .relatia-statistics-rank {
	background: linear-gradient(135deg, #d1d5db, #9ca3af);
	color: #fff;
	box-shadow: 0 2px 8px rgba(156, 163, 175, 0.35);
}

/* Bronze */
.relatia-statistics-entry-3 .relatia-statistics-rank {
	background: linear-gradient(135deg, #d97706, #b45309);
	color: #fff;
	box-shadow: 0 2px 8px rgba(180, 83, 9, 0.3);
}

/* -------------------------------------------------------------------------
   AVATAR
   ------------------------------------------------------------------------- */
.relatia-statistics-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
	border: 2px solid #f0f0f3;
}

.relatia-statistics-entry-1 .relatia-statistics-avatar {
	border-color: #fbbf24;
}

.relatia-statistics-entry-2 .relatia-statistics-avatar {
	border-color: #d1d5db;
}

.relatia-statistics-entry-3 .relatia-statistics-avatar {
	border-color: #d97706;
}

/* -------------------------------------------------------------------------
   USER INFO
   ------------------------------------------------------------------------- */
.relatia-statistics-user-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1;
	min-width: 0;
}

.relatia-statistics-name {
	font-size: 14px;
	font-weight: 600;
	color: #18181b;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.relatia-statistics-level {
	font-size: 12px;
	color: var(--relatia-color-main, #4a6cf7);
	font-weight: 500;
}

/* -------------------------------------------------------------------------
   VALUE
   ------------------------------------------------------------------------- */
.relatia-statistics-value {
	font-size: 13px;
	font-weight: 600;
	color: #52525b;
	white-space: nowrap;
	flex-shrink: 0;
	text-align: right;
}

.relatia-statistics-entry-1 .relatia-statistics-value {
	color: #d97706;
	font-weight: 700;
}

/* -------------------------------------------------------------------------
   RESPONSIVE
   ------------------------------------------------------------------------- */
@media (max-width: 480px) {
	.relatia-statistics-entry {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		gap: 6px 10px;
	}
	.relatia-statistics-rank {
		align-self: center;
	}
	.relatia-statistics-avatar {
		align-self: center;
	}
	.relatia-statistics-user-info {
		flex-basis: 100%;
		text-align: center;
	}
	.relatia-statistics-name {
		white-space: normal;
		word-break: break-word;
	}
	.relatia-statistics-value {
		flex-basis: 100%;
		text-align: center;
	}
}

/* -------------------------------------------------------------------------
   PUBLIC RANKINGS
   ------------------------------------------------------------------------- */
.relatia-public-rankings {
	max-width: 900px;
	margin: 0 auto;
	padding: 20px;
}

.relatia-public-rankings-title {
	font-size: 24px;
	font-weight: 700;
	text-align: center;
	margin: 0 0 24px;
}

.relatia-public-rankings-empty {
	text-align: center;
	color: #888;
	padding: 40px 20px;
}

.relatia-public-rankings-school {
	margin-bottom: 24px;
}

.relatia-public-rankings-school-header {
	display: flex;
	align-items: center;
	gap: 10px;
	padding-bottom: 12px;
	border-bottom: 1px solid #f0f0f3;
	margin-bottom: 12px;
}

.relatia-public-rankings-school-name {
	font-size: 17px;
	font-weight: 700;
}

.relatia-public-rankings-school-meta {
	font-size: 13px;
	color: #6b7280;
	margin-left: auto;
}

/* Director ranking preview */
.relatia-director-ranking-preview {
	margin-top: 12px;
}

/* -------------------------------------------------------------------------
   RESPONSIVE
   ------------------------------------------------------------------------- */
@media (max-width: 600px) {
	.relatia-statistics {
		padding: 12px;
	}

	.relatia-statistics-section {
		padding: 16px 14px 12px;
		margin-bottom: 14px;
	}

	.relatia-statistics-entry {
		gap: 8px;
		padding: 8px 6px;
	}

	.relatia-statistics-rank {
		width: 26px;
		height: 26px;
		font-size: 12px;
	}

	.relatia-statistics-avatar {
		width: 34px;
		height: 34px;
	}

	.relatia-statistics-name {
		font-size: 13px;
	}

	.relatia-statistics-value {
		font-size: 12px;
	}
}
