.bef-form {
	width: 100%;
}

.bef-fields {
	display: flex;
	flex-wrap: wrap;
	row-gap: 15px;
	margin: 0 -5px;
}

.bef-field {
	width: 100%;
	display: flex;
	flex-direction: column;
	padding: 0 5px;
	box-sizing: border-box;
}

.bef-label {
	margin-bottom: 5px;
	font-weight: 500;
}

.bef-required {
	color: #d32f2f;
}

.bef-field input:not([type="checkbox"]):not([type="radio"]),
.bef-field textarea,
.bef-field select {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d0d0d0;
	border-radius: 3px;
	background: #fff;
	font: inherit;
	color: inherit;
	box-sizing: border-box;
}

.bef-field textarea {
	resize: vertical;
}

.bef-options {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
}

.bef-option {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	cursor: pointer;
}

.bef-option input {
	margin: 0;
	flex-shrink: 0;
}

.bef-acceptance span a {
	text-decoration: underline;
}

.bef-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.bef-submit-wrap {
	display: flex;
	margin-top: 20px;
}

.bef-align-center .bef-submit-wrap {
	justify-content: center;
}

.bef-align-end .bef-submit-wrap {
	justify-content: flex-end;
}

.bef-align-stretch .bef-submit {
	width: 100%;
}

.bef-submit {
	padding: 12px 28px;
	border: none;
	border-radius: 10px;
	cursor: pointer;
	background: #C56A43;
	color: #fff;
	font: inherit;
	font-weight: 600;
	transition: background 0.2s ease, color 0.2s ease;
}

.bef-submit:hover {
	background: #a05a2c;
}

.bef-submit:disabled {
	opacity: 0.6;
	cursor: wait;
}

.bef-sending {
	opacity: 0.85;
}

.bef-message {
	margin-top: 15px;
	padding: 11px 15px;
	border-radius: 3px;
	font-size: 0.95em;
}

.bef-message--success {
	background: #e8f5e9;
	color: #2e7d32;
}

.bef-message--error {
	background: #fdecea;
	color: #c0392b;
}

/* Inline layout: fields and button on the same row (newsletter style) */
.bef-form--inline {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
}

.bef-form--inline .bef-fields {
	flex: 1 1 220px;
	min-width: 0;
}

.bef-form--inline .bef-submit-wrap {
	flex: 0 0 auto;
	margin-top: 0;
	margin-left: 10px;
}

/* in linea: campo e bottone alla stessa altezza */
.bef-form--inline .bef-field input:not([type="checkbox"]):not([type="radio"]) {
	height: 56px;
}

.bef-form--inline .bef-submit {
	height: 56px;
	padding-top: 0;
	padding-bottom: 0;
}

.bef-form--inline .bef-message {
	flex-basis: 100%;
	width: 100%;
}

@media (max-width: 560px) {
	.bef-form--inline {
		display: block;
	}
	.bef-form--inline .bef-submit-wrap {
		margin-top: 12px;
		margin-left: 0;
	}
	.bef-form--inline .bef-submit {
		width: 100%;
	}
}
