/**
 * Ensure AB Club popups render above the Theme Builder header (z-index: 10000).
 */
body .elementor-popup-modal {
	z-index: 100500 !important;
}

body .elementor-popup-modal .dialog-widget-content {
	z-index: 100501 !important;
}

body .elementor-popup-modal .dialog-close-button {
	z-index: 100502 !important;
}

/**
 * Site Menu popup: pin to top and fill the viewport on tablet/mobile.
 * Elementor defaults (content_position: center) otherwise float a
 * non-full-height dialog in the middle of the screen.
 */
@media (max-width: 1024px) {
	body .elementor-popup-modal:has(.abclub-fsm) {
		display: flex !important;
		align-items: stretch !important;
		justify-content: flex-start !important;
		padding: 0 !important;
	}

	body .elementor-popup-modal:has(.abclub-fsm) .dialog-widget-content {
		position: fixed !important;
		inset: 0 !important;
		top: 0 !important;
		left: 0 !important;
		right: 0 !important;
		bottom: 0 !important;
		width: 100% !important;
		max-width: 100% !important;
		height: 100% !important;
		max-height: 100% !important;
		min-height: 100dvh !important;
		margin: 0 !important;
		padding: 0 !important;
		transform: none !important;
		border-radius: 0 !important;
		box-shadow: none !important;
		overflow: hidden !important;
	}

	body .elementor-popup-modal:has(.abclub-fsm) .dialog-message {
		height: 100% !important;
		max-height: 100% !important;
		overflow-x: hidden !important;
		overflow-y: auto !important;
		-webkit-overflow-scrolling: touch;
		margin: 0 !important;
		padding: 0 !important;
	}

	body .elementor-popup-modal:has(.abclub-fsm) .elementor {
		min-height: 100%;
		height: auto;
	}

	body .elementor-popup-modal:has(.abclub-fsm) .elementor-section,
	body .elementor-popup-modal:has(.abclub-fsm) .elementor-container,
	body .elementor-popup-modal:has(.abclub-fsm) .elementor-row,
	body .elementor-popup-modal:has(.abclub-fsm) .elementor-column,
	body .elementor-popup-modal:has(.abclub-fsm) .elementor-widget-wrap,
	body .elementor-popup-modal:has(.abclub-fsm) .elementor-element,
	body .elementor-popup-modal:has(.abclub-fsm) .elementor-widget,
	body .elementor-popup-modal:has(.abclub-fsm) .elementor-widget-container {
		width: 100% !important;
		max-width: 100% !important;
		margin: 0 !important;
		padding-left: 0 !important;
		padding-right: 0 !important;
	}

	body .elementor-popup-modal:has(.abclub-fsm) .elementor-section.elementor-section-boxed > .elementor-container {
		max-width: 100% !important;
	}

	body .elementor-popup-modal:has(.abclub-fsm) .abclub-fsm {
		min-height: 100dvh;
		height: auto;
		max-height: none;
	}
}
