/*
 * TMSP Frontend Fixes - Home Search Modal
 *
 * Scoped fix for Elementor popup 3138 / JetSearch on the home page.
 * The generated popup CSS uses a fixed 334px dialog height and a large
 * bottom margin on the JetSearch widget, which clips the results list.
 */

body.home #elementor-popup-modal-3138 {
	z-index: 999999;
}

body.home #elementor-popup-modal-3138 .dialog-widget-content,
body.home #elementor-popup-modal-3138 .dialog-message,
body.home #elementor-popup-modal-3138 .dialog-lightbox-message,
body.home #elementor-popup-modal-3138 .elementor,
body.home #elementor-popup-modal-3138 .elementor-section,
body.home #elementor-popup-modal-3138 .elementor-container,
body.home #elementor-popup-modal-3138 .elementor-widget-wrap,
body.home #elementor-popup-modal-3138 .elementor-element,
body.home #elementor-popup-modal-3138 .elementor-widget-container {
	overflow: visible;
}

body.home #elementor-popup-modal-3138 .dialog-message {
	height: auto;
	max-height: calc(100vh - 48px);
	min-height: min(460px, calc(100vh - 48px));
	align-items: flex-start;
}

body.home #elementor-popup-modal-3138 .elementor-element.elementor-element-b78fcdd > .elementor-widget-container {
	margin: 0;
}

body.home #elementor-popup-modal-3138 .jet-ajax-search__results-area,
body.home #elementor-popup-modal-3138 .jet-ajax-search__results,
body.home #elementor-popup-modal-3138 .jet-ajax-search-result,
body.home #elementor-popup-modal-3138 .jet-ajax-search-results-area {
	display: block;
	max-height: min(60vh, 520px);
	overflow-y: auto;
	overflow-x: hidden;
	position: relative;
	z-index: 1000000;
}

body.home #elementor-popup-modal-3138 .jet-ajax-search__results-slide {
	max-height: inherit;
	min-height: 180px;
	overflow-y: auto;
	overflow-x: hidden;
}

body.home #elementor-popup-modal-3138 .jet-ajax-search,
body.home #elementor-popup-modal-3138 .jet-ajax-search-popup,
body.home #elementor-popup-modal-3138 .jet-search-popup,
body.home #elementor-popup-modal-3138 .jet-search {
	z-index: 1000000;
	position: relative;
}

body.home #elementor-popup-modal-3138 .jet-ajax-search-result__item,
body.home #elementor-popup-modal-3138 .jet-ajax-search__result,
body.home #elementor-popup-modal-3138 .jet-ajax-search-result-item {
	min-height: 56px;
}

@media (max-width: 1024px) {
	body.home #elementor-popup-modal-3138 .dialog-message {
		max-height: calc(100vh - 32px);
		min-height: min(440px, calc(100vh - 32px));
	}

	body.home #elementor-popup-modal-3138 .jet-ajax-search__results-area,
	body.home #elementor-popup-modal-3138 .jet-ajax-search__results,
	body.home #elementor-popup-modal-3138 .jet-ajax-search-result,
	body.home #elementor-popup-modal-3138 .jet-ajax-search-results-area {
		max-height: min(65vh, 500px);
	}
}

@media (max-width: 767px) {
	body.home #elementor-popup-modal-3138 .dialog-widget-content {
		width: calc(100vw - 32px);
	}

	body.home #elementor-popup-modal-3138 .dialog-message {
		max-height: calc(100dvh - 24px);
		min-height: auto;
	}

	body.home #elementor-popup-modal-3138 .jet-ajax-search__results-area,
	body.home #elementor-popup-modal-3138 .jet-ajax-search__results,
	body.home #elementor-popup-modal-3138 .jet-ajax-search-result,
	body.home #elementor-popup-modal-3138 .jet-ajax-search-results-area {
		max-height: calc(100dvh - 220px);
	}
}
