/* Rules theme.json cannot express. Colors and fonts always come from presets. */

/* Header, main and footer sit flush: sections set their own spacing. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* Short pages (404, empty search) keep the footer at the bottom of the screen. */
.wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: calc(100dvh - var(--wp-admin--admin-bar--height, 0px));
}

.wp-site-blocks > main {
	flex: 1 0 auto;
}

/* Core switches to the overlay menu at 600px; the club name, six links and the language switcher need
   about 1140px with the Spanish labels, the longest. Below 1200px the switcher sits before the menu button. */
@media (min-width: 600px) and (max-width: 1199.98px) {
	.rayo-site-header .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}

	.rayo-site-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}
}

.rayo-site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	font-size: var(--wp--preset--font-size--x-large);
}

:where(.wp-site-blocks) :focus-visible {
	outline: 3px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

/* Standings and match tables: digits line up in columns. */
.wp-block-table,
.rayo-tabular {
	font-variant-numeric: tabular-nums;
}

.rayo-site-header .custom-logo {
	border-radius: 50%;
}

.rayo-card {
	transition: border-color 0.15s ease-in-out;
}

.rayo-card:hover,
.rayo-card:focus-within {
	border-color: var(--wp--preset--color--primary);
}

.rayo-hero-badge img {
	filter: drop-shadow(0 12px 24px rgb(0 0 0 / 0.25));
}

@media (max-width: 781px) {
	.rayo-hero-badge img {
		width: min(220px, 60vw) !important;
	}
}

/* Language switcher (Polylang block) in the header: two compact codes, the current language filled. */
.rayo-language-switcher {
	flex-shrink: 0;
	width: auto;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	letter-spacing: 0.05em;
}

.rayo-language-switcher ul {
	flex-wrap: nowrap;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 999px;
	overflow: hidden;
}

.rayo-language-switcher a {
	display: block;
	padding: 0.3rem 0.65rem;
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.rayo-language-switcher a:hover {
	background: var(--wp--preset--color--primary-light);
}

.rayo-language-switcher .current-lang a {
	background: var(--wp--preset--color--primary-dark);
	color: var(--wp--preset--color--base);
}

@media (max-width: 1199.98px) {
	.rayo-language-switcher {
		order: -1;
	}
}
