/* GA Popups - front-end modal. Namespaced under .ga-popup to avoid theme/plugin clashes. */

.ga-popup {
	position: fixed;
	inset: 0;
	z-index: 2147483647; /* above Divi's sticky header and other overlays */
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	opacity: 0;
	visibility: hidden;
	transition: opacity .25s ease, visibility .25s ease;
	box-sizing: border-box;
}
.ga-popup * { box-sizing: border-box; }

.ga-popup.is-open {
	opacity: 1;
	visibility: visible;
}

.ga-popup__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, .6);
	cursor: pointer;
}

.ga-popup__card {
	position: relative;
	z-index: 1;
	display: flex;
	width: 100%;
	max-width: 760px;
	max-height: calc(100vh - 48px);
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
	transform: translateY(8px) scale(.98);
	transition: transform .25s ease;
}
.ga-popup.is-open .ga-popup__card { transform: none; }

@media (prefers-reduced-motion: reduce) {
	.ga-popup { transition: none; }
	.ga-popup__card { transition: none; transform: none; }
}

.ga-popup__close {
	position: absolute;
	top: 8px;
	right: 10px;
	z-index: 2;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .92);
	box-shadow: 0 1px 5px rgba(0, 0, 0, .28);
	color: #0f172a;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .15s ease;
}
.ga-popup__close:hover { background: #fff; }
.ga-popup__close:focus-visible { outline: 2px solid #0f172a; outline-offset: 2px; }

.ga-popup__media {
	flex: 0 0 var(--ga-media-w, 45%);
	max-width: var(--ga-media-w, 45%);
	background: #f1f5f9;
	overflow: hidden; /* clip the cover image, never let it bleed over the text */
}

/* Image on the right: same row, reversed. */
.ga-popup--image-right .ga-popup__card { flex-direction: row-reverse; }
.ga-popup__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ga-popup__content {
	flex: 1 1 auto;
	min-width: 0;
	padding: 36px 32px;
	overflow: auto;
}
.ga-popup__text { margin-bottom: 16px; }
.ga-popup__text :first-child { margin-top: 0; }
.ga-popup__text :last-child { margin-bottom: 0; }

.ga-popup__embed { margin-top: 8px; }

/* Thank-you state: shown in place of the form after a successful submit. */
.ga-popup__thanks { padding: 8px 0; }
.ga-popup.ga-show-thanks .ga-popup__text,
.ga-popup.ga-show-thanks .ga-popup__embed { display: none; }
.ga-popup.ga-show-thanks .ga-popup__thanks { display: block; }

/* Image-on-top variant + small screens: stack vertically. */
.ga-popup--image-top .ga-popup__card { flex-direction: column; }
.ga-popup--image-top .ga-popup__media {
	flex: 0 0 auto;
	max-width: 100%;
	width: 100%;
	height: 220px;
}

.ga-popup--no-image .ga-popup__content { padding: 40px 36px; }

html.ga-popup-lock,
html.ga-popup-lock body { overflow: hidden; }

@media (max-width: 640px) {
	.ga-popup { padding: 12px; }
	.ga-popup__card { flex-direction: column; max-height: calc(100vh - 24px); }
	.ga-popup__media {
		flex: 0 0 auto;
		max-width: 100%;
		width: 100%;
		height: 200px;
	}
	.ga-popup__content { padding: 28px 22px; }
	.ga-popup__close { width: 44px; height: 44px; }
	/* Always stack on small screens, image on top, regardless of chosen side. */
	.ga-popup--image-right .ga-popup__card { flex-direction: column; }
}
