/* mod_leadpopup - pre-launch lead capture popup */

.leadpopup {
	position: fixed;
	inset: 0;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	direction: rtl;
	text-align: right;
	font-family: inherit;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.leadpopup[hidden] {
	display: none;
}

.leadpopup__overlay {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background: rgba(12, 20, 30, .62);
	animation: lp-fade .25s ease-out;
}

.leadpopup__dialog {
	position: relative;
	width: 100%;
	max-width: var(--lp-max-width, 520px);
	margin: auto;
	background: #fff;
	color: #23282d;
	border-radius: 14px;
	box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
	padding: 28px 26px 24px;
	animation: lp-pop .28s cubic-bezier(.2, .9, .3, 1.2);
	box-sizing: border-box;
}

.leadpopup__dialog * {
	box-sizing: border-box;
}

.leadpopup__close {
	position: absolute;
	top: 8px;
	left: 10px;
	width: 34px;
	height: 34px;
	line-height: 1;
	font-size: 26px;
	color: #8a939b;
	background: transparent;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	padding: 0;
}

.leadpopup__close:hover,
.leadpopup__close:focus {
	color: #23282d;
	background: #f0f2f4;
}

.leadpopup__title {
	margin: 0 0 10px;
	font-size: 1.45rem;
	line-height: 1.35;
	font-weight: 700;
	color: #17202a;
}

.leadpopup__subtitle {
	margin: 0 0 12px;
	font-size: 1.05rem;
	line-height: 1.5;
	color: #4b5560;
}

.leadpopup__text {
	margin: 0 0 18px;
	font-size: 1rem;
	line-height: 1.6;
	color: #4b5560;
}

.leadpopup__text p:last-child {
	margin-bottom: 0;
}

.leadpopup__form {
	margin: 0;
}

.leadpopup__field {
	margin-bottom: 14px;
}

.leadpopup__label {
	display: block;
	margin-bottom: 5px;
	font-size: .95rem;
	font-weight: 600;
	color: #2c3540;
}

.leadpopup__req {
	color: #d33;
	margin-right: 2px;
}

.leadpopup__input {
	display: block;
	width: 100%;
	height: 46px;
	padding: 8px 12px;
	font-size: 16px; /* keeps iOS from zooming on focus */
	font-family: inherit;
	color: #23282d;
	background: #fff;
	border: 1px solid #ccd3da;
	border-radius: 8px;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.leadpopup__input:focus {
	outline: none;
	border-color: var(--lp-accent, #0f6ab4);
	box-shadow: 0 0 0 3px rgba(15, 106, 180, .18);
}

.leadpopup__field--invalid .leadpopup__input {
	border-color: #d33;
}

.leadpopup__error {
	display: block;
	margin-top: 5px;
	font-size: .85rem;
	color: #c62828;
}

.leadpopup__error[hidden] {
	display: none;
}

.leadpopup__field--check {
	margin-top: 4px;
}

.leadpopup__check {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: .92rem;
	line-height: 1.45;
	color: #4b5560;
	cursor: pointer;
	font-weight: 400;
}

.leadpopup__check input {
	margin: 3px 0 0;
	width: 17px;
	height: 17px;
	flex: 0 0 auto;
	accent-color: var(--lp-accent, #0f6ab4);
}

.leadpopup__formerror {
	margin: 0 0 12px;
	padding: 9px 12px;
	font-size: .9rem;
	color: #8a1f1f;
	background: #fdecec;
	border: 1px solid #f5c2c2;
	border-radius: 8px;
}

.leadpopup__formerror[hidden] {
	display: none;
}

.leadpopup__submit {
	display: block;
	width: 100%;
	margin-top: 18px;
	padding: 13px 18px;
	font-size: 1.05rem;
	font-family: inherit;
	font-weight: 700;
	color: #fff;
	background: var(--lp-accent, #0f6ab4);
	border: 0;
	border-radius: 9px;
	cursor: pointer;
	transition: filter .15s ease;
}

.leadpopup__submit:hover:not(:disabled) {
	filter: brightness(1.08);
}

.leadpopup__submit:disabled {
	opacity: .65;
	cursor: default;
}

/* Honeypot - kept out of sight but not display:none, so bots still fill it. */
.leadpopup__hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.leadpopup__sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.leadpopup__thanks {
	text-align: center;
	padding: 10px 0 6px;
}

.leadpopup__thanks[hidden] {
	display: none;
}

.leadpopup__panel[hidden] {
	display: none;
}

.leadpopup__check-icon {
	width: 58px;
	height: 58px;
	margin: 0 auto 14px;
	line-height: 58px;
	font-size: 30px;
	color: #fff;
	background: #2e9e5b;
	border-radius: 50%;
}

@keyframes lp-fade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes lp-pop {
	from { opacity: 0; transform: translateY(14px) scale(.97); }
	to   { opacity: 1; transform: none; }
}

@media (max-width: 480px) {
	.leadpopup {
		padding: 10px;
		align-items: flex-start;
	}

	.leadpopup__dialog {
		padding: 24px 18px 20px;
		border-radius: 12px;
	}

	.leadpopup__title {
		font-size: 1.25rem;
	}

	.leadpopup__subtitle {
		font-size: .98rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.leadpopup__overlay,
	.leadpopup__dialog {
		animation: none;
	}
}
