/**
 * Visual match for Popup Builder popup 1456 (theme 2 plus the site custom CSS).
 * The close button sits outside the panel, so overflow is visible on the
 * dialog wrapper and clipping is limited to the inner panel.
 *
 * Width: 100vw minus 32px (room for the close button), capped at 832px, which
 * is Popup Builder's 900px max-width after its padding and close-button math.
 * Vertical position is 9px below true center to match Popup Builder, which
 * centers using a 1px theme border while the custom border is 10px.
 */

.alp-popup-root[hidden] {
	display: none !important;
}

.alp-popup-overlay {
	position: fixed;
	inset: 0;
	z-index: 9999;
	background-color: #ffffff;
	opacity: 0.8;
}

.alp-popup-wrap {
	position: fixed;
	inset: 0;
	z-index: 10009;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	padding: 0;
	overflow: visible;
	pointer-events: none;
}

.alp-popup-dialog {
	pointer-events: auto;
	position: relative;
	overflow: visible;
	box-sizing: border-box;
	width: calc(100vw - 32px);
	max-width: 832px;
	top: 9px;
}

.alp-popup-panel {
	box-sizing: border-box;
	width: 100%;
	height: auto;
	max-height: calc(100vh - 56px);
	padding: 40px;
	overflow: auto;
	border: none;
	border-top: 10px solid #48347d;
	border-bottom: 10px solid #48347d;
	border-radius: 0;
	color: #333;
	font-family: "Lato", Helvetica, Arial, sans-serif;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.5;
	background-color: #fdeeca;
	background-image: var(--alp-bg-image);
	background-size: cover;
	background-repeat: no-repeat;
	background-position: center;
	-webkit-overflow-scrolling: touch;
}

/* Programmatic focus on open must not draw a ring (live does not). The close button keeps a visible focus style. */
.alp-popup-dialog:focus,
.alp-popup-dialog:focus-visible {
	outline: none;
}

.alp-popup-root.is-open .alp-popup-dialog {
	animation: alp-popup-fadein 1s linear;
}

@media (prefers-reduced-motion: reduce) {
	.alp-popup-root.is-open .alp-popup-dialog {
		animation: none;
	}
}

@keyframes alp-popup-fadein {
	from { opacity: 0; }
	to { opacity: 1; }
}

.alp-popup-close {
	position: absolute;
	top: -16px;
	right: -16px;
	z-index: 2;
	box-sizing: content-box;
	display: block;
	margin: 0;
	padding: 5px;
	width: auto;
	height: auto;
	border: 1px solid #48347d;
	border-radius: 20px;
	background: #fff;
	cursor: pointer;
	line-height: 0;
	appearance: none;
	-webkit-appearance: none;
}

.alp-popup-close:hover,
.alp-popup-close:focus {
	opacity: 0.8;
}

.alp-popup-close:focus {
	outline: 2px solid #48347d;
	outline-offset: 2px;
}

.alp-popup-close img {
	display: block;
	width: 32px;
	height: 32px;
	border: 0;
}

.alp-popup-content {
	width: 50%;
	box-sizing: border-box;
}

.alp-nowrap {
	white-space: nowrap;
}

.alp-popup-kicker {
	margin: 0;
	color: #092cb6;
	font-size: 1.5rem;
}

.alp-popup-title {
	margin: 5px 0 20px 0;
	font-size: 2rem;
	line-height: 1.3em;
	color: #333;
}

.alp-popup-body,
.alp-popup-cta {
	/* Match the Atsena theme rule: p { margin: 0 0 20px 0; } */
	margin: 0 0 20px 0;
}

.alp-popup-dialog a,
.alp-popup-dialog a:visited {
	color: #0099cc;
	text-decoration: none;
	outline: none;
}

.alp-popup-dialog a:hover,
.alp-popup-dialog a:active {
	color: #0099cc;
	text-decoration: underline;
}

.alp-popup-dialog a:focus {
	outline: 2px solid #0099cc;
	outline-offset: 2px;
}

/* Match the original: drop the photo at 640px and under, use the cream gradient, full-width text. */
@media screen and (max-width: 640px) {
	.alp-popup-panel {
		background-image: none !important;
		background-color: #fdeeca !important;
		background-image: linear-gradient(180deg, #fff8f1 0%, #fdeeca 100%) !important;
	}

	.alp-popup-content {
		width: 100% !important;
	}
}
