/* LeadGen Forms – stile minimo di base.
   Pensato per essere sovrascritto facilmente dal tema: usa poche regole
   e classi semplici, nessun !important (tranne l'utility .lhf-sr-only,
   pattern standard per nascondere testo solo visivamente). */

.lhf-form {
	--lhf-primary: #2271b1;
	--lhf-error: #d63638;
	--lhf-success: #00a32a;
	--lhf-border: #e09900;
	--lhf-radius: 25px;
	--lhf-text: #000000;
	max-width: 1400px;
	color: var(--lhf-text);
}

/* Contenitore flessibile: permette di affiancare 2 o più campi sulla
   stessa riga in base alla "Larghezza" scelta per ciascun campo. */
.lhf-fields-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin-bottom: 1rem;
}

.lhf-field {
	flex: 1 1 100%;
	min-width: 0; /* evita overflow di input/select dentro flexbox */
}

.lhf-width-half {
	flex-basis: calc(50% - 0.5rem);
}

.lhf-width-third {
	flex-basis: calc(33.333% - 0.667rem);
}

/* Sotto una certa larghezza, ogni campo torna a occupare l'intera riga
   per restare leggibile su mobile, indipendentemente dalla Larghezza scelta. */
@media (max-width: 480px) {
	.lhf-width-half,
	.lhf-width-third {
		flex-basis: 100%;
	}
}

/* Etichetta nascosta visivamente ma ancora letta dagli screen reader:
   il testo dell'etichetta compare invece come placeholder nel box. */
.lhf-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.lhf-field input[type="text"],
.lhf-field input[type="email"],
.lhf-field input[type="tel"],
.lhf-field textarea,
.lhf-field select {
	width: 100%;
	padding: 0.65rem 1rem;
	border: 2px solid var(--lhf-border);
	border-radius: var(--lhf-radius);
	font-size: 1rem;
	color: var(--lhf-text);
	box-sizing: border-box;
}

/* Testo del placeholder (etichetta) leggermente più grande e nero pieno:
   per default i browser lo rendono grigio e con opacità ridotta, quindi
   serve "opacity: 1" per ottenere il nero effettivo. */
.lhf-field input::placeholder,
.lhf-field textarea::placeholder {
	font-size: 1.05rem;
	color: #000000;
	opacity: 1;
}

/* Le select non supportano un vero placeholder: la prima opzione (il
   "placeholder" del menu a tendina) riceve qui lo stesso trattamento. */
.lhf-field select option[value=""] {
	color: #000000;
	font-size: 1.05rem;
}

.lhf-checkbox-label {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	font-weight: 400;
	cursor: pointer;
}

.lhf-field-privacy {
	flex-basis: 100%;
}

.lhf-field-privacy label {
	display: flex;
	align-items: flex-start;
	gap: 0.65rem;
	font-weight: 400;
	font-size: 0.9rem;
}

/* Checkbox privacy raddoppiata rispetto alla dimensione standard (~1em)
   per essere più facile da notare e cliccare. */
.lhf-field-privacy input[type="checkbox"] {
	width: 2em;
	height: 2em;
	margin-top: 0;
	flex-shrink: 0;
	cursor: pointer;
}

.lhf-hp-wrap {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.lhf-submit-btn {
	background: #e09900;
	color: #fff;
	border: none;
	border-radius: var(--lhf-radius);
	padding: 0.65rem 1.4rem;
	font-size: 1rem;
	cursor: pointer;
}

.lhf-submit-btn:disabled {
	opacity: 0.6;
	cursor: default;
}

.lhf-form-messages {
	margin: 0.75rem 0;
	font-size: 0.9rem;
}

.lhf-msg-success {
	color: var(--lhf-success);
	font-weight: 600;
}

.lhf-msg-error {
	color: var(--lhf-error);
	font-weight: 600;
}
