/**
 * SPCC Golf Schedule — [spcc_golf_schedule] (inc/golf-schedule.php).
 *
 * Matches the membership card vocabulary: cream panels, gold accent, navy
 * text, Times serif titles, Roboto body, square corners (site shape lock),
 * outlined gold button. Rows are separate cream panels with a gap, not
 * ruled table rows.
 */

.spcc-golf-schedule {
	--gs-bg: #f5efe6;
	--gs-accent: #b89968;
	--gs-ink: var(--spcc-navy, #0b1c48);
	--gs-muted: var(--spcc-dark-blue, #142d6e);
	color: var(--gs-ink);
	text-align: left;
	margin-top: 40px;
}

.spcc-golf-schedule__month + .spcc-golf-schedule__month {
	margin-top: 48px;
}

/* The child theme sets h3/h4 font-size + line-height with !important
   (style.css "TYPOGRAPHY DEFAULTS"), so only !important can size these
   headings. Kept to those two properties; everything else wins on specificity. */
body .spcc-golf-schedule h3.spcc-golf-schedule__month-title {
	font-family: var(--font-sans);
	font-size: max(13px, 0.85vw) !important;
	line-height: 1.4 !important;
	font-weight: 600;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--gs-accent);
	margin: 0 0 16px;
}

.spcc-golf-schedule__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 12px;
}

body .spcc-golf-schedule__list > li {
	list-style: none;
	margin: 0;
}

.spcc-golf-schedule__event {
	display: grid;
	grid-template-columns: auto auto 1fr auto;
	align-items: center;
	gap: 28px;
	padding: 22px 28px;
	background: var(--gs-bg);
}

/* Logo column collapses when an event has no logo (or logos="no"). */
.spcc-golf-schedule__event:not(:has(.spcc-golf-schedule__logo)) {
	grid-template-columns: auto 1fr auto;
}

.spcc-golf-schedule__date {
	display: flex;
	flex-direction: column;
	align-items: center;
	/* Fixed width so names line up whether the day has one digit or two. */
	width: 64px;
	box-sizing: content-box;
	padding-right: 28px;
	border-right: 1px solid var(--gs-accent);
	line-height: 1;
}

.spcc-golf-schedule__month-abbr {
	font-family: var(--font-sans);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--gs-accent);
}

.spcc-golf-schedule__day {
	font-family: var(--font-serif);
	font-size: 44px;
	line-height: 1.05;
	margin-top: 4px;
}

body .spcc-golf-schedule img.spcc-golf-schedule__logo {
	display: block;
	width: 64px;
	height: 64px;
	max-width: none;
	margin: 0;
	object-fit: contain;
}

body .spcc-golf-schedule h4.spcc-golf-schedule__name {
	font-family: var(--font-serif);
	font-size: max(22px, 1.5vw) !important;
	line-height: 1.25 !important;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	color: var(--gs-ink);
	margin: 0 0 6px;
	padding: 0;
}

body .spcc-golf-schedule__when {
	font-family: var(--font-sans);
	font-size: max(14px, 0.9vw);
	line-height: 1.5;
	color: var(--gs-muted);
	margin: 0;
	padding: 0;
}

.spcc-golf-schedule__course::before {
	content: "\00B7";
	margin: 0 0.5em;
}

.spcc-golf-schedule__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 28px;
	border: 1px solid var(--gs-accent);
	background-color: transparent;
	color: var(--gs-ink);
	font-family: var(--font-sans);
	font-size: max(11px, 0.78vw);
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.2s ease, color 0.2s ease;
}

body .spcc-golf-schedule__button:hover,
body .spcc-golf-schedule__button:focus-visible {
	background-color: var(--gs-accent);
	color: #fff;
}

.spcc-golf-schedule__button:focus-visible {
	outline: 2px solid var(--gs-ink);
	outline-offset: 3px;
}

.spcc-golf-schedule__event.is-past {
	opacity: 0.75;
}

.spcc-golf-schedule__empty,
.spcc-golf-schedule__more {
	font-family: var(--font-sans);
	margin: 24px 0 0;
}

.spcc-golf-schedule__more a {
	color: var(--gs-ink);
	text-decoration: underline;
	text-decoration-color: var(--gs-accent);
	text-underline-offset: 4px;
}

.spcc-golf-schedule__admin-note {
	padding: 12px 16px;
	margin: 0 0 24px;
	border-left: 3px solid var(--spcc-red, #d83528);
	background: #fff;
	font-size: 14px;
}

/* ---- Tablet / phone: date + name on top, button full width below ---- */
@media (max-width: 760px) {
	.spcc-golf-schedule__event,
	.spcc-golf-schedule__event:not(:has(.spcc-golf-schedule__logo)) {
		grid-template-columns: auto 1fr;
		gap: 16px 20px;
		padding: 20px;
	}

	body .spcc-golf-schedule img.spcc-golf-schedule__logo {
		display: none;
	}

	.spcc-golf-schedule__date {
		padding-right: 20px;
		width: 52px;
	}

	.spcc-golf-schedule__day {
		font-size: 36px;
	}

	.spcc-golf-schedule__button {
		grid-column: 1 / -1;
		width: 100%;
		min-height: 44px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.spcc-golf-schedule__button {
		transition: none;
	}
}
