/*
 * Lead forms (inc/lead-forms.php, assets/js/lead-forms.js).
 *
 * The design sets nearly everything inline; this sheet only adds what inline
 * styles cannot express — focus and invalid states (the design's
 * `style-focus=""` attribute is not a thing browsers honour), the captcha row,
 * the status line and the thank-you toast.
 */

/* Focus: the design's intended look, which never applied. */
.itc-lead input:not([type="hidden"]):focus,
.itc-lead select:focus,
.itc-lead textarea:focus {
	outline: none;
	border-color: #2F54FF !important;
	box-shadow: 0 0 0 4px rgba(47, 84, 255, 0.12) !important;
}

.itc-lead[data-lead="contact"] input:focus,
.itc-lead[data-lead="contact"] select:focus,
.itc-lead[data-lead="contact"] textarea:focus {
	background: #fff !important;
}

/* Dark newsletter boxes use the lime accent. */
.itc-lead[data-lead="newsletter"] input:focus,
.itc-lead[data-lead="whitepaper"] input:focus {
	border-color: #C6F24E !important;
	box-shadow: 0 0 0 4px rgba(198, 242, 78, 0.14) !important;
}

.itc-lead [aria-invalid="true"] {
	border-color: #E5484D !important;
}

/* Label text + asterisk stay on one line (see itc_lead_contact_form()). */
.itc-lead-lbl {
	display: block;
}

.itc-lead select {
	appearance: auto;
	cursor: pointer;
}

/* Captcha and message take a full row, even inside the flex-wrap email rows. */
.itc-lead-captcha,
.itc-lead-msg {
	flex: 0 0 100%;
	width: 100%;
}

.itc-lead-captcha {
	min-height: 78px;
}

.itc-lead-captcha[hidden],
.itc-lead-msg[hidden] {
	display: none !important;
}

/* The reCAPTCHA iframe is a fixed 304px; scale it down on narrow phones. */
@media (max-width: 360px) {
	.itc-lead-captcha > div {
		transform: scale(0.88);
		transform-origin: 0 0;
	}
}

.itc-lead-msg {
	margin: 0;
	font-size: 13.5px;
	font-weight: 600;
	color: #E5484D;
}

.itc-lead[data-lead="newsletter"] .itc-lead-msg,
.itc-lead[data-lead="whitepaper"] .itc-lead-msg {
	color: #FF8A8E;
}

.itc-lead [type="submit"] {
	cursor: pointer;
}

.itc-lead [type="submit"][disabled] {
	opacity: 0.7;
	cursor: progress;
	transform: none !important;
}

/* Thank-you toast. Top of the screen: the cookie banner owns the bottom. */
.itc-lead-toast {
	position: fixed;
	left: 50%;
	top: 24px;
	z-index: 10000;
	max-width: min(520px, calc(100vw - 32px));
	padding: 16px 22px 16px 48px;
	border-radius: 14px;
	background: #0A0E17;
	color: #EDF0F6;
	font: 600 15px/1.5 'Public Sans', system-ui, sans-serif;
	border: 1px solid rgba(198, 242, 78, 0.4);
	box-shadow: 0 30px 60px -20px rgba(10, 14, 23, 0.6);
	opacity: 0;
	transform: translate(-50%, -16px);
	transition: opacity 0.3s ease, transform 0.3s ease;
	pointer-events: none;
}

.itc-lead-toast::before {
	content: "✓";
	position: absolute;
	left: 18px;
	top: 50%;
	transform: translateY(-50%);
	color: #C6F24E;
	font-weight: 800;
}

.itc-lead-toast.is-in {
	opacity: 1;
	transform: translate(-50%, 0);
}

/* Honeypot — off-screen rather than display:none, which some bots skip. */
.itc-lead-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	opacity: 0 !important;
	pointer-events: none !important;
}
