.rh-popup {
	align-items: center;
	color: #002d4f;
	display: none;
	inset: 0;
	justify-content: center;
	opacity: 0;
	padding: 24px;
	position: fixed;
	transition: opacity 180ms ease;
	z-index: 100000;
}

.rh-popup.is-open {
	display: flex;
	opacity: 1;
}

.rh-popup__backdrop {
	background: rgba(0, 25, 48, 0.72);
	inset: 0;
	position: absolute;
}

.rh-popup__dialog {
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 24px 70px rgba(0, 25, 48, 0.3);
	color: #002d4f;
	isolation: isolate;
	max-height: calc(100vh - 48px);
	overflow: auto;
	padding: clamp(28px, 5vw, 52px);
	position: relative;
	transform: translateY(12px);
	transition: transform 180ms ease;
	width: 100%;
	z-index: 1;
}

.rh-popup.is-open .rh-popup__dialog {
	transform: translateY(0);
}

.rh-popup--small .rh-popup__dialog {
	max-width: 480px;
}

.rh-popup--medium .rh-popup__dialog {
	max-width: 680px;
}

.rh-popup--large .rh-popup__dialog {
	max-width: 900px;
}

.rh-popup__close {
	align-items: center;
	background: transparent;
	border: 0;
	border-radius: 50%;
	color: #002d4f;
	cursor: pointer;
	display: flex;
	font-size: 32px;
	height: 40px;
	justify-content: center;
	line-height: 1;
	padding: 0;
	position: absolute;
	right: 12px;
	top: 12px;
	width: 40px;
	z-index: 2;
}

.rh-popup__close:hover,
.rh-popup__close:focus-visible {
	background: #eef7fc;
	color: #0077cd;
}

.rh-popup__close:focus-visible {
	outline: 3px solid rgba(0, 119, 205, 0.35);
	outline-offset: 2px;
}

/* Reset inheritance from page sections (popups are often rendered inside <main>). */
.rh-popup__content,
.rh-popup__rich-text,
.rh-popup__html,
.rh-popup__rich-text p,
.rh-popup__rich-text li,
.rh-popup__rich-text h1,
.rh-popup__rich-text h2,
.rh-popup__rich-text h3,
.rh-popup__rich-text h4,
.rh-popup__rich-text h5,
.rh-popup__rich-text h6,
.rh-popup__html p,
.rh-popup__html li,
.rh-popup__html label,
.rh-popup__html span {
	color: #002d4f;
}

.rh-popup__rich-text a,
.rh-popup__html a {
	color: #0077cd;
}

.rh-popup__rich-text,
.rh-popup__html,
.rh-popup__ctas {
	display: block;
	visibility: visible;
	opacity: 1;
}

.rh-popup__rich-text + .rh-popup__rich-text,
.rh-popup__html + .rh-popup__rich-text,
.rh-popup__rich-text + .rh-popup__html,
.rh-popup__ctas + .rh-popup__rich-text,
.rh-popup__rich-text + .rh-popup__ctas,
.rh-popup__html + .rh-popup__ctas,
.rh-popup__ctas + .rh-popup__html {
	margin-top: 24px;
}

.rh-popup__rich-text > :first-child,
.rh-popup__html > :first-child {
	margin-top: 0;
}

.rh-popup__rich-text > :last-child,
.rh-popup__html > :last-child {
	margin-bottom: 0;
}

.rh-popup__ctas {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.rh-popup__cta--primary {
	background: #f36c21;
	border-color: #f36c21;
	color: #fff;
}

.rh-popup__cta--primary:hover,
.rh-popup__cta--primary:focus {
	background: #d9560d;
	border-color: #d9560d;
	color: #fff;
}

.rh-popup__cta--secondary {
	background: transparent;
	border-color: #0077cd;
	color: #0077cd;
}

.rh-popup__cta--secondary:hover,
.rh-popup__cta--secondary:focus {
	background: #0077cd;
	border-color: #0077cd;
	color: #fff;
}

.rh-popup__cta--text {
	background: transparent;
	border-color: transparent;
	color: #0077cd;
	padding-left: 0;
	padding-right: 0;
	text-decoration: underline;
}

.rh-popup__sr-only {
	border: 0;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

body.rh-popup-open {
	overflow: hidden;
}

@media (max-width: 575px) {
	.rh-popup {
		padding: 12px;
	}

	.rh-popup__dialog {
		max-height: calc(100vh - 24px);
		padding: 40px 22px 28px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rh-popup,
	.rh-popup__dialog {
		transition: none;
	}
}
