/* =============================================
   Lead Capture Popup — Self-Contained Styles
   Includes form element styles scoped to the
   popup so it works on every page regardless
   of whether home.css is loaded.
   ============================================= */

/* --- Overlay & Backdrop --- */
.kpg-lead-popup-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	padding: 20px;
	font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 16px;
	line-height: 1.42;
	color: var(--ink, #353435);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

.kpg-lead-popup-overlay.active {
	opacity: 1;
	visibility: visible;
}

.kpg-lead-popup-overlay.active .kpg-lead-popup-content {
	opacity: 1;
	transform: translateY(0) scale(1);
}

/* --- Single-Column Container --- */
.kpg-lead-popup-content {
	background: #fff;
	border-radius: 24px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
	width: 100%;
	max-width: 560px;
	position: relative;
	opacity: 0;
	transform: translateY(20px) scale(0.95);
	transition: opacity 0.3s ease, transform 0.3s ease;
	max-height: 90vh;
	overflow-y: auto;
}

/* --- Form Card --- */
.kpg-lead-popup-content .form-card {
	background: #fff;
	border-radius: 24px;
	padding: 30px;
	display: flex;
	flex-direction: column;
	gap: 24px;
}

/* --- Heading & Subheading --- */
.kpg-lead-popup-content .h2 {
	margin: 0;
	font-size: 28px;
	font-weight: 700;
	letter-spacing: -0.025em;
	line-height: 1.15;
	color: var(--maroon, #6a133d);
	text-align: center;
}

.kpg-lead-popup-content .lead {
	margin: 0;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.5;
	color: #6c6c6c;
	text-align: center;
}

/* =============================================
   Form Elements — Scoped to popup
   ============================================= */

/* --- Form Layout --- */
.kpg-lead-popup-form {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

/* --- Field Row --- */
.kpg-lead-popup-overlay .frow {
	display: flex;
	gap: 24px;
	width: 100%;
}

.kpg-lead-popup-overlay .frow .field {
	flex: 1;
}

/* --- Field Container --- */
.kpg-lead-popup-overlay .field {
	position: relative;
	border-radius: 12px;
	box-shadow: inset 0 0 0 2px var(--pinkline, #fcd2de);
	height: 50px;
}

/* --- Floating Label --- */
.kpg-lead-popup-overlay .field .flabel {
	position: absolute;
	top: -7px;
	left: 27px;
	background: #fff;
	padding: 0 4px;
	font-size: 12px;
	font-weight: 600;
	color: var(--maroon, #6a133d);
}

/* --- Input, Select, Fake --- */
.kpg-lead-popup-overlay .field input,
.kpg-lead-popup-overlay .field .fselect,
.kpg-lead-popup-overlay .field .fake {
	width: 100%;
	height: 100%;
	border: none;
	background: none;
	outline: none;
	padding: 0 27px;
	font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 15px;
	font-weight: 500;
	color: var(--maroon, #6a133d);
	-webkit-appearance: none;
	appearance: none;
}

.kpg-lead-popup-overlay .field input::placeholder {
	color: #6c6c6c;
}

/* --- Select Chevron --- */
.kpg-lead-popup-overlay .field .fchev {
	position: absolute;
	right: 18px;
	top: 50%;
	transform: translateY(-50%);
	width: 16px;
	height: 16px;
	fill: none;
	stroke: var(--pink, #f2a1b4);
	stroke-width: 2.2;
	stroke-linecap: round;
	stroke-linejoin: round;
	pointer-events: none;
}

/* --- Textarea --- */
.kpg-lead-popup-overlay .field.textarea-field {
	height: 120px;
}

.kpg-lead-popup-overlay .field textarea {
	width: 100%;
	height: 100%;
	border: none;
	background: none;
	outline: none;
	padding: 18px 27px;
	font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 15px;
	font-weight: 500;
	color: var(--maroon, #6a133d);
	resize: none;
}

.kpg-lead-popup-overlay .field textarea::placeholder {
	color: #6c6c6c;
}

/* --- Button --- */
.kpg-lead-popup-overlay .btn {
	position: relative;
	overflow: hidden;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 11px;
	border-radius: 58px;
	padding: 15px 22px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	border: none;
	white-space: nowrap;
	line-height: 1;
	letter-spacing: 0.2px;
	text-decoration: none;
	font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.kpg-lead-popup-overlay .btn-magenta {
	background-color: var(--magenta, #e50687);
	color: #fff;
	transition: background-color 0.25s ease, transform 0.18s cubic-bezier(0.2, 0.8, 0.3, 1), box-shadow 0.18s ease;
}

/* --- Field Error State --- */
.kpg-lead-popup-overlay .field.has-error {
	box-shadow: inset 0 0 0 2px #ff0000;
}

.kpg-lead-popup-overlay .field.has-error .flabel {
	color: #ff0000;
}

/* --- Thank You State --- */
.kpg-lead-popup-thankyou {
	display: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 16px;
	text-align: center;
	padding: 40px 20px;
}

.kpg-lead-popup-thankyou.show {
	display: flex;
}

.kpg-lead-popup-thankyou .tick {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: var(--magenta, #e50687);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 32px;
}

.kpg-lead-popup-thankyou h3 {
	margin: 0;
	font-size: 28px;
	font-weight: 600;
	color: var(--maroon, #6a133d);
}

.kpg-lead-popup-thankyou p {
	margin: 0;
	color: var(--ink, #353435);
	max-width: 400px;
	line-height: 1.5;
}

/* --- Close Button --- */
.kpg-lead-popup-close {
	position: absolute;
	top: 15px;
	right: 15px;
	width: 30px;
	height: 30px;
	border: none;
	background: transparent;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--maroon, #6a133d);
	font-size: 28px;
	line-height: 1;
	padding: 0;
	transition: transform 0.2s ease, color 0.2s ease;
	z-index: 10;
}

.kpg-lead-popup-close:hover {
	color: var(--magenta, #e50687);
}

.kpg-lead-popup-close:focus {
	outline: 2px solid var(--magenta, #e50687);
	outline-offset: 2px;
	border-radius: 4px;
}

/* --- Body Scroll Lock --- */
body.kpg-popup-open {
	overflow: hidden;
}

/* =============================================
   Responsive
   ============================================= */

@media (max-width: 1024px) {
	.kpg-lead-popup-content {
		max-width: 520px;
	}
}

@media (max-width: 768px) {
	.kpg-lead-popup-content {
		max-width: 100%;
		border-radius: 16px;
		max-height: 95vh;
	}

	.kpg-lead-popup-content .form-card {
		padding: 24px 20px;
		border-radius: 16px;
	}

	.kpg-lead-popup-close {
		top: 12px;
		right: 12px;
		width: 36px;
		height: 36px;
		font-size: 24px;
	}
}

@media (max-width: 480px) {
	.kpg-lead-popup-overlay {
		padding: 12px;
	}

	.kpg-lead-popup-content {
		border-radius: 12px;
	}

	.kpg-lead-popup-content .form-card {
		padding: 20px 16px;
		border-radius: 12px;
	}

	.kpg-lead-popup-close {
		top: 8px;
		right: 8px;
	}
}

@media print {
	.kpg-lead-popup-overlay {
		display: none !important;
	}
}