:root {
	--bhb-popup-accent: #1b75bc;
	--bhb-popup-accent-hover: #145d97;
	--bhb-popup-heading: #14181c;
	--bhb-popup-text: #4a5057;
	--bhb-popup-radius: 14px;
	--bhb-popup-max-width: 900px;
	--bhb-popup-overlay: rgba(8, 20, 30, 0.62);
}

.bhb-popup-overlay {
	position: fixed;
	inset: 0;
	z-index: 99990;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 56px 24px 24px;
	background: var(--bhb-popup-overlay);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.bhb-popup-overlay[hidden] { display: none; }
.bhb-popup-overlay.is-open { opacity: 1; visibility: visible; }

.bhb-popup {
	position: relative;
	width: 100%;
	max-width: var(--bhb-popup-max-width);
	margin: auto;
	background: #fff;
	border-radius: var(--bhb-popup-radius);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
	padding: 22px;
	display: grid;
	grid-template-columns: 1.05fr 1fr;
	gap: 34px;
	align-items: stretch;
	font-family: inherit;
	transform: translateY(14px) scale(0.985);
	transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.bhb-popup-overlay.is-open .bhb-popup { transform: none; }
.bhb-popup--image_right { grid-template-columns: 1fr 1.05fr; }
.bhb-popup--image_right .bhb-popup__media { order: 2; }

.bhb-popup--no-image,
.bhb-popup--text_only {
	grid-template-columns: 1fr;
	max-width: 560px;
}

.bhb-popup__media {
	position: relative;
	min-height: 260px;
	border-radius: 8px;
	overflow: hidden;
	background: #eef1f4;
}

.bhb-popup__image,
.bhb-popup__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	margin: 0;
	max-width: none;
}

.bhb-popup__content {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 18px 24px 18px 0;
}

.bhb-popup__heading {
	margin: 0 0 16px;
	font-size: clamp(25px, 2.4vw, 32px);
	line-height: 1.16;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: var(--bhb-popup-heading);
	text-transform: none;
}

.bhb-popup__body {
	margin: 0;
	font-size: 16px;
	line-height: 1.62;
	color: var(--bhb-popup-text);
}

.bhb-popup__body p { margin: 0 0 12px; }
.bhb-popup__body p:last-child { margin-bottom: 0; }

.bhb-popup__kicker {
	margin: 10px 0 0;
	font-size: 16px;
	line-height: 1.5;
	font-weight: 700;
	color: var(--bhb-popup-heading);
}

.bhb-popup__cta {
	display: inline-block;
	align-self: flex-start;
	margin-top: 26px;
	padding: 16px 30px;
	border-radius: 999px;
	background: var(--bhb-popup-accent);
	color: #fff;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.bhb-popup__cta:hover,
.bhb-popup__cta:focus {
	background: var(--bhb-popup-accent-hover);
	color: #fff;
	text-decoration: none;
	transform: translateY(-1px);
}

.bhb-popup__close {
	position: absolute;
	top: -40px;
	right: 0;
	width: 32px;
	height: 32px;
	padding: 4px;
	margin: 0;
	border: 0;
	background: none;
	color: #fff;
	cursor: pointer;
	line-height: 0;
	opacity: 0.9;
	transition: opacity 0.2s ease;
}

.bhb-popup__close:hover,
.bhb-popup__close:focus { opacity: 1; background: none; }

.bhb-popup__close svg {
	width: 100%;
	height: 100%;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	fill: none;
}

.bhb-popup-overlay :focus-visible {
	outline: 2px solid var(--bhb-popup-accent);
	outline-offset: 3px;
}

.bhb-popup__close:focus-visible { outline-color: #fff; }

html.bhb-popup-locked,
html.bhb-popup-locked body { overflow: hidden; }

@media (max-width: 860px) {
	.bhb-popup-overlay { padding: 24px 16px; align-items: flex-start; }

	.bhb-popup,
	.bhb-popup--image_right {
		grid-template-columns: 1fr;
		gap: 20px;
		max-width: 460px;
		padding: 16px;
	}

	.bhb-popup--image_right .bhb-popup__media { order: 0; }
	.bhb-popup__media { min-height: 0; aspect-ratio: 16 / 10; }
	.bhb-popup__image,
	.bhb-popup__media img { position: static; height: 100%; }
	.bhb-popup__content { padding: 0 6px 10px; }
	.bhb-popup__heading { font-size: 23px; padding-right: 28px; }
	.bhb-popup__body,
	.bhb-popup__kicker { font-size: 15px; }

	.bhb-popup__cta {
		align-self: stretch;
		text-align: center;
		margin-top: 20px;
		padding: 15px 22px;
		font-size: 16px;
	}

	.bhb-popup__close {
		top: 8px;
		right: 8px;
		width: 34px;
		height: 34px;
		padding: 7px;
		border-radius: 50%;
		background: rgba(255, 255, 255, 0.92);
		color: #14181c;
		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
	}

	.bhb-popup__close:hover,
	.bhb-popup__close:focus { background: #fff; }
}

@media (prefers-reduced-motion: reduce) {
	.bhb-popup-overlay,
	.bhb-popup,
	.bhb-popup__cta { transition: none; }
}
