/* ------------------------------------------------------------
 * Forms (validation feedback, honeypot, thank-you pages)
 * ---------------------------------------------------------- */

/* Honeypot field — visually and programmatically hidden from humans. */
.sb-hp {
	position: absolute !important;
	left: -9999px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

/* Per-field inline error, injected after a control by assets/js/forms.js. */
.sb-field-error {
	display: block;
	min-height: 1.1em;
	margin-top: 5px;
	color: #f87171;
	font-size: 12px;
	line-height: 1.35;
}

[data-theme="light"] .sb-field-error {
	color: #b91c1c;
}

/* Banner shown above the form after the server rejected a submission
 * (the redirect back carries ?sb_form_error=1). */
.sb-form-error {
	margin-bottom: 16px;
	padding: 11px 14px;
	border-radius: 10px;
	font-size: 13.5px;
	line-height: 1.5;
	color: #f87171;
	background: rgba(248, 113, 113, 0.08);
	border: 1px solid rgba(248, 113, 113, 0.25);
}

[data-theme="light"] .sb-form-error {
	color: #b91c1c;
	background: rgba(239, 68, 68, 0.07);
	border-color: rgba(239, 68, 68, 0.3);
}

/* Success banner (footer newsletter after ?sb_newsletter_done=1). */
.sb-form-success {
	margin-bottom: 12px;
	padding: 11px 14px;
	border-radius: 10px;
	font-size: 13.5px;
	line-height: 1.5;
	color: #4ade80;
	background: rgba(74, 222, 128, 0.08);
	border: 1px solid rgba(74, 222, 128, 0.25);
}

[data-theme="light"] .sb-form-success {
	color: #15803d;
	background: rgba(34, 197, 94, 0.07);
	border-color: rgba(34, 197, 94, 0.3);
}

/* Submit-in-flight state (valid submit → native POST is on its way). */
button.sb-submitting,
input[type="submit"].sb-submitting {
	opacity: 0.65;
	pointer-events: none;
}

/* Flagged controls. */
form[data-sb-form] [aria-invalid="true"] {
	border-color: rgba(248, 113, 113, 0.55) !important;
}

/* Required checkboxes (consent): the error span is injected after the
 * wrapping label, so give it the full form row directly beneath it. */
form[data-sb-form] label + .sb-field-error {
	grid-column: 1 / -1;
}

/* Custom-styled checkbox box (the input itself is visually hidden). */
form[data-sb-form] input[type="checkbox"][aria-invalid="true"] + .box {
	border-color: rgba(248, 113, 113, 0.55) !important;
}

/* Thank-you pages: success badge above the heading. */
.sb-ty-check {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 76px;
	height: 76px;
	border-radius: 50%;
	color: #4ade80;
	background: rgba(74, 222, 128, 0.1);
	border: 1px solid rgba(74, 222, 128, 0.35);
	box-shadow: 0 0 46px rgba(74, 222, 128, 0.22);
}

[data-theme="light"] .sb-ty-check {
	color: #15803d;
	background: rgba(34, 197, 94, 0.1);
	border-color: rgba(34, 197, 94, 0.4);
	box-shadow: 0 0 46px rgba(34, 197, 94, 0.16);
}
