/**
 * Shared component — fixtures (template-parts/components/next-match-card.php,
 * fixture-card.php, result-row.php) plus the month groups, form chips and
 * "Show N more" button that list them. Used by Match Centre; reusable on Home.
 *
 * 1. Next Match Card
 * 2. Fixture Month Group
 * 3. Fixture Card
 * 4. Result Row
 * 5. Form Chips
 * 6. Show More
 * 7. Responsive
 */

/* ============================ NEXT MATCH CARD ============================ */
.next-match {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
	overflow: hidden;
	border-radius: var(--radius-lg);
	background: var(--black);
	color: var(--white);
}

.next-match__main {
	display: flex;
	flex-direction: column;
	gap: calc(34 * var(--u));
	padding: var(--space-56) var(--space-60) calc(108 * var(--u));
}

.next-match__flag {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-12);
	font-size: var(--fs-24);
	line-height: 1.55;
}

.next-match__badge {
	padding: var(--space-6) var(--space-14);
	border-radius: var(--radius-sm);
	background: var(--accent-color);
	color: var(--black);
	font-weight: var(--font-weight-black);
}

.next-match__countdown {
	color: var(--text-color-light);
	font-weight: var(--font-weight-bold);
}

.next-match__teams {
	display: flex;
	flex-direction: column;
	gap: calc(17 * var(--u));
}

.next-match__side {
	display: flex;
	align-items: center;
	gap: var(--space-24);
}

.next-match__disc {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: calc(96 * var(--u));
	height: calc(96 * var(--u));
	min-width: 56px;
	min-height: 56px;
	overflow: hidden;
	border-radius: var(--radius-full);
	background: var(--dark-surface);
	color: var(--white);
	font-size: var(--fs-32);
	font-weight: var(--font-weight-black);
	line-height: 1;
}

.next-match__disc--crest {
	background: var(--white);
}

.next-match__disc img {
	width: 73%;
	height: 73%;
	object-fit: contain;
}

.next-match__club {
	font-size: calc(50.7 * var(--u));
	font-weight: var(--font-weight-black);
	letter-spacing: -0.025em;
	line-height: 1.05;
	color: var(--white);
}

.next-match__vs {
	padding-left: calc(34 * var(--u));
	font-size: var(--fs-h4);
	font-weight: var(--font-weight-bold);
	line-height: 1.55;
	color: var(--muted-color);
}

.next-match__pills {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-10);
	margin: 0;
	padding: 0;
	list-style: none;
}

.next-match__pill {
	padding: var(--space-8) calc(17 * var(--u));
	border: var(--stroke-thin) solid var(--border-darker);
	border-radius: var(--radius-pill);
	font-size: var(--fs-24);
	font-weight: var(--font-weight-bold);
	line-height: 1.55;
	color: var(--pill-text-dark);
}

.next-match__pill--venue-type {
	border-color: var(--white);
	background: var(--white);
	color: var(--black);
}

.next-match__panel {
	display: flex;
	flex-direction: column;
	padding: var(--space-56) calc(52 * var(--u)) var(--space-56);
	background: var(--dark-panel);
}

.next-match__facts {
	margin: 0;
}

.next-match__fact {
	display: flex;
	flex-direction: column;
	gap: var(--space-4);
	padding: var(--space-24) 0 calc(23 * var(--u));
	border-bottom: var(--stroke-thin) solid var(--dark-surface);
}

.next-match__fact:first-child {
	padding-top: 0;
}

.next-match__fact dt {
	font-size: var(--fs-24);
	font-weight: var(--font-weight-regular);
	line-height: 1.55;
	color: var(--muted-color);
}

.next-match__fact dd {
	margin: 0;
	font-size: var(--fs-36);
	font-weight: var(--font-weight-black);
	letter-spacing: -0.015em;
	line-height: 1.15;
	color: var(--white);
}

.next-match__fact--kickoff dd {
	font-size: calc(53.3 * var(--u));
	letter-spacing: -0.015em;
	color: var(--accent-color);
}

.next-match__cta {
	padding-top: var(--space-30);
}

/* ============================ FIXTURE MONTH GROUP ============================ */
.fixture-month__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--space-10) var(--space-24);
	padding-bottom: var(--space-12);
}

.fixture-month__head--light {
	margin-bottom: var(--space-24);
	border-bottom: var(--stroke) solid var(--border-color);
}

.fixture-month__head--strong {
	border-bottom: var(--stroke-bold) solid var(--black);
}

.fixture-month__title {
	font-size: calc(37.3 * var(--u));
	font-weight: var(--font-weight-black);
	letter-spacing: -0.02em;
	line-height: 1.02;
	color: var(--heading-color);
}

.fixture-month__head--strong .fixture-month__title {
	font-size: calc(34.7 * var(--u));
	letter-spacing: -0.015em;
}

.fixture-month__count {
	font-size: var(--fs-24);
	font-weight: var(--font-weight-medium);
	line-height: 1.55;
	color: var(--text-color);
}

.fixture-month__head--strong .fixture-month__count {
	font-weight: var(--font-weight-regular);
}

.fixture-month__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--space-28);
}

/* ============================ FIXTURE CARD ============================ */
.fixture-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: var(--stroke-thin) solid var(--border-color);
	border-radius: var(--radius-lg);
	background: var(--white);
}

.fixture-card__top {
	display: flex;
	align-items: center;
	gap: var(--space-18);
	padding: calc(22 * var(--u)) var(--space-24) calc(23 * var(--u));
	border-bottom: var(--stroke-thin) solid var(--border-color);
}

.fixture-card__date {
	display: flex;
	flex: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: calc(84 * var(--u));
	height: calc(84 * var(--u));
	min-width: 60px;
	min-height: 60px;
	border-radius: var(--radius-lg);
	background: var(--primary-color);
	color: var(--white);
	text-align: center;
}

.fixture-card__day {
	font-size: var(--fs-stat);
	font-weight: var(--font-weight-black);
	letter-spacing: -0.03em;
	line-height: 1;
}

.fixture-card__month {
	padding-top: var(--space-4);
	font-size: var(--fs-24);
	font-weight: var(--font-weight-bold);
	line-height: 1;
}

.fixture-card__when {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-width: 0;
}

.fixture-card__time {
	font-size: calc(37.3 * var(--u));
	font-weight: var(--font-weight-black);
	letter-spacing: -0.02em;
	line-height: 1.05;
	color: var(--heading-color);
	white-space: nowrap;
}

.fixture-card__weekday {
	font-size: var(--fs-24);
	line-height: 1.55;
	color: var(--text-color);
}

.fixture-card__badge {
	flex: none;
	align-self: center;
}

.fixture-card__teams {
	display: flex;
	flex-direction: column;
	gap: var(--space-8);
	padding: var(--space-24) var(--space-24) var(--space-18);
}

.fixture-card__side {
	display: flex;
	align-items: center;
	gap: var(--space-16);
}

.fixture-card__crest,
.fixture-card__initials {
	width: calc(54 * var(--u));
	height: calc(54 * var(--u));
}

.fixture-card__club {
	font-size: var(--fs-card-title);
	font-weight: var(--font-weight-bold);
	line-height: 1.2;
	color: var(--heading-color);
}

.fixture-card__club--ours {
	font-weight: var(--font-weight-black);
}

.fixture-card__vs {
	padding-left: var(--space-16);
	font-size: var(--fs-24);
	font-weight: var(--font-weight-bold);
	line-height: 1.55;
	color: var(--text-color);
}

.fixture-card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-10);
	padding: 0 var(--space-24) calc(22 * var(--u));
}

.fixture-card__team {
	padding: var(--space-6) var(--space-14);
}

.fixture-card__comp {
	font-size: var(--fs-24);
	line-height: 1.55;
	color: var(--text-color);
}

.fixture-card__venue {
	display: flex;
	align-items: center;
	gap: var(--space-12);
	margin-top: auto;
	padding: calc(19 * var(--u)) var(--space-24) var(--space-18);
	border-top: var(--stroke-thin) solid var(--border-color);
	font-size: var(--fs-24);
	line-height: 1.55;
	color: var(--heading-color);
}

.fixture-card__pin {
	color: var(--primary-color);
}

.fixture-card__venue-name {
	flex: 1 1 auto;
	min-width: 0;
	font-weight: var(--font-weight-medium);
}

.fixture-card__directions {
	display: inline-flex;
	flex: none;
	align-items: center;
	gap: var(--space-6);
	font-weight: var(--font-weight-bold);
}

.fixture-card__arrow {
	display: inline-flex;
	width: calc(20 * var(--u));
	height: calc(20 * var(--u));
	min-width: 14px;
	min-height: 14px;
	transition: transform var(--transition-base);
}

.fixture-card__arrow svg {
	width: 100%;
	height: 100%;
}

a.fixture-card__venue:hover .fixture-card__directions {
	color: var(--primary-color);
}

a.fixture-card__venue:hover .fixture-card__arrow {
	transform: translateX(var(--space-4));
}

/* ============================ RESULT ROW ============================ */
.result-row {
	display: grid;
	grid-template-columns: calc(110 * var(--u)) minmax(0, 1.05fr) minmax(0, 2.4fr) minmax(0, 1fr);
	align-items: center;
	gap: var(--space-28);
	padding: var(--space-28) calc(31 * var(--u)) calc(29 * var(--u));
	border: var(--stroke-thin) solid var(--border-color);
	border-top: 0;
	background: var(--white);
}

.result-row__date {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-8);
	text-align: center;
}

.result-row__day {
	font-size: calc(38 * var(--u));
	font-weight: var(--font-weight-black);
	letter-spacing: -0.038em;
	line-height: 1.26;
	color: var(--heading-color);
}

.result-row__dow {
	font-size: var(--fs-24);
	line-height: 1;
	color: var(--text-color);
	white-space: nowrap;
}

.result-row__info {
	display: flex;
	flex-direction: column;
	gap: var(--space-4);
	min-width: 0;
}

.result-row__comp {
	font-size: var(--fs-22);
	font-weight: var(--font-weight-bold);
	line-height: 1.44;
	color: var(--heading-color);
}

.result-row__team {
	font-size: var(--fs-24);
	line-height: 1.55;
	color: var(--text-color);
}

.result-row__score {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	gap: calc(22 * var(--u));
}

.result-row__side {
	display: flex;
	align-items: center;
	gap: var(--space-16);
	min-width: 0;
}

.result-row__side--home {
	justify-content: flex-end;
	text-align: right;
}

.result-row__crest,
.result-row__initials {
	width: calc(56 * var(--u));
	height: calc(56 * var(--u));
}

.result-row__club {
	min-width: 0;
	overflow-wrap: anywhere;
	font-size: var(--fs-20);
	font-weight: var(--font-weight-bold);
	line-height: 1.25;
	color: var(--heading-color);
}

.result-row__club--ours {
	font-weight: var(--font-weight-black);
}

.result-row__nums {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: calc(201 * var(--u));
	min-width: 130px;
	min-height: calc(57 * var(--u));
	padding: var(--space-10) var(--space-20);
	border-radius: var(--radius-md);
	background: var(--black);
	color: var(--white);
	font-size: calc(37.3 * var(--u));
	font-weight: var(--font-weight-black);
	letter-spacing: -0.02em;
	line-height: 1;
	white-space: nowrap;
}

.result-row__nums--pending {
	background: var(--light-bg);
	color: var(--text-color);
	font-size: var(--fs-24);
	font-weight: var(--font-weight-medium);
	letter-spacing: 0;
	line-height: 1.55;
}

.result-row__status {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: calc(7.5 * var(--u));
}

.result-row__badge {
	padding: calc(7.5 * var(--u)) var(--space-18);
	font-size: var(--fs-22);
}

.result-row__ft {
	font-size: var(--fs-24);
	line-height: 1.55;
	color: var(--text-color);
}

/* ============================ FORM CHIPS ============================ */
.form-chip {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: calc(44 * var(--u));
	height: calc(44 * var(--u));
	min-width: 28px;
	min-height: 28px;
	border-radius: var(--radius-md);
	font-size: var(--fs-24);
	font-weight: var(--font-weight-black);
	line-height: 1;
	color: var(--white);
}

.form-chip--w {
	background: var(--accent-dark);
}

.form-chip--l {
	background: var(--primary-color);
}

.form-chip--d {
	background: var(--form-draw);
	color: var(--black);
}

/* Small variant (league table "Last 5") — brighter win chip, dark text */
.form-chip--sm {
	width: calc(36 * var(--u));
	height: calc(36 * var(--u));
	min-width: 24px;
	min-height: 24px;
	border-radius: var(--radius-sm);
}

.form-chip--sm.form-chip--w {
	background: var(--accent-color);
	color: var(--black);
}

/* ============================ SHOW MORE ============================ */
.reveal-more {
	display: flex;
	justify-content: center;
	padding-top: var(--space-12);
}

.reveal-more__btn {
	min-height: 0;
	padding: calc(19.5 * var(--u)) var(--space-40);
}

/* ============================ RESPONSIVE ============================ */

/* --- LG --- */
@media (max-width: 1200px) {
	.fixture-month__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.result-row {
		grid-template-columns: 72px minmax(0, 1fr) minmax(0, 2.4fr);
	}

	.result-row__status {
		grid-column: 2 / -1;
		flex-direction: row;
		align-items: center;
		gap: 12px;
	}
}

/* --- MD / Tablet --- */
@media (max-width: 992px) {
	.next-match {
		grid-template-columns: minmax(0, 1fr);
	}

	.next-match__main {
		gap: 24px;
		padding: 36px 32px;
	}

	.next-match__club {
		font-size: 32px;
	}

	.next-match__vs {
		font-size: 20px;
	}

	.next-match__panel {
		padding: 32px;
	}

	.next-match__fact dd {
		font-size: 26px;
	}

	.next-match__fact--kickoff dd {
		font-size: 36px;
	}

	.result-row {
		grid-template-columns: 64px minmax(0, 1fr);
		gap: 16px 20px;
		padding: 20px;
	}

	.result-row__date {
		grid-row: span 2;
	}

	.result-row__score {
		grid-column: 2;
	}

	.result-row__status {
		grid-column: 2;
	}

	.result-row__day {
		font-size: 30px;
	}

	.result-row__comp {
		font-size: 18px;
	}

	.result-row__club {
		font-size: 16px;
	}

	.result-row__nums {
		width: auto;
		min-width: 96px;
		min-height: 44px;
		font-size: 26px;
	}

	.result-row__nums--pending {
		font-size: 15px;
	}
}

/* --- SM / Mobile --- */
@media (max-width: 768px) {
	.fixture-month__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
	}

	.fixture-month__title,
	.fixture-month__head--strong .fixture-month__title {
		font-size: 24px;
	}

	.fixture-card__time {
		font-size: 24px;
	}

	.fixture-card__club {
		font-size: 19px;
	}

	.next-match__main {
		padding: 28px 20px;
	}

	.next-match__panel {
		padding: 28px 20px;
	}

	.next-match__side {
		gap: 14px;
	}

	.next-match__club {
		font-size: 26px;
	}

	.next-match__vs {
		padding-left: 14px;
	}
}

/* --- XS / Small Mobile --- */
@media (max-width: 575px) {
	.result-row {
		grid-template-columns: minmax(0, 1fr);
		gap: 14px;
		padding: 18px 16px;
	}

	.result-row__date {
		grid-row: auto;
		flex-direction: row;
		align-items: baseline;
		gap: 10px;
	}

	.result-row__score,
	.result-row__status {
		grid-column: 1;
	}

	.result-row__score {
		gap: 8px;
	}

	.result-row__side {
		flex-direction: column;
		gap: 4px;
		text-align: center;
	}

	.result-row__side--home {
		flex-direction: column-reverse;
		text-align: center;
	}

	.result-row__club {
		font-size: 14px;
	}

	.result-row__crest,
	.result-row__initials {
		width: 34px;
		height: 34px;
	}

	.result-row__nums {
		min-width: 72px;
		padding: 8px 10px;
		font-size: 22px;
	}

	.result-row__nums--pending {
		min-width: 0;
		font-size: 13px;
		white-space: normal;
		text-align: center;
	}

	.fixture-card__top {
		flex-wrap: wrap;
	}
}
