/**
 * CONALT: Woodmart search inside Elementor popups (mobile header).
 */

/*
 * The AJAX suggestion dropdown is absolutely positioned under the form. Inside an Elementor
 * popup every wrapper between the modal and the form can clip it (.dialog-message is
 * overflow:auto with a fixed height, the .elementor-location-popup document wrapper is
 * overflow:hidden/auto, containers can be overflow:hidden), so open them up only while
 * the suggestion list is shown. The list then overlays the page under the popup.
 */
.elementor-popup-modal :is(.dialog-widget-content, .dialog-message, .elementor-location-popup, .e-con, .e-con-inner, .elementor-widget, .elementor-widget-container):has(.wd-search-results.wd-opened) {
	--overflow: visible;
	overflow: visible;
}

/* Keep the open list above the popup's following content and the page behind it. */
.elementor-popup-modal .wd-search-results.wd-opened {
	z-index: 1000;
}

/* Woodmart's list scrolls at 50dvh; allow a bit more so "all results" is not cut off. */
.elementor-popup-modal .wd-search-results .wd-scroll-content {
	--wd-scroll-h: 70dvh;
}

/* Keep the clear (X) button visible in popups; on an empty field it closes the popup. */
.elementor-popup-modal .searchform .wd-clear-search.wd-hide {
	display: flex !important;
}
