.wppl-standings {
	width: 100%;
	max-width: 100%;
	font-family: inherit;
	box-sizing: border-box;
	background-color: var(--wppl-standings-bg, #FFFFFF);
	border-radius: var(--wppl-standings-radius, 16px);
	padding: var(--wppl-standings-padding, 0px);
	box-shadow: var(--wppl-standings-shadow, 0 12px 30px rgba(20, 30, 60, 0.08));
	overflow: hidden;
}

.wppl-standings *,
.wppl-standings *::before,
.wppl-standings *::after {
	box-sizing: border-box;
}

.wppl-standings-header {
	display: grid;
	grid-template-columns: 44px 1fr 50px 50px 50px 50px 60px 24px;
	align-items: center;
	padding: 16px 28px;
	letter-spacing: 1px;
	font-size: 12px;
	font-weight: 700;
	column-gap: 8px;
}

/* When the PF (Points For) column has data, add an extra track for it.
   Left as the default 8-column layout otherwise so the column collapses
   away completely rather than leaving an empty gap. */
.wppl-standings.has-pf .wppl-standings-header,
.wppl-standings.has-pf .wppl-standings-row {
	grid-template-columns: 44px 1fr 50px 50px 50px 50px 50px 60px 24px;
}

.wppl-standings-header span {
	text-transform: uppercase;
}

.wppl-col-head-rank,
.wppl-col-head-team {
	text-align: left;
}

.wppl-col-head-w,
.wppl-col-head-l,
.wppl-col-head-mw,
.wppl-col-head-ml,
.wppl-col-head-pf,
.wppl-col-head-pts {
	text-align: center;
}

.wppl-standings-rows {
	display: flex;
	flex-direction: column;
}

.wppl-standings-row {
	display: grid;
	grid-template-columns: 44px 1fr 50px 50px 50px 50px 60px 24px;
	align-items: center;
	column-gap: 8px;
	padding: 18px 28px;
	border-bottom: 1px solid #EDEFF3;
	transition: background-color 0.2s ease;
}

.wppl-standings-rows .wppl-standings-row:last-child {
	border-bottom: none;
}

.wppl-standings-row.is-leader {
	position: relative;
}

.wppl-rank {
	font-size: 15px;
	font-weight: 800;
	color: #FFFFFF;
	background-color: #3B6EF5;
	width: 32px;
	height: 32px;
	border-radius: 10px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.wppl-team {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	gap: 2px;
	min-width: 0;
}

.wppl-team-name {
	font-size: 16px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.2px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
}

.wppl-team-subtitle {
	font-size: 12px;
	font-weight: 500;
	color: #8A94A6;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
}

.wppl-col-w,
.wppl-col-l,
.wppl-col-mw,
.wppl-col-ml,
.wppl-col-pf {
	font-size: 15px;
	font-weight: 700;
	text-align: center;
}

.wppl-col-pts {
	font-size: 18px;
	font-weight: 800;
	text-align: center;
}

.wppl-chevron {
	font-size: 20px;
	line-height: 1;
	text-align: center;
	font-weight: 700;
}

.wppl-standings-legend {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 24px;
	padding: 18px 28px;
	border-top: 1px solid #EDEFF3;
}

.wppl-legend-item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	font-weight: 500;
	white-space: nowrap;
}

.wppl-legend-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	flex-shrink: 0;
}

/* ---- Responsive ---- */

@media (max-width: 900px) {
	.wppl-standings-header,
	.wppl-standings-row {
		grid-template-columns: 36px 1fr 40px 40px 40px 40px 50px 18px;
		padding: 16px 20px;
	}
	.wppl-standings.has-pf .wppl-standings-header,
	.wppl-standings.has-pf .wppl-standings-row {
		grid-template-columns: 36px 1fr 40px 40px 40px 40px 40px 50px 18px;
	}
	.wppl-standings-legend {
		padding: 16px 20px;
		gap: 16px;
	}
}

@media (max-width: 680px) {
	.wppl-standings-header,
	.wppl-standings-row {
		grid-template-columns: 30px 1fr 32px 32px 32px 32px 42px;
		padding: 14px 16px;
	}
	.wppl-standings.has-pf .wppl-standings-header,
	.wppl-standings.has-pf .wppl-standings-row {
		grid-template-columns: 30px 1fr 32px 32px 32px 32px 32px 42px;
	}
	.wppl-col-head-chevron,
	.wppl-chevron {
		display: none;
	}
	.wppl-rank {
		width: 26px;
		height: 26px;
		border-radius: 8px;
		font-size: 13px;
	}
	.wppl-team-name {
		font-size: 13px;
	}
	.wppl-team-subtitle {
		font-size: 11px;
	}
	.wppl-col-w, .wppl-col-l, .wppl-col-mw, .wppl-col-ml {
		font-size: 12px;
	}
	.wppl-col-pts {
		font-size: 14px;
	}
}

@media (max-width: 460px) {
	.wppl-standings-header {
		display: none;
	}
	.wppl-standings-row {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		row-gap: 10px;
		column-gap: 8px;
		padding: 14px 16px;
	}
	.wppl-rank {
		flex: 0 0 auto;
	}
	.wppl-team {
		flex: 1 1 auto;
		min-width: 0;
	}
	.wppl-col-w,
	.wppl-col-l,
	.wppl-col-mw,
	.wppl-col-ml,
	.wppl-col-pf,
	.wppl-col-pts {
		flex: 0 0 auto;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		font-size: 12px;
		padding: 3px 9px;
		border-radius: 6px;
		background-color: #F7F9FC;
	}
	.wppl-col-w::before { content: 'W '; opacity: 0.6; font-weight: 600; margin-right: 3px; }
	.wppl-col-l::before { content: 'L '; opacity: 0.6; font-weight: 600; margin-right: 3px; }
	.wppl-col-mw::before { content: 'MW '; opacity: 0.6; font-weight: 600; margin-right: 3px; }
	.wppl-col-ml::before { content: 'ML '; opacity: 0.6; font-weight: 600; margin-right: 3px; }
	.wppl-col-pf::before { content: 'PF '; opacity: 0.6; font-weight: 600; margin-right: 3px; }
	.wppl-col-pts::before { content: 'PTS '; opacity: 0.6; font-weight: 600; margin-right: 3px; }
}
