/* ==========================================================================
   League Finder
   Every colour and size below is a CSS variable. To restyle, override them in
   Elementor > Site Settings > Custom CSS, e.g.
   .lf { --lf-red: #ee1b39; --lf-card-size: 210px; }
   ========================================================================== */

.lf {
	/* #dd0f2f is a hair darker than the brand red so white button text clears
	   the 4.5:1 contrast minimum. Swap in the exact brand hex if you prefer. */
	--lf-red: #dd0f2f;
	--lf-red-dark: #b70a25;
	--lf-blue: #0b5ea8;
	--lf-blue-dark: #084b86;

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

	--lf-radius: 10px;
	--lf-card-size: 190px;
	--lf-card-max: 190px;
	--lf-gap: 8px;
	--lf-step-gap: 48px;

	--lf-cols: 2;

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

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

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

.lf-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 ---------------------------------------------------------------- */

.lf-step + .lf-step {
	margin-top: var(--lf-step-gap);
}

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

/* --- Sport / location cards ---------------------------------------------- */

.lf-cards {
	display: grid;
	/* Cards keep their size instead of stretching, so two sports look the same
	   as four. Tracks fill from the left and stop. */
	grid-template-columns: repeat(auto-fill, minmax(140px, var(--lf-card-max)));
	gap: var(--lf-gap);
	max-width: calc((var(--lf-card-max) * 4) + (var(--lf-gap) * 3));
}

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

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

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

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

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

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

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

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

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

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

/* --- Buttons ------------------------------------------------------------- */

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

.lf .lf-btn--red {
	background: var(--lf-red);
}

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

.lf .lf-btn--blue {
	background: var(--lf-blue);
}

.lf .lf-btn--blue:hover,
.lf .lf-btn--blue:focus-visible {
	background: var(--lf-blue-dark);
}

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

.lf .lf-btn--find {
	margin-top: 26px;
}

/* --- Results ------------------------------------------------------------- */

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

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

.lf-day {
	margin-top: 44px;
}

.lf-day:first-child {
	margin-top: 4px;
}

.lf .lf-day__title {
	margin: 0 0 20px;
	color: var(--lf-ink);
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.2;
}

.lf-day--empty .lf-day__title {
	margin-bottom: 0;
}

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

.lf-league {
	margin: 0;
}

/* Deliberately not blue. It isn't a link, and text that looks clickable but
   isn't is worse than plain text. */
.lf .lf-league__name {
	margin: 0 0 12px;
	color: var(--lf-ink);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.35;
}

.lf-league__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

/* --- Contact line -------------------------------------------------------- */

.lf-contact {
	max-width: 900px;
	margin-top: 44px;
	padding-top: 28px;
	border-top: 1px solid var(--lf-surface-hover);
}

/* A sentence-length label, so this one button drops the all-caps letter-spaced
   treatment the short buttons use — "CONTACT US FOR MORE INFORMATION" set that
   way is a mouthful to read and runs the full width of a phone.

   Both classes are named so this outweighs `.lf a.lf-btn` on specificity rather
   than on source order, which a theme or a CSS minifier could reshuffle. */
.lf a.lf-btn.lf-contact__btn {
	font-size: 0.9375rem;
	letter-spacing: 0.01em;
	text-transform: none;
}

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

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

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

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

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

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

@media (max-width: 640px) {
	.lf {
		--lf-card-size: 150px;
		--lf-step-gap: 36px;
	}

	/* Two even columns on phones rather than fixed-width cards with a gap
	   stranded on the right. */
	.lf-cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.lf-day__grid {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	.lf-card__label {
		font-size: 1.0625rem;
	}

	.lf-card__icon svg,
	.lf-card__icon img {
		width: 36px;
		height: 36px;
	}
}

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