/*
 * PAC Club Data front-end styles.
 * Deliberately theme-neutral: inherits the theme's fonts and text colour.
 * A theme can restyle everything by setting these on .pac-fixtures / .pac-honours or :root.
 */
.pac-fixtures,
.pac-honours,
.pac-upcoming {
	--pac-accent: #1d6b8f;
	--pac-highlight: #f3ce1f;
	--pac-highlight-text: #1a2326;
	--pac-line: color-mix(in srgb, currentColor 15%, transparent);
	--pac-soft: color-mix(in srgb, currentColor 5%, transparent);
	--pac-muted: #5b6467; /* fixed, so nested muted text never compounds below 4.5:1 */
	margin-block: 1.5em;
}

/* ---- Fixtures ---- */

.pac-fixtures__note {
	color: var(--pac-muted);
	font-style: italic;
}

.pac-fixtures__month + .pac-fixtures__month {
	margin-top: 1.75em;
}

.pac-fixtures__month-title {
	margin: 0 0 0.5em;
	padding-bottom: 0.3em;
	border-bottom: 2px solid var(--pac-accent);
}

.pac-fixtures__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.pac-fixture {
	display: grid;
	grid-template-columns: 7.5em 1fr;
	gap: 0.75em;
	align-items: baseline;
	margin: 0;
	padding: 0.6em 0.5em;
	border-bottom: 1px solid var(--pac-line);
}

.pac-fixture__date {
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.pac-fixture__weekday {
	display: inline-block;
	min-width: 2.2em;
	font-weight: 600;
}

.pac-fixture__extra {
	display: inline-block;
	margin-left: 0.4em;
	font-size: 0.85em;
	color: var(--pac-muted);
}

.pac-fixture.is-past {
	color: var(--pac-muted);
}

.pac-fixture.is-past .pac-fixture__weekday {
	font-weight: 400;
}

.pac-fixture.is-off .pac-fixture__session {
	color: var(--pac-muted);
	font-style: italic;
}

.pac-fixture.is-competition {
	box-shadow: inset 3px 0 0 var(--pac-accent);
	font-weight: 600;
}

.pac-fixture.is-next {
	background: color-mix(in srgb, var(--pac-accent) 10%, transparent);
}

.pac-badge {
	display: inline-block;
	margin-left: 0.4em;
	padding: 0.1em 0.55em;
	border-radius: 999px;
	background: var(--pac-accent);
	color: #fff;
	font-size: 0.75em;
	font-weight: 600;
	letter-spacing: 0.02em;
	vertical-align: 0.1em;
}

@media (max-width: 480px) {
	.pac-fixture {
		grid-template-columns: 1fr;
		gap: 0.15em;
	}
}

/* ---- Roll of Honour ---- */

.pac-honours__section + .pac-honours__section {
	margin-top: 2.25em;
}

.pac-honours__title {
	margin-bottom: 0.25em;
}

.pac-honours__description {
	margin-top: 0;
	color: var(--pac-muted);
}

.pac-table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.pac-honours__table {
	width: 100%;
	border-collapse: collapse;
	font-variant-numeric: tabular-nums;
}

.pac-honours__table th,
.pac-honours__table td {
	padding: 0.5em 0.75em;
	border-bottom: 1px solid var(--pac-line);
	text-align: left;
	vertical-align: top;
}

.pac-honours__table thead th {
	border-bottom: 2px solid var(--pac-accent);
	white-space: nowrap;
}

.pac-honours__table tbody th {
	width: 4.5em;
	font-weight: 600;
}

.pac-honours__table tbody tr:nth-child(even) {
	background: var(--pac-soft);
}

.pac-honours__table .is-not-held {
	color: var(--pac-muted);
	font-style: italic;
}

/* ---- Coming up: [pac_fixtures limit="4"] ---- */

.pac-upcoming {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.75rem;
}

.pac-upcoming__item {
	display: grid;
	grid-template-columns: 4.25rem 1fr;
	gap: 1rem;
	align-items: center;
	margin: 0;
}

.pac-upcoming__tile {
	display: grid;
	place-items: center;
	align-content: center;
	height: 4.25rem;
	border-radius: 4px;
	background: var(--pac-accent);
	color: #fff;
	line-height: 1;
	text-align: center;
}

.pac-upcoming__weekday {
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	opacity: 0.85;
}

.pac-upcoming__day {
	font-size: 2rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.pac-upcoming__month {
	font-size: 0.875rem;
	font-weight: 600;
	opacity: 0.85;
}

.pac-upcoming__item.is-next .pac-upcoming__tile {
	background: var(--pac-highlight);
	color: var(--pac-highlight-text);
}

.pac-upcoming__item.is-off .pac-upcoming__tile {
	background: transparent;
	box-shadow: inset 0 0 0 2px var(--pac-line);
	color: var(--pac-muted);
}

.pac-upcoming__item.is-off :is(.pac-upcoming__weekday, .pac-upcoming__month) {
	opacity: 1;
}

.pac-upcoming__session {
	font-weight: 600;
	line-height: 1.3;
}

.pac-upcoming__item.is-off .pac-upcoming__session {
	color: var(--pac-muted);
	font-weight: 400;
}

.pac-upcoming__meta {
	display: block;
	margin-top: 0.15rem;
	color: var(--pac-muted);
	font-size: 0.9375rem;
	font-weight: 400;
}

/* ---- Beginners' courses: [pac_courses] ---- */

.pac-courses {
	--pac-accent: #1d6b8f;
	--pac-line: color-mix(in srgb, currentColor 15%, transparent);
	--pac-muted: #5b6467;
	display: grid;
	gap: 1.25rem;
	margin-block: 1.5em;
}

.pac-course {
	padding: 1.25rem 1.5rem;
	border: 1px solid var(--pac-line);
	border-left: 4px solid var(--pac-accent);
	border-radius: 4px;
}

.pac-course > * {
	margin: 0;
}

.pac-course > * + * {
	margin-top: 0.6rem;
}

.pac-course__title {
	margin: 0;
}

.pac-course__venue,
.pac-course__summary {
	color: var(--pac-muted);
}

.pac-course__places {
	font-weight: 700;
}

.pac-course.is-open {
	border-left-color: var(--pac-highlight, #f3ce1f);
}

.pac-course.is-full .pac-course__status {
	font-weight: 600;
}

/* Fallback buttons for themes without .wp-element-button styles. */
.pac-course__button {
	display: inline-block;
	padding: 0.65em 1.2em;
	border-radius: 4px;
	text-decoration: none;
}

.pac-course__button.is-secondary {
	background: transparent !important;
	color: inherit !important;
	box-shadow: inset 0 0 0 2px currentColor;
}

/* ---- Weather: [pac_weather] ---- */

.pac-weather {
	--pac-accent: #1d6b8f;
	--pac-line: color-mix(in srgb, currentColor 15%, transparent);
	--pac-muted: #5b6467;
	margin-block: 1.5em;
}

.pac-weather__hours {
	width: 100%;
	border-collapse: collapse;
	font-variant-numeric: tabular-nums;
}

.pac-weather__hours :is(th, td) {
	padding: 0.5em 0.75em;
	border-bottom: 1px solid var(--pac-line);
	text-align: left;
	white-space: nowrap;
}

.pac-weather__hours thead th {
	border-bottom: 2px solid var(--pac-accent);
}

.pac-weather__hours .is-gusty {
	font-weight: 700;
	box-shadow: inset 4px 0 0 var(--pac-highlight, #f3ce1f);
}

.pac-weather__days {
	padding-left: 0;
	list-style: none;
}

.pac-weather__days li {
	padding: 0.4em 0;
	border-bottom: 1px solid var(--pac-line);
}

.pac-weather__credit,
.pac-weather-line .pac-weather__credit {
	color: var(--pac-muted);
	font-size: 0.875em;
}

.pac-weather-line {
	margin-top: 0.75rem;
	font-size: 0.9375rem;
}

.pac-weather__unit {
	font-weight: 400;
	color: var(--pac-muted);
}

@media (max-width: 480px) {
	.pac-weather__hours :is(th, td) {
		padding: 0.5em 0.45em;
	}
}

.pac-weather__hours thead th {
	white-space: normal;
	vertical-align: bottom;
}

.pac-weather__unit {
	display: block;
	font-size: 0.85em;
}

/* The description ("Heavy showers") may wrap; numbers stay on one line. */
.pac-weather__hours td:nth-child(2) {
	white-space: normal;
}

@media (max-width: 480px) {
	.pac-weather__hours :is(th, td) {
		padding: 0.5em 0.3em;
	}

	.pac-weather__hours :is(th, td):first-child {
		padding-left: 0;
	}
}
