/* Keep the single-inventory Elementor gallery inside the mobile viewport. */
.elementor-element-egsphoto {
	cursor: zoom-in;
}

.elementor-element-egsphoto:focus-visible {
	outline: 2px solid #c8202f;
	outline-offset: 4px;
}

@media (max-width: 767px) {
	/* Elementor appends the dialog near the document end; pin it to the viewport. */
	#elementor-lightbox-slideshow-egsgallery {
		position: fixed !important;
		inset: 0 !important;
		top: 0 !important;
		left: 0 !important;
		z-index: 999999 !important;
	}

	#elementor-lightbox-slideshow-egsgallery,
	#elementor-lightbox-slideshow-egsgallery .dialog-widget-content,
	#elementor-lightbox-slideshow-egsgallery .dialog-lightbox-message,
	#elementor-lightbox-slideshow-egsgallery .swiper {
		width: 100vw !important;
		max-width: 100vw !important;
		height: 100dvh !important;
		max-height: 100dvh !important;
		overflow: hidden !important;
	}

	#elementor-lightbox-slideshow-egsgallery .dialog-widget-content {
		position: fixed !important;
		inset: 0 !important;
		top: 0 !important;
		left: 0 !important;
		margin: 0 !important;
	}

	#elementor-lightbox-slideshow-egsgallery .elementor-lightbox-item,
	#elementor-lightbox-slideshow-egsgallery .swiper-zoom-container {
		width: 100% !important;
		height: 100% !important;
		max-width: 100% !important;
		max-height: 100% !important;
	}

	#elementor-lightbox-slideshow-egsgallery .elementor-lightbox-image {
		width: auto !important;
		height: auto !important;
		max-width: calc(100vw - 24px) !important;
		max-height: calc(100dvh - 96px) !important;
		object-fit: contain !important;
	}
}
