/**
 * Form styles: theme-owned fields (.form-field) and the Formidable Forms
 * quote form, restyled to the brand (square, 52px fields, blue submit).
 */

.form-field { margin-bottom: var(--yhdr-space-sm); }
.form-field label { display: block; font-weight: 600; color: var(--yhdr-text); margin-bottom: 6px; }

.form-field input,
.form-field select,
.form-field textarea,
.search-form input[type="search"] {
	width: 100%;
	min-height: 52px;
	font-family: var(--yhdr-font-body);
	font-size: 1rem;
	padding: 12px 16px;
	border: 1px solid var(--yhdr-rule);
	border-radius: var(--yhdr-radius-input);
	background: var(--yhdr-white);
	color: var(--yhdr-text);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
.search-form input[type="search"]:focus {
	outline: none;
	border-color: var(--yhdr-blue);
	box-shadow: 0 0 0 3px rgba(95, 166, 219, 0.35);
}

.contact__honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Search form (404, blog) */
.search-form { display: flex; gap: 0; max-width: 520px; }
.search-form label { flex: 1; }
.search-form input[type="search"] { border-right: 0; }
.search-form .btn { flex: none; }

/* ---------------------------------------------------------------------------
 * Formidable Forms
 * Formidable exposes its style settings as CSS custom properties on
 * .with_frm_style, so set those first, then tighten the markup directly.
 * ------------------------------------------------------------------------ */
.frm_forms.with_frm_style,
.with_frm_style {
	--font: var(--yhdr-font-body);
	--font-size: 1rem;
	--label-color: var(--yhdr-text);
	--weight: 600;
	--field-font-size: 1rem;
	--field-height: 52px;
	--field-pad: 12px 16px;
	--field-weight: 400;
	--text-color: var(--yhdr-text);
	--border-color: var(--yhdr-rule);
	--field-border-width: 1px;
	--border-radius: var(--yhdr-radius-input);
	--bg-color: var(--yhdr-white);
	--bg-color-active: var(--yhdr-white);
	--border-color-active: var(--yhdr-blue);
	--box-shadow: none;
	--border-color-error: var(--yhdr-error);
	--text-color-error: var(--yhdr-error);
	--submit-font-size: 0.9375rem;
	--submit-height: 52px;
	--submit-bg-color: var(--yhdr-blue);
	--submit-border-color: var(--yhdr-blue);
	--submit-border-width: 1px;
	--submit-text-color: var(--yhdr-white);
	--submit-weight: 500;
	--submit-border-radius: 0;
	--submit-padding: 0 32px;
	--submit-hover-bg-color: var(--yhdr-blue-dark);
	--submit-hover-border-color: var(--yhdr-blue-dark);
	--submit-hover-color: var(--yhdr-white);
	--success-bg-color: #eaf4ee;
	--success-border-color: var(--yhdr-success);
	--success-text-color: var(--yhdr-success);
	--error-bg: #fbecea;
	--error-border: var(--yhdr-error);
	--error-text: var(--yhdr-error);
	--description-color: var(--yhdr-text-muted);
	--required-color: var(--yhdr-error);
}

.frm_forms .frm_form_fields > fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.frm_forms legend.frm_screen_reader,
.frm_forms .frm_screen_reader { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }

.frm_forms .frm_form_field { margin-bottom: 20px; }

.frm_forms .frm_primary_label {
	font-family: var(--yhdr-font-body) !important;
	font-size: 0.875rem !important;
	font-weight: 600 !important;
	color: var(--yhdr-text) !important;
	margin-bottom: 8px !important;
	padding: 0 !important;
}

.frm_forms .frm_required { color: var(--yhdr-error) !important; }

.frm_forms input[type="text"],
.frm_forms input[type="email"],
.frm_forms input[type="tel"],
.frm_forms input[type="number"],
.frm_forms input[type="url"],
.frm_forms select,
.frm_forms textarea {
	width: 100% !important;
	min-height: 52px !important;
	font-family: var(--yhdr-font-body) !important;
	font-size: 1rem !important;
	padding: 12px 16px !important;
	border: 1px solid var(--yhdr-rule) !important;
	border-radius: var(--yhdr-radius-input) !important;
	background: var(--yhdr-white) !important;
	color: var(--yhdr-text) !important;
	box-shadow: none !important;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.frm_forms textarea { min-height: 140px !important; resize: vertical; }

.frm_forms input:focus,
.frm_forms select:focus,
.frm_forms textarea:focus {
	outline: none !important;
	border-color: var(--yhdr-blue) !important;
	box-shadow: 0 0 0 3px rgba(95, 166, 219, 0.35) !important;
}

.frm_forms .frm_blank_field input,
.frm_forms .frm_blank_field select,
.frm_forms .frm_blank_field textarea { border-color: var(--yhdr-error) !important; }

.frm_forms .frm_error {
	color: var(--yhdr-error) !important;
	font-size: 0.8125rem !important;
	margin-top: 6px !important;
}

.frm_forms .frm_error_style,
.frm_forms .frm_message {
	border-radius: 0 !important;
	padding: 14px 18px !important;
	margin-bottom: 20px !important;
	font-size: 0.9375rem;
}

.frm_forms .frm_error_style { background: #fbecea !important; border: 1px solid var(--yhdr-error) !important; color: var(--yhdr-error) !important; }
.frm_forms .frm_message { background: #eaf4ee !important; border: 1px solid var(--yhdr-success) !important; color: var(--yhdr-success) !important; }

.frm_forms .frm_description { color: var(--yhdr-text-muted) !important; font-size: 0.8125rem !important; margin-top: 6px; }

.frm_forms .frm_submit { margin-top: 8px; }

.frm_forms .frm_submit button,
.frm_forms .frm_submit input[type="submit"],
.frm_forms .frm_button_submit {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	min-height: 52px !important;
	padding: 0 32px !important;
	border: 1px solid var(--yhdr-blue) !important;
	border-radius: 0 !important;
	background: var(--yhdr-blue) !important;
	color: var(--yhdr-white) !important;
	font-family: var(--yhdr-font-heading) !important;
	font-size: 0.9375rem !important;
	font-weight: 500 !important;
	letter-spacing: 0.01em;
	box-shadow: none !important;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.frm_forms .frm_submit button:hover,
.frm_forms .frm_submit button:focus-visible,
.frm_forms .frm_button_submit:hover {
	background: var(--yhdr-blue-dark) !important;
	border-color: var(--yhdr-blue-dark) !important;
}

/* Two-up fields (Formidable's frm_half / frm6 layout classes) */
@media (min-width: 640px) {
	.frm_forms .frm_form_fields .frm_fields_container {
		display: grid;
		grid-template-columns: repeat(12, minmax(0, 1fr));
		column-gap: 16px;
	}
	.frm_forms .frm_fields_container > * { grid-column: span 12; }
	.frm_forms .frm_fields_container > .frm_half,
	.frm_forms .frm_fields_container > .frm6 { grid-column: span 6; }
}

/* Dark-surface variant (forms placed on near-black panels) */
.is-dark .frm_forms .frm_primary_label { color: var(--yhdr-white) !important; }
.is-dark .frm_forms .frm_description { color: var(--yhdr-text-on-dark-muted) !important; }
