/* USA Sportz Schedule
   Every value here comes from a custom property set inline by PHP, so the
   settings screen and per-table attributes both work without extra CSS. */

.usz-sched {
	--usz-accent: #8a2432;
	--usz-accent-text: #fff;
	--usz-ink: #1a1a1a;
	--usz-muted: #4a6741;
	--usz-row-bg: #fff;
	--usz-stripe: #fafafa;
	--usz-line: #e2e2e2;
	--usz-note-bg: #efefef;
	--usz-btn-bg: #ededed;
	--usz-btn-text: #1a1a1a;
	--usz-btn-border: #c4c4c4;
	--usz-btn-hover-bg: #8a2432;
	--usz-btn-hover-text: #fff;
	--usz-font-size: 15px;
	--usz-title-size: 18px;
	--usz-title-align: center;
	--usz-radius: 3px;
	--usz-pad-y: 0.7rem;
	--usz-pad-x: 0.85rem;
	--usz-logo: 34px;

	margin: 2rem 0;
	color: var(--usz-ink);
	font-size: var(--usz-font-size);
	font-family: inherit;
}

.usz-sched__title {
	margin: 0;
	padding: 0.85rem var(--usz-pad-x);
	border-radius: var(--usz-radius) var(--usz-radius) 0 0;
	background: var(--usz-accent);
	color: var(--usz-accent-text);
	font-size: var(--usz-title-size);
	font-weight: 700;
	line-height: 1.3;
	text-align: var(--usz-title-align);
}

.usz-sched__table {
	width: 100%;
	margin: 0;
	border: 1px solid var(--usz-line);
	border-collapse: collapse;
	background: var(--usz-row-bg);
	font-size: 1em;
}

/* Column headings are hidden by default — the title bar already names the
   table — but stay in the DOM for screen readers and the mobile view. */
.usz-sched__table thead th {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	overflow: hidden;
	border: 0;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.usz-sched.has-headers .usz-sched__table thead th {
	position: static;
	width: auto;
	height: auto;
	padding: 0.55rem var(--usz-pad-x);
	overflow: visible;
	border-bottom: 2px solid var(--usz-line);
	background: var(--usz-row-bg);
	clip: auto;
	color: var(--usz-accent);
	font-size: 0.8em;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.usz-cell {
	padding: var(--usz-pad-y) var(--usz-pad-x);
	border-top: 1px solid var(--usz-line);
	background: var(--usz-row-bg);
	font-weight: 400;
	vertical-align: middle;
}

.usz-sched__row.is-alt .usz-cell {
	background: var(--usz-stripe);
}

.usz-sched__row.is-off .usz-cell {
	color: #777;
	color: color-mix(in srgb, var(--usz-ink) 50%, transparent);
}

/* Date */
.usz-col-date {
	line-height: 1.35;
}

.usz-dow,
.usz-col-date time {
	display: block;
	font-size: 0.88em;
}

.usz-col-date time {
	font-weight: 600;
}

/* Logo */
.usz-logo {
	display: block;
	width: var(--usz-logo);
	height: var(--usz-logo);
	margin: 0 auto;
	object-fit: contain;
}

/* Opponent */
.usz-team {
	display: block;
	font-size: 1.08em;
	font-weight: 700;
	line-height: 1.3;
}

.usz-at {
	font-weight: 400;
}

.usz-rank {
	font-size: 0.78em;
	font-weight: 400;
}

.usz-rank::before {
	content: "#";
}

.usz-venue {
	display: block;
	margin-top: 0.15rem;
	color: var(--usz-muted);
	font-size: 0.88em;
}

.usz-off {
	font-weight: 700;
	letter-spacing: 0.08em;
}

/* Result */
.usz-result {
	font-weight: 700;
}

.usz-result.is-w {
	color: #1a7f37;
}

.usz-result.is-l {
	color: #b42318;
}

/* Time / TV */
.usz-time,
.usz-tv {
	display: block;
	font-size: 0.88em;
	line-height: 1.35;
}

.usz-tv {
	color: var(--usz-muted);
}

/* Banner row, e.g. bowl or rivalry names */
.usz-sched__note td {
	padding: 0.4rem var(--usz-pad-x);
	border-top: 1px solid var(--usz-line);
	background: var(--usz-note-bg);
	font-size: 0.75em;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-align: center;
	text-transform: uppercase;
}

/* Tickets button */
.usz-btn {
	display: inline-block;
	min-width: 7.5rem;
	min-height: 44px; /* WCAG 2.5.8 target size */
	padding: 0.6rem 1rem;
	border: 1px solid var(--usz-btn-border);
	border-radius: var(--usz-radius);
	background: var(--usz-btn-bg);
	color: var(--usz-btn-text);
	font-size: 0.88em;
	font-weight: 600;
	line-height: 1.5;
	text-align: center;
	text-decoration: none;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.usz-btn:hover,
.usz-btn:focus {
	border-color: var(--usz-btn-hover-bg);
	background: var(--usz-btn-hover-bg);
	color: var(--usz-btn-hover-text);
}

.usz-btn:focus-visible {
	outline: 2px solid var(--usz-accent);
	outline-offset: 2px;
}

.usz-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
	.usz-btn {
		transition: none;
	}
}

/* Stack into cards on narrow screens. Cells carry a data-label attribute, so if
   you want visible labels in this view, uncomment the rule at the end. */
@media (max-width: 640px) {

	.usz-sched__table,
	.usz-sched__table tbody,
	.usz-sched__row,
	.usz-cell,
	.usz-sched__note,
	.usz-sched__note td {
		display: block;
		width: auto !important;
	}

	.usz-sched.has-headers .usz-sched__table thead {
		display: none;
	}

	.usz-sched__row {
		padding: 0.5rem 0;
		border-top: 1px solid var(--usz-line);
	}

	.usz-cell {
		padding: 0.2rem var(--usz-pad-x);
		border-top: 0;
		text-align: left !important;
	}

	.usz-col-date {
		color: var(--usz-muted);
		font-size: 0.85em;
		text-transform: uppercase;
	}

	.usz-dow,
	.usz-col-date time,
	.usz-time,
	.usz-tv {
		display: inline;
	}

	.usz-dow::after {
		content: ", ";
	}

	.usz-tv::before {
		content: " · ";
	}

	.usz-logo {
		margin: 0;
	}

	.usz-col-tickets {
		padding-top: 0.5rem;
		padding-bottom: 0.5rem;
	}

	/* Optional: show the column name in front of each value on mobile.
	.usz-cell[data-label]::before {
		content: attr(data-label) ": ";
		color: var(--usz-muted);
		font-size: 0.8em;
		text-transform: uppercase;
	}
	*/
}
