/**
 * IW — Lead Form (global)
 *
 * Section full-width breakout (theo pattern iw-pdh-detail). Form card narrow,
 * centered. Tokens: --iw-container-* (global), color #4564ED (CTA primary),
 * #D1D1D1 (border), #FF2156 (required *), #888 (disclaimer text).
 */

.iw-lead-form {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	background: #fff;
	padding: 80px 0;
}

.iw-lead-form__container {
	max-width: var(--iw-container-max, 1488px);
	margin: 0 auto;
	padding: 0 var(--iw-container-pad-x, 24px);
	display: flex;
	justify-content: center;
}

.iw-lead-form__card {
	width: 100%;
	max-width: 730px;
	display: flex;
	flex-direction: column;
	gap: 40px;
	padding: 0 40px;
}

/* Heading */
.iw-lead-form__heading {
	margin: 0;
	font-family: inherit;
	font-weight: 700;
	font-size: 40px;
	line-height: 1.4;
	color: #3d3d3d;
	text-align: center;
}
.iw-lead-form__heading-line {
	display: block;
}

/* Form */
.iw-lead-form__form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.iw-lead-form .iw-lead-form__fields {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.iw-lead-form .iw-lead-form__field {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
	padding: 0;
}

/* Label — override Flatsome's uppercase/bold/letter-spacing/text-color */
.iw-lead-form .iw-lead-form__label {
	display: inline-flex;
	align-items: baseline;
	gap: 4px;
	margin: 0;
	padding: 0;
	font-family: inherit;
	font-weight: 510;
	font-size: 16px;
	line-height: 22px;
	letter-spacing: normal;
	text-transform: none;
	color: #3d3d3d;
}

.iw-lead-form .iw-lead-form__required {
	color: #ff2156;
	font-weight: 510;
	font-size: inherit;
	line-height: 1.4;
}

.iw-lead-form .iw-lead-form__optional {
	color: #888;
	font-weight: 400;
	font-size: 14px;
	line-height: 20px;
}

/* Input — override Flatsome bg #fafafa + inset shadow + min-height */
.iw-lead-form .iw-lead-form__input,
.iw-lead-form input[type="text"].iw-lead-form__input,
.iw-lead-form input[type="tel"].iw-lead-form__input,
.iw-lead-form input[type="email"].iw-lead-form__input {
	display: block;
	width: 100%;
	height: 48px;
	min-height: 0;
	max-width: none;
	margin: 0;
	padding: 12px;
	border: 1px solid #d1d1d1;
	border-radius: 8px;
	background-color: #fff;
	background-image: none;
	box-shadow: none;
	font-family: inherit;
	font-weight: 400;
	font-size: 16px;
	line-height: 22px;
	color: #3d3d3d;
	letter-spacing: normal;
	text-transform: none;
	box-sizing: border-box;
	transition: border-color .2s ease, box-shadow .2s ease;
	-webkit-appearance: none;
	appearance: none;
}
.iw-lead-form .iw-lead-form__input::placeholder {
	color: #d1d1d1;
	opacity: 1;
}
.iw-lead-form .iw-lead-form__input:focus {
	outline: none;
	border-color: var(--iw-accent, #4564ed);
	/* Focus glow theo accent của scheme (color-mix → khỏi cần token rgb riêng). */
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--iw-accent, #4564ed) 12%, transparent);
	background-color: #fff;
}
.iw-lead-form .iw-lead-form__field--error .iw-lead-form__input {
	border-color: #ff2156;
}

.iw-lead-form__error {
	margin: 0;
	font-size: 13px;
	line-height: 18px;
	color: #ff2156;
	min-height: 18px;
}
.iw-lead-form__error:empty {
	display: none;
}

.iw-lead-form .iw-lead-form__helper {
	margin: 0;
	padding: 0;
	font-family: inherit;
	font-weight: 400;
	font-size: 14px;
	line-height: 20px;
	letter-spacing: normal;
	color: #000;
	text-align: center;
}

/* CTA */
.iw-lead-form__cta-wrap {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.iw-lead-form .iw-lead-form__cta,
.iw-lead-form button.iw-lead-form__cta {
	width: 100%;
	min-width: 0;
	height: 48px;
	min-height: 0;
	margin: 0;
	padding: 8px 24px;
	background-color: var(--iw-cta-bg, #4564ed);
	background-image: none;
	color: var(--iw-cta-fg, #fff);
	/* Border cùng màu nền (vô hình) ở trạng thái thường để hover đổi sang
	   nền trắng + border variant mà không nhảy layout. */
	border: 1px solid var(--iw-cta-bg, #4564ed);
	box-sizing: border-box;
	border-radius: 8px;
	box-shadow: none;
	text-shadow: none;
	font-family: inherit;
	font-weight: 510;
	font-size: 16px;
	line-height: 22px;
	letter-spacing: normal;
	text-transform: none;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease, opacity .15s ease;
	-webkit-appearance: none;
	appearance: none;
}
/* Hover: nền trắng, border + chữ theo accent của scheme. */
.iw-lead-form .iw-lead-form__cta:hover,
.iw-lead-form button.iw-lead-form__cta:hover {
	background-color: #fff;
	border-color: var(--iw-accent, #4564ed);
	color: var(--iw-accent, #4564ed);
}
.iw-lead-form .iw-lead-form__cta[disabled] {
	opacity: .65;
	cursor: progress;
}

.iw-lead-form__cta-spinner {
	display: none;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, .35);
	border-top-color: #fff;
	animation: iw-lead-spin .7s linear infinite;
}
.iw-lead-form__cta[data-loading="1"] .iw-lead-form__cta-spinner {
	display: inline-block;
}
@keyframes iw-lead-spin {
	to { transform: rotate(360deg); }
}

.iw-lead-form__disclaimer {
	margin: 0;
	font-family: inherit;
	font-size: 12px;
	line-height: 1.5;
	color: #888;
	text-align: center;
}
.iw-lead-form__policy-link {
	color: #888;
	font-weight: 700;
	text-decoration: underline;
}

/* Feedback toast */
.iw-lead-form__feedback {
	margin: 0;
	padding: 12px;
	border-radius: 8px;
	font-size: 14px;
	line-height: 20px;
	text-align: center;
	display: none;
}
.iw-lead-form__feedback--success {
	display: block;
	background: #e8f5e9;
	color: #1b5e20;
}
.iw-lead-form__feedback--error {
	display: block;
	background: #ffebee;
	color: #b71c1c;
}

/* Mobile (theo design 407:41365) */
@media (max-width: 767px) {
	.iw-lead-form {
		padding: 40px 0;
	}
	.iw-lead-form__container {
		padding: 0 16px;
	}
	.iw-lead-form__card {
		padding: 0;
		gap: 16px;
	}
	.iw-lead-form__heading {
		font-size: 24px;
		line-height: 32px;
	}
	.iw-lead-form__form {
		gap: 24px;
	}
	.iw-lead-form__fields {
		gap: 16px;
	}
	.iw-lead-form__field {
		gap: 4px;
	}
	.iw-lead-form__label {
		font-size: 14px;
		line-height: 20px;
	}
	.iw-lead-form__input {
		height: 40px;
		padding: 8px 12px;
		font-size: 14px;
		line-height: 20px;
	}
	.iw-lead-form__cta {
		height: 40px;
	}
}

/* reCAPTCHA badge — bottom-right floating; dim when not interacting */
.grecaptcha-badge {
	z-index: 5;
}
