/*
 * Targeted technical fixes for the separate Wintersport Europa SEO theme.
 * The visual Magazine Pro layout is intentionally preserved.
 */

:focus-visible {
	outline: 3px solid #ff9911;
	outline-offset: 3px;
}

img,
video,
iframe {
	max-width: 100%;
}

iframe {
	border: 0;
}

/* Accessible icon set, so public pages no longer need the WordPress Dashicons font. */
.wintersport-search-icon {
	border: 2px solid currentColor;
	border-radius: 50%;
	display: inline-block;
	height: 18px;
	position: relative;
	vertical-align: middle;
	width: 18px;
}

.wintersport-search-icon::after {
	background: currentColor;
	border-radius: 2px;
	bottom: -5px;
	content: "";
	height: 2px;
	position: absolute;
	right: -5px;
	transform: rotate(45deg);
	width: 8px;
}

.wintersport-close-icon {
	display: inline-block;
	height: 24px;
	position: relative;
	vertical-align: middle;
	width: 24px;
}

.wintersport-close-icon::before,
.wintersport-close-icon::after {
	background: currentColor;
	content: "";
	height: 2px;
	left: 2px;
	position: absolute;
	top: 11px;
	width: 20px;
}

.wintersport-close-icon::before {
	transform: rotate(45deg);
}

.wintersport-close-icon::after {
	transform: rotate(-45deg);
}

.menu-toggle.wintersport-menu-icon::before {
	background: currentColor;
	box-shadow: 0 -7px 0 currentColor, 0 7px 0 currentColor;
	content: "";
	display: inline-block;
	height: 2px;
	margin: 0;
	vertical-align: middle;
	width: 24px;
}

.sub-menu-toggle.wintersport-submenu-icon::before {
	border-bottom: 2px solid currentColor;
	border-right: 2px solid currentColor;
	content: "";
	display: inline-block;
	height: 9px;
	transform: translateY(-2px) rotate(45deg);
	transition: transform 160ms ease;
	width: 9px;
}

.sub-menu-toggle.wintersport-submenu-icon.activated::before {
	transform: translateY(3px) rotate(225deg);
}

/* The search layer works with JavaScript and still has a :target fallback. */
body.search-visible .header-search-wrap,
.site-header.search-visible .header-search-wrap,
.header-search-wrap:target {
	display: block;
}

.header-search-wrap[aria-hidden="false"] {
	display: block;
}

.toggle-header-search.close {
	align-items: center;
	background: transparent;
	border: 0;
	display: flex;
	justify-content: center;
}

/* Keep the actual image dimensions produced by WordPress stable. */
.entry-image,
.wp-post-image {
	height: auto;
}

/* Equal-height product cards without matchHeight JavaScript. */
.woocommerce ul.products li.product {
	display: flex;
	flex-direction: column;
}

.woocommerce ul.products li.product .button {
	margin-top: auto;
}

/* Prevent long titles, URLs or tables from creating horizontal mobile overflow. */
.entry-content,
.widget,
.content,
.sidebar {
	min-width: 0;
}

.entry-content a,
.entry-title a,
.widget a {
	overflow-wrap: anywhere;
}

.entry-content table {
	display: block;
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

@media only screen and (max-width: 1179px) {
	/* Preserve the existing header layout while avoiding a duplicated search button. */
	.site-header .wrap > .wintersport-mobile-search {
		align-items: center;
		display: flex;
		justify-content: center;
	}

	.wintersport-mobile-search .wintersport-search-icon {
		color: #fff;
		height: 20px;
		width: 20px;
	}

	.menu-toggle.wintersport-menu-icon {
		align-items: center;
		display: flex;
		font-size: 0;
		justify-content: center;
	}

	/* Give touch targets enough room without altering the menu structure. */
	.genesis-responsive-menu .genesis-nav-menu .menu-item > a,
	.sub-menu-toggle {
		min-height: 44px;
	}
}

@media only screen and (min-width: 1180px) {
	.site-header .wrap > .wintersport-mobile-search {
		display: none;
	}

	.genesis-nav-menu .custom-menu-item-search > a {
	align-items: center;
	display: flex;
	justify-content: center;
	}
}

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