/*
 * Equilibre Iscrizioni — stili frontend minimali.
 *
 * Regola: NON combattere col tema (Storefront). Nessun !important,
 * font-family ereditata, colori neutrali. Se il tema ha già stili
 * su input[type=text], lo lasciamo vincere — questi sono il fallback.
 */

.eqi-form-wrap {
	max-width: 760px;
	margin: 0 auto 2em;
}

.eqi-form-wrap .eqi-intro {
	margin-bottom: 1.5em;
}

.eqi-progress {
	font-size: 0.9em;
	color: #666;
	margin: 0 0 1em;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.eqi-fragment {
	padding: 0 0 1.5em;
	margin-bottom: 1.5em;
	border-bottom: 1px solid #eee;
}
.eqi-fragment:last-of-type {
	border-bottom: 0;
}

.eqi-descrizione,
.eqi-contenuto {
	margin-bottom: 1em;
}

.eqi-field {
	margin-bottom: 1em;
}
.eqi-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.25em;
}
.eqi-field input[type=text],
.eqi-field input[type=email],
.eqi-field input[type=tel],
.eqi-field input[type=date],
.eqi-field input[type=number],
.eqi-field textarea,
.eqi-field select {
	width: 100%;
	padding: 0.5em 0.7em;
	border: 1px solid #bbb;
	border-radius: 3px;
	background: #fff;
	box-sizing: border-box;
	font-size: 1em;
	line-height: 1.4;
}
.eqi-field.has-error input,
.eqi-field.has-error textarea,
.eqi-field.has-error select {
	border-color: #b32d2e;
}
.eqi-required {
	color: #b32d2e;
	font-weight: bold;
}
.eqi-error {
	color: #b32d2e;
	font-size: 0.9em;
	margin-top: 0.25em;
}

.eqi-consenso-text {
	max-height: 340px;
	overflow-y: auto;
	padding: 1em 1.2em;
	border: 1px solid #e0e0e0;
	background: #fafafa;
	margin-bottom: 1em;
	font-size: 0.95em;
	line-height: 1.5;
}
.eqi-consenso-choice {
	font-weight: 600;
	margin-top: 0.5em;
}
.eqi-consenso-choice label.eqi-radio,
.eqi-consenso-choice label.eqi-checkbox {
	display: inline-block;
	margin-right: 1em;
	font-weight: 600;
}
.eqi-consenso-choice.has-error {
	color: #b32d2e;
}

/* Honeypot: invisibile ma senza display:none per non essere skippato dai bot */
.eqi-hp {
	position: absolute !important;
	left: -9999px !important;
	top: -9999px !important;
	height: 1px;
	width: 1px;
	overflow: hidden;
}

.eqi-actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1em;
	margin-top: 1.5em;
}
.eqi-btn {
	display: inline-block;
	padding: 0.7em 1.4em;
	background: #2c2c2c;
	color: #fff;
	border: 0;
	border-radius: 3px;
	font-size: 1em;
	line-height: 1.2;
	cursor: pointer;
	text-decoration: none;
}
.eqi-btn:hover {
	background: #000;
	color: #fff;
}
.eqi-btn.eqi-btn-back {
	background: #eee;
	color: #333;
}
.eqi-btn.eqi-btn-back:hover {
	background: #ddd;
	color: #000;
}

.eqi-msg-error {
	padding: 0.8em 1em;
	border-left: 4px solid #b32d2e;
	background: #fef1f1;
	color: #6a1a1b;
	margin-bottom: 1em;
}
.eqi-msg-info {
	padding: 0.8em 1em;
	border-left: 4px solid #2271b1;
	background: #f0f6fc;
	color: #14406e;
	margin-bottom: 1em;
}

.eqi-completed code {
	background: #f6f7f7;
	padding: 0.2em 0.5em;
	font-size: 0.95em;
}

/* ============================================================
 * M6 — Clausole vessatorie (artt. 1341-1342 c.c.)
 *
 * Il blocco visualizzato SOTTO la prima checkbox contiene una
 * SECONDA checkbox REALE e sempre presente nel DOM. Il modal
 * qui sotto è puro cosmetico: se il JS non parte, il modal resta
 * "hidden" e non disturba, la checkbox reale si vede lo stesso.
 * ============================================================ */

.eqi-vessatorie-block {
	margin-top: 1em;
	padding: 1em 1.2em;
	border: 1px solid #d5b25a;
	border-left: 4px solid #b7861c;
	background: #fdf8ec;
}
.eqi-vessatorie-block.has-error {
	border-color: #b32d2e;
	border-left-color: #b32d2e;
}
.eqi-vessatorie-title {
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	font-size: 0.9em;
	color: #6a4a05;
	margin-bottom: 0.5em;
}
.eqi-vessatorie-text {
	font-size: 0.95em;
	line-height: 1.5;
	margin-bottom: 0.8em;
}

/* Modal — hidden fallback: `hidden` attribute + display:none.
 * Il JS toglie l'attributo e imposta la classe .is-open. */
.eqi-vessatorie-modal[hidden] {
	display: none !important;
}
.eqi-vessatorie-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1em;
}
.eqi-vessatorie-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
}
.eqi-vessatorie-modal-dialog {
	position: relative;
	max-width: 640px;
	width: 100%;
	max-height: 85vh;
	overflow-y: auto;
	background: #fff;
	border-radius: 6px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
	padding: 1.5em 1.5em 1.2em;
}
.eqi-vessatorie-modal-dialog h3 {
	margin: 0 0 0.8em;
	font-size: 1.1em;
}
.eqi-vessatorie-modal-text {
	font-size: 0.95em;
	line-height: 1.5;
	margin-bottom: 1.2em;
}
.eqi-vessatorie-modal-actions {
	display: flex;
	gap: 0.8em;
	justify-content: flex-end;
	flex-wrap: wrap;
}
.eqi-vessatorie-modal-close {
	position: absolute;
	top: 0.4em;
	right: 0.6em;
	background: transparent;
	border: 0;
	font-size: 1.6em;
	line-height: 1;
	cursor: pointer;
	color: #666;
	padding: 0.2em 0.4em;
}
.eqi-vessatorie-modal-close:hover {
	color: #000;
}
