/*
 * Rugby Ignite Rankings — minimal CSS.
 *
 * The bulk of the table styling comes from SportsPress / Rookie theme via
 * the .sp-data-table and .sp-league-table classes. We only add the things
 * SportsPress doesn't already cover: the small team logo before the name,
 * a slightly emphasized Ranking column, and a SportsPress-style title bar.
 */

.sp-template-rir-rankings .sp-table-caption {
	background: #1c2733;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	padding: 12px 16px;
	margin: 0;
	border-top: 3px solid #6cc1d4;
	border-radius: 2px 2px 0 0;
}

.sp-rir-rankings .team-logo {
	width: 24px;
	height: 24px;
	margin-right: 8px;
	vertical-align: middle;
	display: inline-block;
}

.sp-rir-rankings td.data-rating,
.sp-rir-rankings td.data-rank,
.sp-rir-rankings td.data-winpct {
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.sp-rir-rankings tbody tr:nth-child(1) td.data-rank,
.sp-rir-rankings tbody tr:nth-child(2) td.data-rank,
.sp-rir-rankings tbody tr:nth-child(3) td.data-rank {
	font-weight: 600;
}

/* ── Movement column ────────────────────────────────────────────────── */

.sp-rir-rankings td.data-movement {
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
	font-weight: 600;
	text-align: center;
}

.sp-rir-rankings td.rir-movement-up {
	color: #2a7a2a;
}

.sp-rir-rankings td.rir-movement-down {
	color: #c0392b;
}

.sp-rir-rankings td.rir-movement-none {
	color: #888;
	font-weight: 400;
}

.sp-rir-rankings td.rir-movement-new {
	color: #1a73e8;
	font-size: 0.78em;
	font-weight: 700;
	letter-spacing: 0.04em;
}

/* ── Week points column (±Pts) ──────────────────────────────────────── */

.sp-rir-rankings td.data-weekpts {
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
	font-weight: 600;
	text-align: right;
}

.sp-rir-rankings td.rir-weekpts-up {
	color: #2a7a2a;
}

.sp-rir-rankings td.rir-weekpts-down {
	color: #c0392b;
}

.sp-rir-rankings td.rir-weekpts-none {
	color: #888;
	font-weight: 400;
}

/* ── Sortable columns ───────────────────────────────────────────────── */

.sp-rir-rankings th.rir-sort-handle {
	cursor: pointer;
	user-select: none;
	white-space: nowrap;
}

.sp-rir-rankings th.rir-sort-handle:hover {
	opacity: 0.8;
}

.sp-rir-rankings th .rir-sort-icon {
	font-size: 0.75em;
	opacity: 0.7;
	display: inline-block;
	width: 1.2em;
	text-align: center;
}

/* ── Last-updated info box ──────────────────────────────────────────── */

.rugbyignite-last-updated-box {
	box-sizing: border-box;
	max-width: 100%;
	margin: 0 0 16px;
	padding: 12px 16px;
	background: #f7f9fa;
	border: 1px solid #e2e6ea;
	border-left: 3px solid #6cc1d4;
	border-radius: 6px;
	font-size: 13px;
	line-height: 1.45;
	color: #333;
}

.rugbyignite-last-updated-title {
	font-weight: 700;
	font-size: 14px;
	color: #1c2733;
	margin-bottom: 2px;
}

.rugbyignite-last-updated-date {
	font-weight: 600;
	color: #2a3744;
}

.rugbyignite-last-updated-note {
	margin-top: 4px;
	font-size: 12px;
	color: #6b7680;
}

@media (max-width: 480px) {
	.rugbyignite-last-updated-box {
		padding: 10px 12px;
		font-size: 12.5px;
	}
}

/* ── Pagination ─────────────────────────────────────────────────────── */

.rir-pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 4px;
	margin-top: 8px;
	padding: 0 2px;
}

.rir-page-btn {
	display: inline-block;
	min-width: 32px;
	padding: 4px 8px;
	font-size: 0.85em;
	font-weight: 600;
	line-height: 1.4;
	text-align: center;
	border: 1px solid #ccc;
	border-radius: 3px;
	background: #f7f7f7;
	color: #333;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s;
}

.rir-page-btn:hover {
	background: #e0e0e0;
	border-color: #aaa;
}

.rir-page-btn-active {
	background: #1c2733;
	border-color: #1c2733;
	color: #fff;
	cursor: default;
}
