.afls {
	--afls-green: #0b6e3f;
	--afls-gold: #f2b705;
	--afls-red: #c1272d;
	--afls-ink: #14181b;
	--afls-line: #e3e6e8;
	--afls-muted: #6b7379;
	--afls-bg: #fff;
	font-size: 15px;
	color: var(--afls-ink);
}

.afls * {
	box-sizing: border-box;
}

/* Tabs */
.afls-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 2px;
	border-bottom: 2px solid var(--afls-line);
	margin-bottom: 18px;
}

.afls-tab {
	appearance: none;
	background: none;
	border: 0;
	border-bottom: 3px solid transparent;
	margin-bottom: -2px;
	padding: 10px 14px;
	font: inherit;
	font-weight: 600;
	color: var(--afls-muted);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.afls-tab:hover {
	color: var(--afls-ink);
}

.afls-tab.is-active {
	color: var(--afls-green);
	border-bottom-color: var(--afls-green);
}

.afls-live-count {
	background: var(--afls-red);
	color: #fff;
	border-radius: 10px;
	padding: 1px 7px;
	font-size: 12px;
	line-height: 1.6;
}

.afls-live-count:empty,
.afls-live-count[data-afls-live-count="0"] {
	display: none;
}

.afls-panel {
	display: none;
}

.afls-panel.is-active {
	display: block;
}

/* Competition headings */
.afls-comp {
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: .04em;
	margin: 22px 0 8px;
	padding-bottom: 6px;
	border-bottom: 1px solid var(--afls-line);
	color: var(--afls-green);
}

.afls-comp .afls-country {
	color: var(--afls-muted);
	font-weight: 400;
	text-transform: none;
	letter-spacing: 0;
}

/* Match rows */
.afls-matches {
	list-style: none;
	margin: 0;
	padding: 0;
}

.afls-match {
	display: grid;
	grid-template-columns: 58px 1fr auto 1fr;
	align-items: center;
	gap: 10px;
	padding: 9px 6px;
	border-bottom: 1px solid var(--afls-line);
}

.afls-match:last-child {
	border-bottom: 0;
}

.afls-state {
	font-size: 12px;
	font-weight: 700;
	color: var(--afls-muted);
	text-align: center;
}

.afls-match.is-live .afls-state {
	color: var(--afls-red);
}

.afls-match.is-live .afls-state::after {
	content: "";
	display: inline-block;
	width: 6px;
	height: 6px;
	margin-left: 5px;
	border-radius: 50%;
	background: var(--afls-red);
	animation: afls-pulse 1.4s infinite;
}

@keyframes afls-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: .25; }
}

.afls-team {
	display: flex;
	align-items: center;
	gap: 7px;
	min-width: 0;
}

.afls-team img {
	width: 20px;
	height: 20px;
	object-fit: contain;
	flex: 0 0 20px;
}

.afls-away {
	flex-direction: row-reverse;
	text-align: right;
}

.afls-score {
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
	padding: 2px 9px;
	background: #f4f6f7;
	border-radius: 4px;
}

.afls-match.is-live .afls-score {
	background: var(--afls-green);
	color: #fff;
}

.afls-score span {
	opacity: .5;
	margin: 0 2px;
}

.afls-meta {
	grid-column: 2 / -1;
	font-size: 12px;
	color: var(--afls-muted);
}

.afls-meta:empty {
	display: none;
}

.afls-updated {
	font-size: 12px;
	color: var(--afls-muted);
	margin: 0 0 6px;
}

.afls-empty {
	color: var(--afls-muted);
	padding: 18px 0;
}

/* Tables */
.afls-table {
	border: 1px solid var(--afls-line);
	border-radius: 6px;
	margin-bottom: 10px;
	background: var(--afls-bg);
}

.afls-table > summary {
	cursor: pointer;
	padding: 11px 14px;
	font-weight: 600;
	list-style-position: inside;
}

.afls-table[open] > summary {
	border-bottom: 1px solid var(--afls-line);
	color: var(--afls-green);
}

.afls-scroll {
	overflow-x: auto;
}

.afls-table table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.afls-table th,
.afls-table td {
	padding: 7px 9px;
	text-align: center;
	border-bottom: 1px solid var(--afls-line);
	white-space: nowrap;
}

.afls-table th {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .03em;
	color: var(--afls-muted);
	background: #fafbfb;
}

.afls-table-team {
	text-align: left !important;
	display: flex;
	align-items: center;
	gap: 7px;
}

.afls-table-team img {
	width: 18px;
	height: 18px;
	object-fit: contain;
}

.afls-face {
	border-radius: 50%;
}

.afls-pts {
	font-weight: 700;
}

.afls-table .afls-updated {
	padding: 8px 14px;
	margin: 0;
}

/* Compact sidebar variant */
.afls-compact .afls-match {
	grid-template-columns: 46px 1fr auto 1fr;
	font-size: 13px;
	padding: 7px 2px;
}

.afls-compact .afls-meta {
	display: none;
}

@media (max-width: 560px) {
	.afls-match {
		grid-template-columns: 46px 1fr auto 1fr;
		font-size: 14px;
		gap: 6px;
	}

	.afls-team img {
		display: none;
	}
}
