/*
 * Korotan visual layer for the FanRes Club shortcodes.
 * This file deliberately lives in the theme so FanRes can be updated safely.
 */

.fanres {
	--fanres-blue: var(--blue, #1f458d);
	--fanres-navy: var(--navy, #071b36);
	--fanres-yellow: var(--yellow, #f3b213);
	--fanres-ice: var(--ice, #f2f6fb);
	--fanres-line: var(--line, #dbe3ed);
	--fanres-ink: var(--ink, #0c1b2d);
	--fanres-muted: var(--muted, #5a6878);
	color: var(--fanres-ink);
	font-family: var(--body, Manrope, Arial, sans-serif);
	font-size: 1rem;
}

.fanres a,
.fanres a:visited,
.fanres-report-link,
.fanres-report-link:visited {
	color: var(--fanres-blue);
	text-decoration: none;
}

.fanres a:hover,
.fanres-report-link:hover {
	color: var(--fanres-navy);
	text-decoration: none;
}

/* Panels and system messages */
.fanres-panel,
.fanres-panel--list,
.fanres-summary-card,
.fanres-card,
.fanres-analytics-card {
	border: 1px solid var(--fanres-line);
	border-radius: 0;
	background: #fff;
	box-shadow: none;
}

.fanres-panel {
	margin: 24px 0;
}

.fanres-error,
.fanres-empty,
.fanres-panel--list .fanres-error,
.fanres-panel--list .fanres-empty {
	position: relative;
	margin: 0;
	padding: 15px 17px 15px 21px;
	border: 0;
	border-left: 4px solid var(--fanres-yellow);
	border-radius: 0;
	background: var(--fanres-ice);
	color: var(--fanres-muted);
	font-size: .78rem;
	font-weight: 650;
	line-height: 1.55;
}

.fanres-error strong,
.fanres-empty strong {
	color: var(--fanres-navy);
}

/* Filters */
.fanres-round-label {
	display: grid;
	gap: 7px;
	margin: 0 0 20px;
	color: var(--fanres-blue);
	font-family: FiraSans, sans-serif;
	font-size: .68rem;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.fanres-round-select {
	min-height: 48px;
	padding: 0 42px 0 14px;
	border: 1px solid var(--fanres-line);
	border-radius: 0;
	background-color: #fff;
	color: var(--fanres-ink);
	font-family: var(--body, Manrope, Arial, sans-serif);
	font-size: .82rem;
}

.fanres-round-select:focus {
	border-color: var(--fanres-blue);
	box-shadow: 0 0 0 3px rgba(31, 69, 141, .12);
	outline: 0;
}

/* Tables: standings, scorers and cards */
.fanres-panel--table {
	overflow-x: auto;
	border-top: 4px solid var(--fanres-blue);
}

.fanres-table,
.fanres-table--premium {
	margin: 0;
	border: 0;
	border-collapse: collapse;
	background: #fff;
}

.fanres-table th,
.fanres-table td,
.fanres-table--premium th,
.fanres-table--premium td {
	padding: 14px 16px;
	border: 0;
	border-bottom: 1px solid var(--fanres-line);
	color: var(--fanres-muted);
	font-size: .82rem;
	line-height: 1.45;
}

.fanres-table thead th,
.fanres-table--premium thead th {
	background: var(--fanres-navy);
	color: rgba(255, 255, 255, .78);
	font-family: FiraSans, sans-serif;
	font-size: .64rem;
	font-weight: 600;
	letter-spacing: .11em;
	text-transform: uppercase;
}

.fanres-table tbody tr:nth-child(even),
.fanres-table--premium tbody tr:nth-child(even) {
	background: var(--fanres-ice);
}

.fanres-table tbody tr:last-child td,
.fanres-table--premium tbody tr:last-child td {
	border-bottom: 0;
}

.fanres-cell-strong,
.fanres-cell-badge,
.fanres-table td:first-child {
	color: var(--fanres-ink) !important;
}

.fanres-cell-badge {
	font-family: FiraSans, sans-serif;
	font-weight: 600;
}

.fanres-current-club,
.fanres-current-club:nth-child(even) {
	background: #fff4d4 !important;
	box-shadow: inset 4px 0 0 var(--fanres-yellow);
}

.fanres-current-club td strong {
	color: var(--fanres-blue);
}

/* Compact match cards */
.fanres-summary-card {
	position: relative;
	margin: 0;
	padding: 22px 24px;
	overflow: hidden;
}

.fanres-summary-card::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 4px;
	background: var(--fanres-yellow);
}

.fanres-summary-card__teams {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	gap: 16px;
	color: var(--fanres-navy);
	font-family: FiraSans, sans-serif;
	font-size: clamp(.94rem, 1.8vw, 1.28rem);
	font-weight: 600;
	line-height: 1.22;
	text-align: center;
	text-transform: uppercase;
}

.fanres-summary-card--next-match .fanres-summary-card__team:first-child,
.fanres-summary-card--last-match .fanres-summary-card__team:first-child {
	text-align: right;
}

.fanres-summary-card--next-match .fanres-summary-card__team:last-child,
.fanres-summary-card--last-match .fanres-summary-card__team:last-child {
	text-align: left;
}

.fanres-summary-card__separator {
	color: var(--fanres-yellow);
	font-family: var(--display, FiraSansDisplay, Impact, sans-serif);
	font-size: 1.6rem;
	font-weight: 900;
}

.fanres-summary-card__result a,
.fanres-summary-card__result a:visited,
.fanres-summary-card__result span {
	min-width: 74px;
	min-height: 48px;
	padding: 7px 12px;
	background: var(--fanres-yellow);
	color: var(--fanres-navy);
	font-family: var(--display, FiraSansDisplay, Impact, sans-serif);
	font-size: 1.75rem;
	font-weight: 900;
}

.fanres-summary-card__result a:hover {
	background: #ffca40;
	color: var(--fanres-navy);
	filter: none;
}

.fanres-summary-card__meta {
	margin-top: 12px;
	color: var(--fanres-muted);
	font-size: .7rem;
	font-weight: 650;
	letter-spacing: .025em;
	line-height: 1.5;
	text-align: center;
}

/* Fixtures and results lists */
.fanres-panel--list {
	overflow: hidden;
	border-top: 4px solid var(--fanres-blue);
}

.fanres-results .fanres-schedule-list,
.fanres-matches .fanres-schedule-list,
.fanres-all-results-list .fanres-schedule-list,
.fanres-delegations .fanres-delegations-list,
.fanres-matches .fanres-list {
	padding: 0;
}

.fanres-round-heading {
	position: relative;
	margin: 0;
	padding: 18px 20px 13px 38px;
	background: var(--fanres-ice);
	color: var(--fanres-blue);
	font-family: FiraSans, sans-serif;
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: .12em;
	line-height: 1.25;
	text-transform: uppercase;
}

.fanres-round-heading::before {
	content: "";
	position: absolute;
	left: 20px;
	top: 50%;
	width: 9px;
	height: 9px;
	background: var(--fanres-yellow);
	transform: translateY(-50%) rotate(45deg);
}

.fanres-schedule-row,
.fanres-delegation-row,
.fanres-matches .fanres-item,
.fanres-schedule-row:nth-of-type(even),
.fanres-delegation-row:nth-of-type(even),
.fanres-matches .fanres-item:nth-of-type(even) {
	margin: 0;
	padding: 15px 20px;
	border: 0;
	border-top: 1px solid var(--fanres-line);
	background: #fff;
}

.fanres-schedule-row__teams,
.fanres-matches .fanres-match__teams {
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	gap: 14px;
	padding: 0;
}

.fanres-schedule-row__team,
.fanres-matches .fanres-team {
	color: var(--fanres-ink);
	font-family: FiraSans, sans-serif;
	font-size: .88rem;
	font-weight: 600;
	line-height: 1.35;
}

.fanres-schedule-score,
.fanres-schedule-score:visited,
.fanres-matches .fanres-result a,
.fanres-matches .fanres-result a:visited,
.fanres-matches .fanres-result span {
	min-width: 58px;
	min-height: 38px;
	padding: 6px 9px;
	border: 0;
	border-radius: 0;
	background: var(--fanres-yellow);
	color: var(--fanres-navy);
	font-family: var(--display, FiraSansDisplay, Impact, sans-serif);
	font-size: 1.2rem;
	font-weight: 900;
}

.fanres-schedule-score:hover,
.fanres-matches .fanres-result a:hover {
	background: #ffca40;
	color: var(--fanres-navy);
	filter: none;
	transform: translateY(-1px);
}

.fanres-schedule-score--upcoming,
.fanres-schedule-score--upcoming:visited {
	background: var(--fanres-ice);
	color: var(--fanres-blue);
}

.fanres-schedule-score__main {
	color: inherit;
	font-size: 1.2rem;
	font-weight: 900;
}

.fanres-schedule-score__sub {
	margin-top: 2px;
	color: inherit;
	font-family: var(--body, Manrope, Arial, sans-serif);
	font-size: .58rem;
	font-weight: 750;
}

.fanres-schedule-row__meta,
.fanres-matches .fanres-match__meta,
.fanres-delegation-row__meta {
	margin-top: 8px;
	padding: 0;
	color: var(--fanres-muted);
	font-size: .65rem;
	line-height: 1.45;
	text-align: center;
}

/* Homepage match centre */
.match-panel__content > .fanres,
.match-panel__content > .fanres-panel {
	margin: 0;
}

.match-panel--next .fanres-panel {
	border: 0;
	background: transparent;
}

.match-panel--next .fanres-error,
.match-panel--next .fanres-empty {
	min-height: 72px;
	display: flex;
	align-items: center;
}

.match-panel--results .fanres,
.team-widget--blue .fanres {
	color: #fff;
}

.match-panel--results .fanres-panel,
.match-panel--results .fanres-panel--list,
.match-panel--results .fanres-summary-card,
.team-widget--blue .fanres-panel,
.team-widget--blue .fanres-panel--list,
.team-widget--blue .fanres-summary-card {
	margin: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
}

.match-panel--results .fanres-summary-card::before,
.team-widget--blue .fanres-summary-card::before {
	display: none;
}

.match-panel--results .fanres-summary-card__teams,
.match-panel--results .fanres-summary-card__meta,
.team-widget--blue .fanres-summary-card__teams,
.team-widget--blue .fanres-summary-card__meta {
	color: #fff;
}

.match-panel--results .fanres-summary-card__meta,
.team-widget--blue .fanres-summary-card__meta {
	color: rgba(255, 255, 255, .58);
}

.match-panel--results .fanres-round-heading,
.team-widget--blue .fanres-round-heading {
	padding: 12px 0 10px 18px;
	background: transparent;
	color: var(--fanres-yellow);
	font-size: .64rem;
}

.match-panel--results .fanres-round-heading::before,
.team-widget--blue .fanres-round-heading::before {
	left: 2px;
	width: 7px;
	height: 7px;
}

.match-panel--results .fanres-schedule-row,
.match-panel--results .fanres-schedule-row:nth-of-type(even),
.match-panel--results .fanres-matches .fanres-item,
.team-widget--blue .fanres-schedule-row,
.team-widget--blue .fanres-schedule-row:nth-of-type(even),
.team-widget--blue .fanres-matches .fanres-item {
	padding: 12px 0;
	border-color: rgba(255, 255, 255, .12);
	background: transparent;
}

.match-panel--results .fanres-schedule-row__team,
.match-panel--results .fanres-matches .fanres-team,
.team-widget--blue .fanres-schedule-row__team,
.team-widget--blue .fanres-matches .fanres-team {
	color: #fff;
	font-size: .72rem;
}

.match-panel--results .fanres-schedule-row__meta,
.match-panel--results .fanres-matches .fanres-match__meta,
.team-widget--blue .fanres-schedule-row__meta,
.team-widget--blue .fanres-matches .fanres-match__meta {
	color: rgba(255, 255, 255, .48);
}

.match-panel--results .fanres-error,
.match-panel--results .fanres-empty,
.team-widget--blue .fanres-error,
.team-widget--blue .fanres-empty {
	border-left-color: var(--fanres-yellow);
	background: rgba(255, 255, 255, .07);
	color: rgba(255, 255, 255, .68);
}

.match-panel--results .fanres-all-results-list {
	max-height: 245px;
	overflow-y: auto;
	scrollbar-color: var(--fanres-yellow) rgba(255, 255, 255, .08);
	scrollbar-width: thin;
}

.match-panel--results .fanres-all-results-list::-webkit-scrollbar {
	width: 6px;
}

.match-panel--results .fanres-all-results-list::-webkit-scrollbar-track {
	background: rgba(255, 255, 255, .08);
}

.match-panel--results .fanres-all-results-list::-webkit-scrollbar-thumb {
	background: var(--fanres-yellow);
}

/* Combined homepage feed: one next/last match from every configured selection */
.korotan-matches {
	max-height: 295px;
	overflow-y: auto;
	scrollbar-color: var(--yellow) var(--ice);
	scrollbar-width: thin;
}

.korotan-matches::-webkit-scrollbar {
	width: 5px;
}

.korotan-matches::-webkit-scrollbar-track {
	background: var(--ice);
}

.korotan-matches::-webkit-scrollbar-thumb {
	background: var(--yellow);
}

.korotan-match {
	padding: 13px 4px 14px;
	border-bottom: 1px solid var(--line);
}

.korotan-match:first-child {
	padding-top: 0;
}

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

.korotan-match__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 8px;
	font-size: .6rem;
	font-weight: 750;
	letter-spacing: .055em;
	line-height: 1.3;
	text-transform: uppercase;
}

.korotan-match__selection {
	color: var(--blue);
	font-family: FiraSans, sans-serif;
}

.korotan-match__meta time {
	color: var(--muted);
}

.korotan-match__teams {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	gap: 12px;
}

.korotan-match__team {
	min-width: 0;
	color: var(--ink);
	font-family: FiraSans, sans-serif;
	font-size: .76rem;
	font-weight: 600;
	line-height: 1.3;
}

.korotan-match__team--home {
	text-align: right;
}

.korotan-match__team--away {
	text-align: left;
}

.korotan-match__centre,
.korotan-match__centre a,
.korotan-match__centre a:visited {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 58px;
	min-height: 34px;
	padding: 5px 8px;
	background: var(--yellow);
	color: var(--navy);
	font-family: var(--display);
	font-size: 1rem;
	font-weight: 900;
	line-height: 1;
	text-decoration: none;
}

.korotan-match__centre a {
	margin: -5px -8px;
}

.korotan-match__venue {
	margin-top: 7px;
	color: var(--muted);
	font-size: .58rem;
	line-height: 1.4;
	text-align: center;
}

.match-panel--results .korotan-matches {
	scrollbar-color: var(--yellow) rgba(255, 255, 255, .08);
}

.match-panel--results .korotan-matches::-webkit-scrollbar-track {
	background: rgba(255, 255, 255, .08);
}

.match-panel--results .korotan-match {
	border-color: rgba(255, 255, 255, .11);
}

.match-panel--results .korotan-match__selection {
	color: var(--yellow);
}

.match-panel--results .korotan-match__meta time,
.match-panel--results .korotan-match__venue {
	color: rgba(255, 255, 255, .5);
}

.match-panel--results .korotan-match__team {
	color: #fff;
}

/* Match reports */
.fanres-report-page,
.fanres-report {
	color: var(--fanres-ink);
	font-family: var(--body, Manrope, Arial, sans-serif);
}

.fanres-report-hero {
	border-radius: 0;
	background: linear-gradient(125deg, var(--fanres-blue), var(--fanres-navy));
	box-shadow: none;
}

.fanres-report-score-main,
.fanres-header .score {
	color: var(--fanres-yellow);
	font-family: var(--display, FiraSansDisplay, Impact, sans-serif);
}

.fanres-card {
	border-top: 4px solid var(--fanres-blue);
}

.fanres-card h3,
.fanres-card h4,
.fanres-section-title,
.fanres-analytics-title {
	color: var(--fanres-blue);
	font-family: FiraSans, sans-serif;
	font-weight: 600;
}

.fanres-card h4 {
	border-bottom-color: var(--fanres-yellow);
}

.fanres-analytics-bar-fill {
	background: var(--fanres-blue);
}

.fanres-analytics-chip,
.fanres-player-badge {
	border-radius: 0;
}

@media (max-width: 782px) {
	.match-panel__top {
		overflow: hidden;
	}

	.match-panel__top > a,
	.match-panel__season {
		display: none;
	}

	.fanres-table th,
	.fanres-table td,
	.fanres-table--premium th,
	.fanres-table--premium td {
		padding: 11px 10px;
		font-size: .72rem;
	}

	.fanres-summary-card {
		padding: 17px 15px;
	}

	.fanres-summary-card__teams {
		gap: 8px;
		font-size: .76rem;
	}

	.fanres-summary-card__result a,
	.fanres-summary-card__result a:visited,
	.fanres-summary-card__result span {
		min-width: 52px;
		min-height: 38px;
		padding: 6px 8px;
		font-size: 1.25rem;
	}

	.fanres-round-heading {
		padding: 15px 15px 11px 32px;
		font-size: .68rem;
	}

	.fanres-round-heading::before {
		left: 16px;
	}

	.fanres-schedule-row,
	.fanres-delegation-row,
	.fanres-matches .fanres-item,
	.fanres-schedule-row:nth-of-type(even),
	.fanres-delegation-row:nth-of-type(even),
	.fanres-matches .fanres-item:nth-of-type(even) {
		padding: 12px 10px;
	}

	.fanres-schedule-row__teams,
	.fanres-matches .fanres-match__teams {
		grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr);
		gap: 7px;
	}

	.fanres-schedule-row__team,
	.fanres-matches .fanres-team {
		font-size: .7rem;
	}

	.fanres-schedule-score,
	.fanres-schedule-score:visited,
	.fanres-matches .fanres-result a,
	.fanres-matches .fanres-result a:visited,
	.fanres-matches .fanres-result span {
		min-width: 48px;
		min-height: 34px;
		padding: 5px 6px;
	}

	.fanres-schedule-score__main {
		font-size: 1rem;
	}

	.match-panel--results .fanres-all-results-list {
		max-height: 235px;
	}

	.korotan-matches {
		max-height: 275px;
	}

	.korotan-match__teams {
		grid-template-columns: minmax(0, 1fr) 52px minmax(0, 1fr);
		gap: 7px;
	}

	.korotan-match__team {
		font-size: .68rem;
	}

	.korotan-match__centre,
	.korotan-match__centre a,
	.korotan-match__centre a:visited {
		min-width: 48px;
		font-size: .9rem;
	}
}
