/* ==========================================================================
   Schedule Finder — matches the League Finder page's visual language.
   Override any variable in Elementor > Site Settings > Custom CSS:
   .sched { --sched-red: #ee1b39; --sched-card-size: 190px; }
   ========================================================================== */

.sched {
	--sched-red: #dd0f2f;
	--sched-red-dark: #b70a25;
	--sched-blue: #0b5ea8;
	--sched-blue-dark: #084b86;

	--sched-surface: #f4f4f5;
	--sched-surface-hover: #e8e8ea;
	--sched-ink: #16181d;
	--sched-muted: #4a4f57;

	--sched-radius: 10px;
	--sched-card-size: 190px;
	--sched-card-max: 190px;
	--sched-gap: 8px;

	--sched-cols: 2;

	color: var(--sched-ink);
}

.sched *,
.sched *::before,
.sched *::after {
	box-sizing: border-box;
}

.sched [hidden] {
	display: none !important;
}

.sched-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* --- Steps ---------------------------------------------------------------- */

.sched-step + .sched-step {
	margin-top: 48px;
}

.sched .sched-step__title {
	margin: 0 0 24px;
	color: var(--sched-blue);
	font-size: clamp(1.5rem, 1.15rem + 1.4vw, 2rem);
	font-weight: 500;
	line-height: 1.2;
}

/* --- Season cards -------------------------------------------------------- */

.sched-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, var(--sched-card-max)));
	gap: var(--sched-gap);
	max-width: calc((var(--sched-card-max) * 4) + (var(--sched-gap) * 3));
}

.sched-card {
	display: block;
	position: relative;
	margin: 0;
	cursor: pointer;
}

.sched-card__input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	opacity: 0;
	pointer-events: none;
}

.sched-card__box {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	min-height: var(--sched-card-size);
	height: 100%;
	padding: 20px 14px;
	border-radius: var(--sched-radius);
	background: var(--sched-surface);
	color: var(--sched-blue);
	text-align: center;
	transition: background-color 0.18s ease, color 0.18s ease;
}

.sched-card__icon {
	display: flex;
	color: var(--sched-red);
	transition: color 0.18s ease;
}

.sched-card__icon svg,
.sched-card__icon img {
	display: block;
	width: 44px;
	height: 44px;
}

.sched-card__label {
	font-size: 1.1875rem;
	font-weight: 500;
	line-height: 1.25;
}

.sched-card:hover .sched-card__input:not(:checked) + .sched-card__box {
	background: var(--sched-surface-hover);
}

.sched-card__input:checked + .sched-card__box {
	background: var(--sched-blue);
	color: #fff;
}

.sched-card__input:checked + .sched-card__box .sched-card__icon {
	color: #fff;
}

.sched-card__input:focus-visible + .sched-card__box {
	outline: 3px solid var(--sched-blue);
	outline-offset: 3px;
}

/* --- Button -------------------------------------------------------------- */

.sched button.sched-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	margin-top: 26px;
	padding: 12px 26px;
	border: 0;
	border-radius: 999px;
	background: var(--sched-red);
	color: #fff;
	font-family: inherit;
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.09em;
	line-height: 1;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 0.18s ease;
}

.sched button.sched-btn:hover,
.sched button.sched-btn:focus-visible {
	background: var(--sched-red-dark);
}

.sched button.sched-btn:focus-visible {
	outline: 3px solid var(--sched-ink);
	outline-offset: 2px;
}

/* --- League list --------------------------------------------------------- */

.sched-results {
	transition: opacity 0.15s ease;
}

.sched-results[aria-busy="true"] {
	opacity: 0.45;
}

.sched-list {
	display: grid;
	grid-template-columns: repeat(var(--sched-cols, 2), minmax(0, 1fr));
	gap: 12px;
	max-width: 900px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sched-item {
	margin: 0;
}

.sched .sched-item__inner {
	display: flex;
	align-items: center;
	gap: 14px;
	height: 100%;
	padding: 16px 18px;
	border: 1px solid #e3e3e6;
	border-radius: var(--sched-radius);
	background: #fff;
	color: var(--sched-ink);
	text-decoration: none;
	transition: border-color 0.18s ease, background-color 0.18s ease;
}

.sched a.sched-item__inner:hover,
.sched a.sched-item__inner:focus-visible {
	border-color: var(--sched-blue);
	background: #f7fafd;
}

.sched a.sched-item__inner:focus-visible {
	outline: 3px solid var(--sched-blue);
	outline-offset: 2px;
}

.sched-item__icon {
	display: flex;
	flex: none;
	color: var(--sched-red);
}

.sched-item__icon svg {
	display: block;
	width: 26px;
	height: 26px;
}

.sched-item__body {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.sched-item__name {
	color: var(--sched-blue);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.35;
}

.sched a.sched-item__inner:hover .sched-item__name {
	text-decoration: underline;
}

.sched-item__meta {
	color: var(--sched-muted);
	font-size: 0.8125rem;
	line-height: 1.3;
}

/* No PDF yet: still listed, but plainly not clickable. */
.sched-item--empty .sched-item__inner {
	background: var(--sched-surface);
	border-style: dashed;
}

.sched-item--empty .sched-item__icon,
.sched-item--empty .sched-item__name {
	color: var(--sched-muted);
}

/* --- Feedback ------------------------------------------------------------ */

.sched .sched-notice {
	margin: 0;
	color: var(--sched-muted);
	font-size: 0.9375rem;
	line-height: 1.5;
}

.sched-loading {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--sched-muted);
	font-size: 0.9375rem;
}

.sched-spinner {
	flex: none;
	width: 18px;
	height: 18px;
	border: 2px solid rgba(11, 94, 168, 0.25);
	border-top-color: var(--sched-blue);
	border-radius: 50%;
	animation: sched-spin 0.8s linear infinite;
}

@keyframes sched-spin {
	to {
		transform: rotate(360deg);
	}
}

/* --- Responsive ---------------------------------------------------------- */

@media (max-width: 640px) {
	.sched {
		--sched-card-size: 150px;
	}

	.sched-cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.sched-list {
		grid-template-columns: 1fr;
	}

	.sched-step + .sched-step {
		margin-top: 36px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sched *,
	.sched *::before,
	.sched *::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}
