/**
 * Form pubblico "Segnala un evento".
 */
.ues-evt-form {
	--ues-primary: var(--wp--preset--color--primary, #3c5a2e);
	--ues-primary-dark: var(--wp--preset--color--primary-dark, #2a4020);
	--ues-accent: var(--wp--preset--color--accent, #b4471f);
	--ues-stone: var(--wp--preset--color--stone, #cabfa8);
	--ues-base-2: var(--wp--preset--color--base-2, #f0e7d6);
	--ues-muted: #6b6255;
	max-width: 780px;
}

/* Senza questo i campi con width:100% + padding sforano il contenitore:
   il tema non impone box-sizing agli elementi di form. */
.ues-evt-form *,
.ues-evt-form *::before,
.ues-evt-form *::after {
	box-sizing: border-box;
}

/* --- Sezioni --- */
.ues-evt-form__section {
	/* I <fieldset> nascono con min-width:min-content: senza reset non si
	   restringono e mandano in overflow la griglia interna. */
	min-width: 0;
	margin: 0 0 1.75rem;
	padding: 1.75rem;
	border: 1px solid var(--ues-stone);
	border-radius: 14px;
	background: #fff;
}
.ues-evt-form__section > legend {
	padding: 0 0.7rem;
	margin-left: -0.7rem;
	font-family: var(--wp--preset--font-family--display, Georgia, serif);
	font-size: 1.15rem;
	font-weight: 600;
	color: var(--ues-primary-dark);
}

/* --- Griglia --- */
.ues-evt-form__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 1.5rem;
	row-gap: 1.5rem;
}
.ues-evt-form__field--full {
	grid-column: 1 / -1;
}

/* --- Campi --- */
.ues-evt-form__field {
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
	margin: 0;
	/* I grid item non scendono sotto la loro dimensione intrinseca senza questo. */
	min-width: 0;
}
.ues-evt-form__field > label {
	font-size: 0.74rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ues-primary);
	line-height: 1.3;
}
.ues-evt-form__field abbr {
	color: var(--ues-accent);
	text-decoration: none;
	border: 0;
}
.ues-evt-form__field > small {
	font-size: 0.8rem;
	color: var(--ues-muted);
	line-height: 1.45;
}

.ues-evt-form__field input,
.ues-evt-form__field select,
.ues-evt-form__field textarea {
	width: 100%;
	max-width: 100%;
	padding: 0.7rem 0.85rem;
	border: 1px solid var(--ues-stone);
	border-radius: 9px;
	background: #fff;
	color: inherit;
	font: inherit;
	line-height: 1.4;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ues-evt-form__field textarea {
	resize: vertical;
	min-height: 7.5rem;
}
.ues-evt-form__field input:focus,
.ues-evt-form__field select:focus,
.ues-evt-form__field textarea:focus {
	border-color: var(--ues-primary);
	box-shadow: 0 0 0 3px rgba(60, 90, 46, 0.14);
	outline: none;
}
.ues-evt-form__field input::placeholder,
.ues-evt-form__field textarea::placeholder {
	color: #a9a193;
}

/* --- Consenso --- */
.ues-evt-form__consent {
	display: flex;
	align-items: flex-start;
	gap: 0.7rem;
	margin: 1.5rem 0 0;
	padding: 1rem 1.1rem;
	background: var(--ues-base-2);
	border-radius: 10px;
	font-size: 0.9rem;
	line-height: 1.55;
}
.ues-evt-form__consent input[type="checkbox"] {
	flex: 0 0 auto;
	width: 1.1rem;
	height: 1.1rem;
	margin-top: 0.2rem;
	accent-color: var(--ues-primary);
}
.ues-evt-form__consent label {
	cursor: pointer;
}

/* --- Azioni --- */
.ues-evt-form__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1.5rem;
}
.ues-evt-form__actions button {
	padding: 0.85rem 2rem;
	font-size: 1rem;
}
.ues-evt-form__hint {
	flex: 1 1 15rem;
	margin: 0;
	font-size: 0.85rem;
	color: var(--ues-muted);
	line-height: 1.5;
}

/* --- Honeypot --- */
.ues-evt-form__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* --- Messaggi --- */
.ues-evt-form__notice {
	padding: 1rem 1.25rem;
	border-radius: 10px;
	margin: 0 0 1.75rem;
	font-size: 0.95rem;
	line-height: 1.55;
}
.ues-evt-form__notice--ok   { background: #e4efe0; border-left: 4px solid var(--ues-primary); }
.ues-evt-form__notice--warn { background: #faedd6; border-left: 4px solid #c9871f; }
.ues-evt-form__notice--err  { background: #f7e0dd; border-left: 4px solid var(--ues-accent); }

@media (max-width: 640px) {
	.ues-evt-form__grid { grid-template-columns: 1fr; }
	.ues-evt-form__section { padding: 1.25rem; }
}
