/**
 * Responsive corrections for the imported layouts and native theme templates.
 * Loaded after the snapshot styles; desktop rules remain in their original files.
 */
@media (max-width: 1024px) {
	/* Allow flex/grid children to shrink around long titles and form controls. */
	#page .e-con,
	#page .e-con-inner,
	#page .elementor-widget,
	#page .wcf-post,
	#page .wcf-post .content {
		min-width: 0;
	}

	#page .entry-content,
	#page .wcf--text,
	#page .wcf-post .title,
	#page .wcf-post-title,
	#page .elementor-icon-list-text,
	#page .lex-card-title {
		overflow-wrap: anywhere;
	}

	#page .entry-content :is(video, iframe, embed, object),
	#page .wcf--text :is(video, iframe, embed, object) {
		max-width: 100%;
	}

	#page .entry-content video,
	#page .wcf--text video {
		height: auto;
	}

	#page :is(.entry-content, .wcf--text) iframe:is([src*="youtube.com"], [src*="youtube-nocookie.com"], [src*="player.vimeo.com"]) {
		width: 100%;
		height: auto;
		aspect-ratio: 16 / 9;
	}

	/* Keep wide data/code scrollable inside the reading column. */
	#page :is(.entry-content, .wcf--text) :is(table, pre) {
		display: block;
		max-width: 100%;
		overflow-x: auto;
	}

	#page .entry-content :is(figure, .wp-caption) {
		max-width: 100%;
	}

	#page :is(.entry-content, .wcf--text) img {
		max-width: 100%;
		height: auto;
	}

	.lex-site-sidebar {
		height: 100dvh;
		max-height: 100dvh;
		touch-action: pan-y;
	}
}

@media (max-width: 767px) {
	/* The imported hero descriptions retain their desktop 50% widget width. */
	#page :is(.elementor-4125, .elementor-4281, .elementor-4133, .elementor-4531) .elementor-element-b544324 {
		--container-widget-width: 100%;
		width: 100%;
		max-width: 100%;
		padding-inline: 20px;
	}

	/* Retain the existing card/advert layouts, with room beside the viewport. */
	#page :is(.elementor-4125, .elementor-4281, .elementor-4133) .elementor-element-ecd1713,
	#page .elementor-4531 :is(.elementor-element-a6d84f0, .elementor-element-c8bbe45) {
		--padding-left: 20px;
		--padding-right: 20px;
	}

	/* Search popovers are anchored to a small icon at the edge of the header. */
	#page :is(.elementor-4820, .elementor-1419) .wcf-search-form {
		min-width: 0;
		width: min(250px, calc(100vw - 30px));
		max-width: calc(100vw - 30px);
	}

	#page .wcf-search-form .search-field {
		min-width: 0;
	}

	#page :is(.wcf-menu-hamburger, .wcf-menu-close),
	.lex-site-sidebar .side--off-close {
		min-width: 44px;
		min-height: 44px;
	}

	#page .mobile-menu-active .wcf-nav-menu-container {
		max-width: 100vw;
		max-height: 100dvh;
		overflow-y: auto;
		overscroll-behavior: contain;
	}

	#page .mobile-menu-active .wcf-nav-menu-nav a {
		min-height: 44px;
		overflow-wrap: anywhere;
	}

	#page :is(.entry-content, .wcf--text) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea) {
		min-width: 0;
		max-width: 100%;
	}

	/* Avoid automatic input zoom on phones while retaining desktop form type. */
	#page :is(.custom-subscribe-form, .vogue-comment-form, .wcf-search-form, .fluentform) :is(input[type="text"], input[type="email"], input[type="tel"], input[type="search"], select, textarea) {
		font-size: 16px !important;
	}

	#page .vogue-share-bar,
	#page .vogue-share-icons {
		flex-wrap: wrap;
	}

	#page .vogue-share-link {
		width: 44px;
		height: 44px;
	}
}
