/**
 * RCS Lead Form - functional styles only.
 *
 * Nothing here changes the existing hero design. It only covers the
 * honeypot field, the button loading state and the inline messages.
 */

/* Honeypot: hidden from humans, still reachable by bots. */
.rcs-lead-form .rcs-hp-wrap {
	position: absolute !important;
	left: -9999px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

/* Inline message block. */
.rcs-lead-form .rcs-form-message {
	display: none;
	grid-column: 1 / -1;
	margin: 2px 0 0;
	padding: 13px 15px;
	border-radius: 10px;
	border: 1px solid transparent;
	font-size: 13px;
	line-height: 1.55;
	font-weight: 600;
}

.rcs-lead-form .rcs-form-message.rcs-is-visible {
	display: block;
}

.rcs-lead-form .rcs-message-success {
	background: rgba(31, 122, 66, 0.10);
	border-color: rgba(31, 122, 66, 0.35);
	color: #1c6b3b;
}

.rcs-lead-form .rcs-message-error {
	background: rgba(178, 46, 36, 0.09);
	border-color: rgba(178, 46, 36, 0.32);
	color: #a32b22;
}

/* Loading + sent states on the existing submit button. */
.rcs-lead-form .rcs-form-submit[disabled],
.rcs-lead-form.rcs-is-loading .rcs-form-submit,
.rcs-lead-form.rcs-is-sent .rcs-form-submit {
	cursor: not-allowed;
	opacity: 0.72;
	transform: none;
}

.rcs-lead-form.rcs-is-loading .rcs-form-submit svg,
.rcs-lead-form.rcs-is-sent .rcs-form-submit svg {
	display: none;
}

.rcs-lead-form.rcs-is-loading .rcs-form-submit::after {
	content: "";
	width: 15px;
	height: 15px;
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: #ffffff;
	animation: rcs-spin 0.7s linear infinite;
}

@keyframes rcs-spin {
	to {
		transform: rotate(360deg);
	}
}

.rcs-lead-form.rcs-is-loading input,
.rcs-lead-form.rcs-is-loading textarea {
	opacity: 0.85;
}

@media (max-width: 767px) {
	.rcs-lead-form .rcs-form-message {
		grid-column: auto;
		font-size: 12.5px;
		padding: 12px 13px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rcs-lead-form.rcs-is-loading .rcs-form-submit::after {
		animation: none;
	}
}
