/* ======================================================
   Results popup
====================================================== */

.results-popup {
	position: fixed;
	z-index: 99999;
	inset: 0;
	display: grid;
	padding: 24px;
	place-items: center;
	background: rgba(12, 18, 48, 0.58);
	backdrop-filter: blur(5px);
	-webkit-backdrop-filter: blur(5px);
}

.results-popup[hidden] {
	display: none;
}

.results-popup__dialog {
	position: relative;
	width: min(620px, 100%);
	max-height: calc(100vh - 48px);
	padding: 36px;
	overflow-y: auto;
	box-sizing: border-box;
	border: 1px solid #e2e6f0;
	border-radius: 24px;
	background: #ffffff;
	box-shadow: 0 24px 70px rgba(16, 27, 77, 0.24);
	animation: results-popup-in 0.22s ease;
}

/* Close button */

.results-popup__close {
	position: absolute;
	top: 16px;
	right: 16px;
	display: grid;
	width: 42px;
	height: 42px;
	padding: 0;
	place-items: center;
	border: 1px solid #dfe3ed;
	border-radius: 50%;
	color: #202a57;
	background: #ffffff;
	font: inherit;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	transition:
		color 0.2s ease,
		background-color 0.2s ease,
		border-color 0.2s ease;
}

.results-popup__close:hover {
	border-color: #ef8db4;
	color: #e83d7e;
	background: #fff7fa;
}

.results-popup__close:focus-visible {
	outline: 3px solid #7657d6;
	outline-offset: 3px;
}

/* Popup heading */

.results-popup__header {
	padding-right: 50px;
}

.results-popup__kicker {
	display: inline-flex;
	margin-bottom: 14px;
	color: #e83d7e;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.results-popup__header h2 {
	max-width: 500px;
	margin: 0;
	color: #151a34;
	font-size: clamp(1.8rem, 4vw, 2.5rem);
	line-height: 1.08;
	letter-spacing: -0.035em;
}

.results-popup__header p {
	max-width: 540px;
	margin: 16px 0 0;
	color: #66708a;
	font-size: 15px;
	line-height: 1.7;
}

.results-popup__form {
	margin-top: 26px;
}

/* Prevent page scrolling while open */

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

/* Animation */

@keyframes results-popup-in {
	from {
		opacity: 0;
		transform: translateY(12px) scale(0.98);
	}

	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

/* Mobile */

@media (max-width: 600px) {
	.results-popup {
		padding: 14px;
	}

	.results-popup__dialog {
		width: 100%;
		max-height: calc(100vh - 28px);
		padding: 28px 20px 22px;
		border-radius: 20px;
	}

	.results-popup__header {
		padding-right: 38px;
	}

	.results-popup__header h2 {
		font-size: 1.8rem;
	}

	.results-popup__header p {
		font-size: 14px;
		line-height: 1.65;
	}

	.results-popup__form {
		margin-top: 22px;
	}
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
	.results-popup__dialog,
	.results-popup__close {
		animation: none;
		transition: none;
	}
}