/* ── TVFL Rankings Widget ─────────────────────────────────────────────────── */

.tvfl-rankings-widget {
	width: 100%;
}

/* ── Tabs ────────────────────────────────────────────────────────────────── */

.tvfl-rk-tabs {
	display: flex;
	gap: 0;
	overflow-x: auto;
	border: 1px solid var(--e-global-color-c31cee6);
	margin-bottom: 20px;
	scrollbar-width: none;
}
.tvfl-rk-tabs::-webkit-scrollbar { display: none; }

.tvfl-rk-tab {
	flex-shrink: 0;
	padding: 8px 30px;
	border: none;
	border-right: 1px solid var(--e-global-color-c31cee6);
	background: transparent;
	color: var(--e-global-color-secondary, #fff);
	font-family: var(--e-global-typography-primary-font-family, "Bebas Neue"), sans-serif;
	font-size: 1.1rem;
	letter-spacing: 0.04em;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s;
	-webkit-appearance: none;
	appearance: none;
}
.tvfl-rk-tab:last-child { border-right: none; }
.tvfl-rk-tab:hover,
.tvfl-rk-tab.is-active {
	background-color: var(--e-global-color-primary, #C61F26);
	color: var(--e-global-color-secondary, #fff);
}

/* ── Layout ──────────────────────────────────────────────────────────────── */

.tvfl-rk-layout {
	display: grid;
	grid-template-columns: 70% 1fr;
	gap: 28px;
	align-items: start;
}
.tvfl-rk-layout > * { min-width: 0; }

/* ── Main — Header ───────────────────────────────────────────────────────── */

.tvfl-rk-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 12px;
}

.tvfl-rk-title {
	flex: 1;
	margin: 0;
	font-family: var(--e-global-typography-primary-font-family, "Bebas Neue"), sans-serif;
	font-weight: 500;
	font-size: 2rem;
	line-height: 1.1;
	color: var(--e-global-color-secondary, #fff);
}

.tvfl-rk-selects {
	display: flex;
	gap: 8px;
	flex-shrink: 0;
}

.tvfl-rk-select {
	padding: 7px 28px 7px 10px;
	border: 1px solid var(--e-global-color-c31cee6);
	border-radius: 4px;
	background-color: transparent;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath fill='%23ffffff' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 8px center;
	background-size: 8px;
	color: var(--e-global-color-secondary, #fff);
	font-size: 0.82rem;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color 0.2s;
	min-width: 120px;
}
.tvfl-rk-select:focus { outline: none; border-color: var(--e-global-color-c31cee6); }
.tvfl-rk-select option { background-color: #1a1a1a; color: #fff; }

/* ── Updated badge ───────────────────────────────────────────────────────── */

.tvfl-rk-updated {
	display: inline-block;
	margin-bottom: 14px;
}
.tvfl-rk-updated span {
	font-size: 0.75rem;
	color: var(--e-global-color-c31cee6);
	font-style: italic;
}

/* ── Table ───────────────────────────────────────────────────────────────── */

.tvfl-rk-table-wrap {
	overflow-x: auto;
	width: 100%;
	-webkit-overflow-scrolling: touch;
}

.tvfl-rk-table {
	width: 100%;
	border-collapse: collapse;
}

.tvfl-rk-table thead tr {
	border-bottom: 2px solid var(--e-global-color-c31cee6);
}
.tvfl-rk-table thead th {
	padding: 10px 12px;
	text-align: left;
	font-family: var(--e-global-typography-primary-font-family, "Bebas Neue"), sans-serif;
	font-size: 0.78rem;
	letter-spacing: 0.07em;
	color: #fff;
	white-space: nowrap;
}
.tvfl-rk-th-rank,
.tvfl-rk-th-record,
.tvfl-rk-th-lw,
.tvfl-rk-th-change { text-align: center; }

.tvfl-rk-table tbody tr {
	border-bottom: 1px solid var(--e-global-color-c31cee6);
	transition: background-color 0.15s;
}
.tvfl-rk-table tbody tr:hover {
	background-color: var(--e-global-color-c31cee6);
}
.tvfl-rk-table tbody td {
	padding: 12px;
	vertical-align: middle;
	color: var(--e-global-color-secondary, #fff);
	font-size: 0.9rem;
}

/* Rank */
.tvfl-rk-td-rank {
	text-align: center;
	width: 52px;
}
.tvfl-rk-rank-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 6px;
	background-color: var(--e-global-color-primary, #C61F26);
	color: #fff;
	font-family: var(--e-global-typography-primary-font-family, "Bebas Neue"), sans-serif;
	font-size: 25px;
	line-height: 1;
	border-radius: 3px;
}

/* Team cell */
.tvfl-rk-team-cell {
	display: flex;
	align-items: center;
	gap: 10px;
}
.tvfl-rk-team-logo {
	width: 36px;
	height: 36px;
	object-fit: contain;
	flex-shrink: 0;
}
.tvfl-rk-team-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.tvfl-rk-team-name {
	font-weight: 600;
	color: var(--e-global-color-secondary, #fff);
	font-size: 1rem;
}
.tvfl-rk-team-loc {
	font-size: 0.72rem;
	color: var(--e-global-color-c31cee6);
}

/* Record / Last Week / Change */
.tvfl-rk-td-record,
.tvfl-rk-td-lw,
.tvfl-rk-td-change { text-align: center; }

/* Change icons */
.tvfl-rk-change-up {
	color: #22c55e;
	font-size: 0.82rem;
	font-weight: 600;
	white-space: nowrap;
}
.tvfl-rk-change-down {
	color: #ef4444;
	font-size: 0.82rem;
	font-weight: 600;
	white-space: nowrap;
}
.tvfl-rk-change-neutral {
	color: var(--e-global-color-c31cee6);
}

/* ── See More ────────────────────────────────────────────────────────────── */

.tvfl-rk-more-wrap {
	display: flex;
	justify-content: center;
	margin-top: 20px;
}
.tvfl-rk-see-more {
	padding: 10px 36px;
	background-color: transparent !important;
	color: var(--e-global-color-secondary, #fff);
	border: none;
	border-radius: 5px;
	font-family: var(--e-global-typography-primary-font-family, "Bebas Neue"), sans-serif;
	font-size: 1rem;
	letter-spacing: 0.06em;
	cursor: pointer;
	transition: opacity 0.2s;
	-webkit-appearance: none;
	appearance: none;
	border: 1px solid var(--e-global-color-c31cee6, #E0E0E021) !important;
	width: 100%;
}
.tvfl-rk-see-more:hover    {
	background-color: var(--e-global-color-primary, #C61F26) !important;
	border: 1px solid var(--e-global-color-primary, #C61F26) !important;
	color: var(--e-global-color-secondary, #fff);
}
.tvfl-rk-see-more:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Footer note ─────────────────────────────────────────────────────────── */

.tvfl-rk-footer-note {
	margin-top: 14px;
	font-size: 0.75rem;
	color: var(--e-global-color-c31cee6);
	font-style: italic;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */

.tvfl-rk-sidebar {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.tvfl-rk-sec {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.tvfl-rk-sec-label {
	margin: 0;
	font-family: var(--e-global-typography-primary-font-family, "Bebas Neue"), sans-serif;
	font-style: normal;
	font-weight: 500;
	font-size: 32px;
	line-height: 32px;
	color: var(--e-global-color-secondary, #fff);
}

.tvfl-rk-sec-body {
	border: 1px solid var(--e-global-color-c31cee6);
	border-radius: 6px;
	padding: 16px;
}

/* Rankings by division */
.tvfl-rk-sidebar-div {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
}
.tvfl-rk-sidebar-div li {
	padding: 3px;
	font-size: 0.88rem;
	color: var(--e-global-color-secondary, #fff);

}
.tvfl-rk-sidebar-div li:hover {
	border: 1px solid var(--e-global-color-primary, #C61F26);
	border-radius: 5px;
	color: var(--e-global-color-primary, #C61F26);
}

/* About */
.tvfl-rk-about-text {
	margin: 0 0 12px;
	font-size: 0.85rem;
	color: var(--e-global-color-secondary, #fff);
	line-height: 1.6;
}
.tvfl-rk-about-text:last-child { margin-bottom: 0; }

.tvfl-rk-about-list {
	list-style: none;
	padding: 0;
	margin: 0 0 12px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.tvfl-rk-about-list li {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 0.85rem;
	color: var(--e-global-color-secondary, #fff);
	line-height: 1.4;
}
.tvfl-rk-check {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	border: 1.5px solid var(--e-global-color-primary, #C61F26);
	border-radius: 50%;
	color: var(--e-global-color-primary, #C61F26);
	font-size: 10px;
	line-height: 1;
}

/* Past champions */
.tvfl-rk-champs-list {
	list-style: none;
	padding: 0;
	margin: 0 0 12px;
	display: flex;
	flex-direction: column;
}
.tvfl-rk-champ-item {
	display: flex;
	gap: 10px;
	padding: 7px 0;
	font-size: 0.88rem;
	color: var(--e-global-color-secondary, #fff);
}
.tvfl-rk-champs-list li:last-child { border-bottom: none; }
.tvfl-rk-champ-item strong {
	color: var(--e-global-color-secondary, #fff);
	min-width: 42px;
	flex-shrink: 0;
}
.tvfl-rk-champ-hidden { display: none !important; }

.tvfl-rk-view-all {
	padding: 6px 18px;
	border: 1px solid var(--e-global-color-c31cee6, #E0E0E021) !important;
	border-radius: 3px;
	background: transparent;
	color: var(--e-global-color-secondary, #fff) !important;
	font-family: var(--e-global-typography-primary-font-family, "Bebas Neue"), sans-serif;
	font-size: 0.9rem;
	letter-spacing: 0.05em;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s;
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
}
.tvfl-rk-view-all:hover {
	background-color: var(--e-global-color-primary, #C61F26);
	border: 1px solid var(--e-global-color-primary, #C61F26) !important;
	color: var(--e-global-color-secondary, #fff) !important;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
	.tvfl-rk-layout {
		grid-template-columns: 1fr;
	}
	.tvfl-rk-sidebar {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 20px;
		align-items: start;
	}
}

@media (max-width: 767px) {
	.tvfl-rk-header {
		flex-direction: column;
		align-items: stretch;
	}
	.tvfl-rk-selects {
		width: 100%;
	}
	.tvfl-rk-select {
		flex: 1;
		min-width: 0;
	}
	.tvfl-rk-sidebar {
		grid-template-columns: 1fr;
	}
	.tvfl-rk-title { font-size: 1.5rem; }
}

@media (max-width: 480px) {
	.tvfl-rk-team-logo { width: 28px; height: 28px; }
	.tvfl-rk-table tbody td { padding: 10px 8px; }
	.tvfl-rk-table { min-width: 520px; }
}
