/**
 * Highrise Lead Bridge — front-end form styles.
 * Keeps a single column width (like the built-in long form) for all field types.
 */

.hlb-form-wrap {
	max-width: 32rem;
	width: 100%;
	margin: 0 0 1.5rem;
	box-sizing: border-box;
}

.hlb-form-wrap *,
.hlb-form-wrap *::before,
.hlb-form-wrap *::after {
	box-sizing: border-box;
}

.hlb-form {
	display: block;
	width: 100%;
}

.hlb-field {
	margin: 0 0 1rem;
	width: 100%;
}

.hlb-field-group {
	margin: 0 0 1rem;
	width: 100%;
}

.hlb-group-label {
	display: block;
	margin-bottom: 0.35rem;
	font-weight: 600;
}

/* First + Last on one row (built-in Name group). Theme rules often break this. */
.hlb-form-wrap .hlb-name-row {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: nowrap !important;
	align-items: flex-start;
	gap: 0.75rem;
	width: 100%;
}

.hlb-form-wrap .hlb-name-row .hlb-field--half {
	display: block !important;
	flex: 1 1 0 !important;
	min-width: 0 !important;
	width: auto !important;
	max-width: none !important;
	margin: 0 !important;
}

.hlb-field--sublabel label.hlb-sublabel {
	display: block;
	margin: 0.35rem 0 0;
	font-weight: 400;
}

.hlb-field label {
	display: block;
	margin-bottom: 0.35rem;
	font-weight: 600;
}

/*
 * Shared control box for every input type.
 * !important on width beats common theme rules that cap input { max-width: …px }
 * (those leave selects full-width and text fields short — the “ragged” look).
 */
.hlb-form-wrap .hlb-field input[type="text"],
.hlb-form-wrap .hlb-field input[type="email"],
.hlb-form-wrap .hlb-field input[type="tel"],
.hlb-form-wrap .hlb-field input[type="number"],
.hlb-form-wrap .hlb-field input[type="date"],
.hlb-form-wrap .hlb-field input:not([type]),
.hlb-form-wrap .hlb-field select,
.hlb-form-wrap .hlb-field textarea {
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	min-width: 0 !important;
	margin: 0;
	padding: 0.55rem 0.7rem;
	font: inherit;
	line-height: 1.4;
	color: inherit;
	background-color: #fff;
	border: 1px solid currentColor;
	border-radius: 0.25rem;
	vertical-align: middle;
}

.hlb-form-wrap .hlb-name-row .hlb-field--half input {
	width: 100% !important;
	max-width: 100% !important;
}

.hlb-form-wrap .hlb-field select {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%231d2327' d='M1.4.6L6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.7rem center;
	background-size: 0.75rem auto;
	padding-right: 2rem;
}

.hlb-form-wrap .hlb-field textarea {
	min-height: 6rem;
	resize: vertical;
	background-image: none;
}

.hlb-form-wrap .hlb-field input:focus,
.hlb-form-wrap .hlb-field select:focus,
.hlb-form-wrap .hlb-field textarea:focus {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.hlb-required {
	margin-left: 0.15rem;
}

.hlb-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

.hlb-turnstile {
	margin: 1rem 0;
}

.hlb-actions {
	margin: 1rem 0;
}

.hlb-submit {
	font: inherit;
	cursor: pointer;
	padding: 0.6rem 1.1rem;
}

.hlb-submit:disabled {
	cursor: wait;
	opacity: 0.7;
}

.hlb-message {
	margin-top: 0.75rem;
	min-height: 1.25em;
}

.hlb-message.is-success {
	color: inherit;
	font-weight: 600;
}

.hlb-message.is-error {
	color: inherit;
	font-weight: 600;
	padding: 0.5rem 0.65rem;
	border: 1px solid currentColor;
	border-radius: 0.25rem;
}

.hlb-form-notice {
	margin: 0.5rem 0;
	padding: 0.75rem 1rem;
	border: 1px solid currentColor;
	border-radius: 0.25rem;
}

.hlb-form-notice--admin {
	font-weight: 600;
}

@media (max-width: 480px) {
	.hlb-form-wrap {
		max-width: 100%;
	}

	.hlb-form-wrap .hlb-name-row {
		flex-direction: column !important;
		flex-wrap: wrap !important;
		gap: 1rem;
	}

	.hlb-form-wrap .hlb-name-row .hlb-field--half {
		flex: 1 1 auto !important;
		width: 100% !important;
	}
}
