/* Flat Search Pro v627: module-independent search UI shell. */
:root {
	--fsp-core-search-accent: #f37021;
	--fsp-core-search-height: 50px;
	--fsp-core-search-side-gap: 15px;
	--fsp-core-search-close-slot: 45px;
}

.searchform,
.search-form,
.searchform-wrapper,
#search-lightbox,
#search-lightbox .searchform,
#search-lightbox .searchform-wrapper,
.live-search-results,
.autocomplete-suggestions,
.autocomplete-suggestion {
	box-sizing: border-box;
}

.searchform,
.search-form,
.searchform-wrapper,
.header-search-form,
#search-lightbox form.searchform {
	position: relative;
}

.searchform .live-search-results,
.searchform-wrapper .live-search-results,
.header-search .live-search-results,
.header-search-form .live-search-results,
#search-lightbox .live-search-results,
.mfp-content .live-search-results {
	width: 100% !important;
	max-width: 100% !important;
	min-width: 0 !important;
	overflow-x: hidden !important;
	box-sizing: border-box !important;
}

.searchform .live-search-results > .autocomplete-suggestions,
.searchform-wrapper .live-search-results > .autocomplete-suggestions,
.header-search .live-search-results > .autocomplete-suggestions,
.header-search-form .live-search-results > .autocomplete-suggestions,
#search-lightbox .live-search-results > .autocomplete-suggestions,
.mfp-content .live-search-results > .autocomplete-suggestions {
	width: 100% !important;
	max-width: 100% !important;
	min-width: 0 !important;
	box-sizing: border-box !important;
	overflow-x: hidden !important;
}

.live-search-results .autocomplete-suggestion {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

/*
 * Core action contract.
 * View More and Checkout geometry must remain usable even when every optional
 * renderer/cache/Quick Add module is disabled. Feature modules may position
 * these rows, but they do not own the button shell or its visual skin.
 */
.wm-view-more-wrapper,
.fsp-inline-view-more,
.fsp-search-checkout-sticky,
.wm-view-more-wrapper *,
.fsp-inline-view-more *,
.fsp-search-checkout-sticky * {
	box-sizing: border-box;
}

.wm-view-more-wrapper a.wm-view-more-results,
.wm-view-more-wrapper a.wm-view-more-link,
.fsp-inline-view-more a.fsp-inline-view-more-link,
.fsp-inline-view-more a.wm-view-more-results,
.fsp-inline-view-more a.wm-view-more-link {
	display: block;
	width: 100%;
	min-width: 0;
	margin: 0;
	padding: 0;
	background: transparent;
	border: 0;
	box-shadow: none;
	text-decoration: none;
}

.wm-view-more-wrapper .wm-pill,
.fsp-inline-view-more .wm-pill {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-width: 0;
	min-height: 38px;
	margin: 0;
	padding: 8px 12px;
	border: 1px solid #d1d5db;
	border-radius: 999px;
	background: #fff;
	color: #0f172a;
	font-weight: 800;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	box-shadow: none;
}

.fsp-search-checkout-sticky a.fsp-search-checkout-button,
a.fsp-search-checkout-button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	min-width: 0;
	min-height: 46px;
	margin: 0;
	padding: 10px 14px;
	border: 1px solid #f37021;
	border-radius: 999px;
	background: #f37021;
	color: #fff;
	font-weight: 900;
	line-height: 1.15;
	text-align: center;
	text-decoration: none;
	box-shadow: none;
}

@supports (height: 100dvh) {
	:root { --fsp-core-search-vh: 100dvh; }
}
@supports not (height: 100dvh) {
	:root { --fsp-core-search-vh: 100vh; }
}

@media (max-width: 849px) {
	/* Popup frame: independent of every feature module. */
	body .mfp-wrap.fsp-core-search-lightbox-active,
	body .mfp-wrap.wm-so-search-lightbox-active,
	body .mfp-wrap:has(#search-lightbox) {
		position: fixed !important;
		inset: 0 !important;
		width: 100% !important;
		height: var(--fsp-core-search-vh) !important;
		max-height: var(--fsp-core-search-vh) !important;
		overflow: hidden !important;
	}

	body .mfp-wrap.fsp-core-search-lightbox-active .mfp-container,
	body .mfp-wrap.wm-so-search-lightbox-active .mfp-container,
	body .mfp-wrap:has(#search-lightbox) .mfp-container,
	body .mfp-wrap.fsp-core-search-lightbox-active .mfp-content,
	body .mfp-wrap.wm-so-search-lightbox-active .mfp-content,
	body .mfp-wrap:has(#search-lightbox) .mfp-content {
		position: fixed !important;
		inset: 0 !important;
		width: 100% !important;
		max-width: 100% !important;
		height: var(--fsp-core-search-vh) !important;
		max-height: var(--fsp-core-search-vh) !important;
		margin: 0 !important;
		padding: 0 !important;
		background: #fff !important;
		overflow: hidden !important;
		box-sizing: border-box !important;
	}

	body .mfp-wrap.fsp-core-search-lightbox-active + .mfp-bg,
	body .mfp-wrap.wm-so-search-lightbox-active + .mfp-bg,
	body:has(.mfp-wrap.fsp-core-search-lightbox-active) .mfp-bg,
	body:has(.mfp-wrap.wm-so-search-lightbox-active) .mfp-bg,
	body:has(.mfp-wrap #search-lightbox) .mfp-bg {
		background: #fff !important;
		opacity: 1 !important;
	}

	body .mfp-wrap #search-lightbox {
		position: fixed !important;
		inset: 0 !important;
		width: 100% !important;
		max-width: 100% !important;
		height: var(--fsp-core-search-vh) !important;
		max-height: var(--fsp-core-search-vh) !important;
		margin: 0 !important;
		padding: 0 !important;
		background: #fff !important;
		overflow: hidden !important;
		box-sizing: border-box !important;
	}

	body .mfp-wrap #search-lightbox .searchform-wrapper.ux-search-box,
	body .mfp-wrap #search-lightbox .searchform-wrapper {
		width: 100% !important;
		max-width: 100% !important;
		height: var(--fsp-core-search-vh) !important;
		max-height: var(--fsp-core-search-vh) !important;
		margin: 0 !important;
		padding: calc(env(safe-area-inset-top, 0px) + 20px) 0 calc(env(safe-area-inset-bottom, 0px) + 6px) !important;
		display: flex !important;
		flex-direction: column !important;
		overflow: hidden !important;
		box-sizing: border-box !important;
	}

	body .mfp-wrap #search-lightbox form.searchform {
		width: 100% !important;
		max-width: 100% !important;
		height: 100% !important;
		min-height: 0 !important;
		margin: 0 !important;
		padding: 0 !important;
		display: flex !important;
		flex-direction: column !important;
		overflow: hidden !important;
		box-shadow: none !important;
		box-sizing: border-box !important;
	}

	body .mfp-wrap #search-lightbox form.searchform > .flex-row,
	body .mfp-wrap #search-lightbox .searchform > .flex-row {
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
		flex: 0 0 auto !important;
		display: flex !important;
		align-items: stretch !important;
		box-sizing: border-box !important;
	}

	/* Cohesive mobile input + submit control. Design modules may change colours. */
	body .mfp-wrap #search-lightbox input[type="search"],
	body .mfp-wrap #search-lightbox input.search-field {
		flex: 1 1 auto !important;
		width: auto !important;
		min-width: 0 !important;
		height: var(--fsp-core-search-height) !important;
		min-height: var(--fsp-core-search-height) !important;
		max-height: var(--fsp-core-search-height) !important;
		margin: 0 0 0 var(--fsp-core-search-close-slot) !important;
		border: 3px solid var(--fsp-core-search-accent) !important;
		border-right: 0 !important;
		border-radius: 6px 0 0 6px !important;
		box-shadow: none !important;
		opacity: 1 !important;
		box-sizing: border-box !important;
	}

	body .mfp-wrap #search-lightbox button.ux-search-submit,
	body .mfp-wrap #search-lightbox button.submit-button {
		flex: 0 0 var(--fsp-core-search-height) !important;
		width: var(--fsp-core-search-height) !important;
		min-width: var(--fsp-core-search-height) !important;
		max-width: var(--fsp-core-search-height) !important;
		height: var(--fsp-core-search-height) !important;
		min-height: var(--fsp-core-search-height) !important;
		max-height: var(--fsp-core-search-height) !important;
		margin: 0 var(--fsp-core-search-side-gap) 0 0 !important;
		padding: 0 !important;
		border: 3px solid var(--fsp-core-search-accent) !important;
		border-left: 0 !important;
		border-radius: 0 6px 6px 0 !important;
		box-shadow: none !important;
		box-sizing: border-box !important;
	}

	/* Scroll/results geometry remains stable with any transport or renderer. */
	body .mfp-wrap #search-lightbox .live-search-results {
		position: relative !important;
		flex: 1 1 auto !important;
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
		height: auto !important;
		min-height: 0 !important;
		max-height: none !important;
		margin: 0 !important;
		padding: 0 !important;
		display: flex !important;
		flex-direction: column !important;
		overflow: hidden !important;
		box-sizing: border-box !important;
	}

	body .mfp-wrap #search-lightbox .live-search-results > .autocomplete-suggestions:not(.wm-search-tips-box):not(.wm-so-search-helper-box),
	body .mfp-wrap #search-lightbox .live-search-results > .wm-search-tips-box,
	body .mfp-wrap #search-lightbox .live-search-results > .wm-so-search-helper-box {
		flex: 1 1 auto !important;
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
		height: auto !important;
		min-height: 0 !important;
		max-height: none !important;
		overflow-y: auto !important;
		overflow-x: hidden !important;
		-webkit-overflow-scrolling: touch !important;
		touch-action: pan-y !important;
		overscroll-behavior-y: contain !important;
		box-sizing: border-box !important;
	}

	/* One reliable close button even when Popular Terms/Mobile Helper is OFF. */
	body .mfp-wrap.fsp-core-search-lightbox-active > button.mfp-close,
	body .mfp-wrap.fsp-core-search-lightbox-active .mfp-close,
	body .mfp-wrap.fsp-core-search-lightbox-active > button[data-fsp-core-close],
	body .mfp-wrap.wm-so-search-lightbox-active > button.mfp-close,
	body .mfp-wrap.wm-so-search-lightbox-active .mfp-close,
	body .mfp-wrap:has(#search-lightbox) > button.mfp-close,
	body .mfp-wrap:has(#search-lightbox) .mfp-close,
	body.mfp-close-btn-in .mfp-wrap.fsp-core-search-lightbox-active .mfp-close,
	body.mfp-close-btn-in .mfp-wrap:has(#search-lightbox) .mfp-close {
		position: fixed !important;
		top: calc(env(safe-area-inset-top, 0px) + 20px) !important;
		left: 0 !important;
		right: auto !important;
		bottom: auto !important;
		width: var(--fsp-core-search-close-slot) !important;
		height: var(--fsp-core-search-height) !important;
		min-width: var(--fsp-core-search-close-slot) !important;
		min-height: var(--fsp-core-search-height) !important;
		margin: 0 !important;
		padding: 0 !important;
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		float: none !important;
		transform: none !important;
		translate: none !important;
		background: transparent !important;
		border: 0 !important;
		box-shadow: none !important;
		color: transparent !important;
		font-size: 0 !important;
		line-height: var(--fsp-core-search-height) !important;
		text-indent: 0 !important;
		opacity: 1 !important;
		visibility: visible !important;
		pointer-events: auto !important;
		touch-action: manipulation !important;
		z-index: 2147483000 !important;
		overflow: visible !important;
	}

	body .mfp-wrap.fsp-core-search-lightbox-active .mfp-close svg,
	body .mfp-wrap.fsp-core-search-lightbox-active [data-fsp-core-close] svg,
	body .mfp-wrap.wm-so-search-lightbox-active .mfp-close svg,
	body .mfp-wrap:has(#search-lightbox) .mfp-close svg,
	body #search-lightbox svg.feather.feather-x {
		display: none !important;
		visibility: hidden !important;
		opacity: 0 !important;
		width: 0 !important;
		height: 0 !important;
		margin: 0 !important;
		padding: 0 !important;
		pointer-events: none !important;
	}

	body .mfp-wrap.fsp-core-search-lightbox-active .mfp-close::before,
	body .mfp-wrap.fsp-core-search-lightbox-active [data-fsp-core-close]::before,
	body .mfp-wrap.wm-so-search-lightbox-active .mfp-close::before,
	body .mfp-wrap:has(#search-lightbox) .mfp-close::before,
	body.mfp-close-btn-in .mfp-wrap.fsp-core-search-lightbox-active .mfp-close::before,
	body.mfp-close-btn-in .mfp-wrap:has(#search-lightbox) .mfp-close::before {
		content: "×" !important;
		display: block !important;
		position: static !important;
		width: var(--fsp-core-search-close-slot) !important;
		height: var(--fsp-core-search-height) !important;
		margin: 0 !important;
		padding: 0 !important;
		color: #000 !important;
		font-family: Arial, sans-serif !important;
		font-size: 34px !important;
		font-weight: 300 !important;
		line-height: var(--fsp-core-search-height) !important;
		text-align: center !important;
		text-indent: 0 !important;
		opacity: .6 !important;
		visibility: visible !important;
		transform: none !important;
		text-shadow: none !important;
	}

	body .mfp-wrap.fsp-core-search-lightbox-active .mfp-close:active::before,
	body .mfp-wrap.fsp-core-search-lightbox-active [data-fsp-core-close]:active::before,
	body .mfp-wrap.wm-so-search-lightbox-active .mfp-close:active::before,
	body .mfp-wrap:has(#search-lightbox) .mfp-close:active::before {
		opacity: 1 !important;
	}

	/* Respect existing close animations; Core must not reopen a closing popup. */
	body .mfp-wrap.wm-so-search-closing-wrap .mfp-close,
	body .mfp-wrap .mfp-close.wm-so-close-force-hidden,
	body .mfp-wrap.mfp-removing .mfp-close {
		display: none !important;
		opacity: 0 !important;
		visibility: hidden !important;
		pointer-events: none !important;
	}
}
