/**
 * Fruscio Leads form.
 *
 * Scoped to .fl-form so it can drop into an Elementor page without arguing
 * with the theme. Sizes are in rem and the grid collapses to one column,
 * because most of these registrations happen on a phone at a gazebo.
 */

.fl-form {
	max-width: 44rem;
	margin: 0 auto;
}

.fl-form__title {
	margin: 0 0 0.5rem;
}

.fl-form__intro {
	margin: 0 0 2rem;
	opacity: 0.85;
}

.fl-form__fields {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.25rem;
}

.fl-field {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

/* The wordier questions and the consents want the full width. */
.fl-field--wide,
.fl-consents,
.fl-submit {
	grid-column: 1 / -1;
}

.fl-field label {
	font-weight: 600;
	font-size: 0.95rem;
}

.fl-field input,
.fl-field select {
	width: 100%;
	padding: 0.7rem 0.8rem;
	border: 1px solid rgba(0, 0, 0, 0.25);
	border-radius: 0.4rem;
	font: inherit;
	background: #fff;
}

.fl-field input:focus-visible,
.fl-field select:focus-visible,
.fl-submit:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.fl-required {
	color: #b3261e;
}

.fl-field--error input,
.fl-field--error select {
	border-color: #b3261e;
}

.fl-error {
	margin: 0;
	color: #b3261e;
	font-size: 0.85rem;
}

.fl-alert {
	padding: 0.75rem 1rem;
	border-radius: 0.4rem;
	background: #fbe5e5;
	color: #9c0006;
}

.fl-success {
	padding: 1.25rem;
	border-radius: 0.4rem;
	background: #e2efda;
	font-size: 1.1rem;
}

.fl-consents {
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 0.4rem;
	padding: 1rem 1.25rem;
	margin: 0;
}

.fl-consents legend {
	font-weight: 700;
	padding: 0 0.4rem;
}

.fl-consent {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	margin-top: 0.6rem;
}

.fl-consent input {
	margin-top: 0.25rem;
	flex: 0 0 auto;
}

.fl-consent label {
	font-size: 0.95rem;
	line-height: 1.45;
}

.fl-submit {
	padding: 0.9rem 1.5rem;
	border: 0;
	border-radius: 0.4rem;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	background: #1f3864;
	color: #fff;
}

.fl-submit:hover {
	filter: brightness(1.15);
}

/* Visible to a script that fills every input, invisible and unreachable to a person. */
.fl-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

@media (max-width: 40rem) {
	.fl-form__fields {
		grid-template-columns: minmax(0, 1fr);
	}
}
