/* ======================================================
   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;
}

/* ======================================================
   Contact Form 7
====================================================== */

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

.results-popup__form .wpcf7,
.results-popup__form .wpcf7-form {
	margin: 0;
}

.results-popup__form .wpcf7-form p {
	margin: 0 0 15px;
}

.results-popup__form label {
	display: block;
	color: #1b2248;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.5;
}

.results-popup__form .wpcf7-form-control-wrap {
	display: block;
	width: 100%;
	margin-top: 7px;
}

.results-popup__form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
.results-popup__form select,
.results-popup__form textarea {
	display: block;
	width: 100%;
	min-height: 48px;
	padding: 12px 14px;
	box-sizing: border-box;
	border: 1px solid #dce1ec;
	border-radius: 10px;
	color: #171b32;
	background: #ffffff;
	font: inherit;
	font-size: 14px;
	line-height: 1.4;
	transition:
		border-color 0.2s ease,
		box-shadow 0.2s ease;
}

.results-popup__form textarea {
	min-height: 105px;
	resize: vertical;
}

.results-popup__form input:not([type="submit"]):focus,
.results-popup__form select:focus,
.results-popup__form textarea:focus {
	border-color: #7657d6;
	outline: 0;
	box-shadow: 0 0 0 3px rgba(118, 87, 214, 0.12);
}

.results-popup__form input[type="checkbox"],
.results-popup__form input[type="radio"] {
	width: auto;
	margin-right: 6px;
}

.results-popup__form input[type="submit"] {
	display: inline-flex;
	width: 100%;
	min-height: 50px;
	padding: 12px 22px;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 28px;
	color: #ffffff;
	background: #ed417f;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition:
		background-color 0.2s ease,
		transform 0.2s ease;
}

.results-popup__form input[type="submit"]:hover {
	background: #d92c6b;
	transform: translateY(-1px);
}

.results-popup__form input[type="submit"]:focus-visible {
	outline: 3px solid #7657d6;
	outline-offset: 3px;
}

.results-popup__form .wpcf7-spinner {
	display: block;
	margin: 12px auto 0;
}

.results-popup__form .wpcf7-not-valid-tip {
	display: block;
	margin-top: 5px;
	color: #c62828;
	font-size: 12px;
	line-height: 1.4;
}

.results-popup__form .wpcf7-response-output {
	margin: 16px 0 0;
	padding: 12px 14px;
	border-radius: 10px;
	font-size: 13px;
	line-height: 1.5;
}

.results-popup__form .wpcf7 form.invalid .wpcf7-response-output,
.results-popup__form .wpcf7 form.unaccepted .wpcf7-response-output,
.results-popup__form .wpcf7 form.payment-required .wpcf7-response-output {
	border-color: #e7a93b;
	background: #fff9ec;
}

.results-popup__form .wpcf7 form.sent .wpcf7-response-output {
	border-color: #2e9f67;
	background: #effaf4;
}

/* Prevent page scrolling while open */

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

/* Popup 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;
	}

	.results-popup__form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
	.results-popup__form select,
	.results-popup__form textarea {
		font-size: 16px;
	}

	.results-popup__form input[type="submit"] {
		min-height: 48px;
	}
}

/* ======================================================
   Reduced motion
====================================================== */

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