/* Alma Popup engine styles. */

/* Content containers (CSS class "alma-popup") are hidden on the page until opened… */
.alma-popup { display: none; }

/* …but kept visible & editable inside the Elementor builder. */
body.elementor-editor-active .alma-popup { display: block; }

/* …and shown once the engine moves the container into the overlay on the front-end. */
.alma-popup-overlay .alma-popup { display: block; }

.alma-popup-overlay {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100000;
	padding: 20px;
	box-sizing: border-box;
	opacity: 0;
	transition: opacity var(--ms, 200ms) ease;
	/* background-color is set inline from the trigger's data-overlay */
}

.alma-popup-overlay.is-open { opacity: 1; }

/* Width wrapper for the content. Transparent by design — the author's content
   container paints its own background / radius / padding.
   overscroll-behavior keeps a wheel/touch scroll inside the popup from chaining to the page. */
.alma-popup-overlay__box {
	position: relative;
	width: 100%;
	max-width: var(--maxw, 600px);
	max-height: 90vh;
	overflow: auto;
	overscroll-behavior: contain;
	box-sizing: border-box;
}

/* Close button — top corner OPPOSITE the reading start (top-left in RTL, top-right in LTR),
   so it doesn't sit over a start-aligned title. */
.alma-popup-close {
	position: absolute;
	inset-inline-end: 8px;
	top: 8px;
	z-index: 2;
	width: 32px;
	height: 32px;
	padding: 0;
	line-height: 1;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	background: rgba(0, 0, 0, 0.5);
	color: #fff;
	font-size: 22px;
}
.alma-popup-close:hover { background: rgba(0, 0, 0, 0.7); }
.alma-popup-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* NOTE: no scroll-lock. Hiding the page scrollbar (overflow:hidden) shifted the layout right,
   and reserving the gutter (scrollbar-gutter) turned the scrollbar area white. Leaving the
   scrollbar in place avoids both; the dimmed background may scroll behind the popup. */

.alma-popup-trigger { cursor: pointer; }
.alma-popup-trigger--text { text-decoration: none; }
