/*
 * Registrazione rivenditore.
 * Stesso linguaggio della pagina Rivenditori e installatori (#adesione):
 * riquadro chiaro a sinistra, passi numerati in rosso, pulsanti neri
 * che diventano rossi; campi come quelli dell'area account.
 */

.zt-reg {
	--zt-reg-red: var(--color-primary, #E22118);
	--zt-reg-ink: #111;
	--zt-reg-muted: #6c6c67;
	--zt-reg-line: #dddeda;
	--zt-reg-soft: #f4f4f1;
	display: grid;
	/* A tutta larghezza come la pagina Rivenditori: due metà, allineate al titolo. */
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 96px;
	width: 100%;
	margin: 24px 0 0;
	align-items: start;
	color: var(--zt-reg-ink);
	font-family: inherit;
}

.zt-reg [hidden] { display: none !important; }

/* ── Colonna sinistra ─────────────────────────────────────────────── */

.zt-reg-aside {
	background: var(--zt-reg-soft);
	border-radius: 25px;
	padding: 36px;
}

.zt-reg-eyebrow {
	margin: 0;
	color: var(--zt-reg-red);
	font-size: 12px;
	line-height: 1.5;
	font-weight: 700;
	letter-spacing: .065em;
	text-transform: uppercase;
}

.zt-reg-title {
	margin: 14px 0 0;
	font-size: 27px;
	line-height: 1.2;
	font-weight: 500;
}

.zt-reg-steps {
	list-style: none;
	margin: 30px 0 0;
	padding: 0;
	display: grid;
	gap: 24px;
}

.zt-reg-steps li { display: flex; gap: 20px; }
.zt-reg-steps li > span { font-size: 12px; color: var(--zt-reg-red); padding-top: 4px; }
.zt-reg-steps h3 { margin: 0; font-size: 17px; font-weight: 500; }
.zt-reg-steps p { margin: 6px 0 0; font-size: 14px; line-height: 1.6; }

.zt-reg-note {
	margin: 28px 0 0;
	padding-top: 19px;
	border-top: 1px solid var(--zt-reg-line);
	font-size: 12px;
	line-height: 1.65;
	color: #73736e;
}

/* ── Colonna destra ───────────────────────────────────────────────── */

.zt-reg-card { min-width: 0; max-width: 640px; }

.zt-reg-step { margin: 0; }

/* Il tema dà un fondo grigio a tutti i fieldset: qui niente sfondo. */
.zt-reg .zt-reg-fieldset {
	background: transparent;
	border: 0;
	min-width: 0;
	margin: 0 0 24px;
	padding: 0;
}

.zt-reg .zt-reg-fieldset legend {
	background: transparent;
	display: block;
	width: 100%;
	margin: 0 0 18px;
	padding: 0 0 12px;
	border-bottom: 1px solid #f0f0f0;
	font-size: 15px;
	font-weight: 700;
}

.zt-reg-row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

.zt-reg-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
	margin-bottom: 16px;
}

.zt-reg-label { font-size: 13px; font-weight: 500; color: #374151; }
.zt-reg .required { color: var(--zt-reg-red); margin-left: 2px; }

.zt-reg-input {
	width: 100%;
	min-height: 48px;
	padding: 10px 14px;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	background: #fff;
	color: var(--zt-reg-ink);
	font: inherit;
	font-size: 16px;
	box-sizing: border-box;
	transition: border-color .2s, box-shadow .2s;
}

.zt-reg-input:focus {
	outline: none;
	border-color: var(--zt-reg-red);
	box-shadow: 0 0 0 3px rgba(226, 33, 24, .1);
}

.zt-reg-input[aria-invalid="true"] { border-color: var(--zt-reg-red); }

/* Il tema dà a tutti i campi bordo rosso 2px a pillola: qui teniamo la pillola,
   ma grigio di base, scuro mentre si scrive e rosso solo sui campi sbagliati. */
.zt-reg input.zt-reg-input {
	border: 2px solid var(--zt-reg-line);
	border-radius: 48px;
	padding: 10px 20px;
	box-shadow: none;
}
.zt-reg input.zt-reg-input:hover { border-color: #b9bbb5; }
.zt-reg input.zt-reg-input,
.zt-reg input.zt-reg-input:focus { background: #fff; }
.zt-reg input.zt-reg-input:focus {
	border-color: var(--zt-reg-ink);
	box-shadow: 0 0 0 3px rgba(17, 17, 17, .08);
	outline: none;
}
.zt-reg input.zt-reg-input[aria-invalid="true"],
.zt-reg input.zt-reg-input[aria-invalid="true"]:focus {
	border-color: var(--zt-reg-red);
	box-shadow: 0 0 0 3px rgba(226, 33, 24, .1);
}

.zt-reg-hint { font-size: 12px; color: #64748b; }

.zt-reg-inline { display: flex; gap: 10px; margin-top: 6px; }
.zt-reg-inline .zt-reg-input { flex: 1; letter-spacing: .04em; }
.zt-reg-step[data-step="vat"] .zt-reg-hint { display: block; margin-top: 8px; }

.zt-reg-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 48px;
	padding: 14px 23px;
	border: 0;
	border-radius: 8px;
	background: var(--zt-reg-ink);
	color: #fff;
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.5;
	text-decoration: none;
	cursor: pointer;
	transition: background .2s;
}

.zt-reg-button:hover,
.zt-reg-button:focus-visible { background: var(--zt-reg-red); color: #fff; }
.zt-reg-button:disabled { opacity: .6; cursor: progress; }

.zt-reg-button.is-busy::after {
	content: "";
	width: 14px;
	height: 14px;
	border: 2px solid rgba(255, 255, 255, .4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: zt-reg-spin .7s linear infinite;
}

@keyframes zt-reg-spin { to { transform: rotate(360deg); } }

.zt-reg-link {
	padding: 0;
	border: 0;
	background: none;
	color: var(--zt-reg-red);
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	cursor: pointer;
}

.zt-reg-link:hover { text-decoration: underline; }

.zt-reg a:focus-visible,
.zt-reg button:focus-visible,
.zt-reg input:focus-visible {
	outline: 2px solid var(--zt-reg-red);
	outline-offset: 3px;
}

.zt-reg-contact { display: inline-block; margin-top: 10px; }
.zt-reg-login { margin: 28px 0 0; font-size: 14px; color: var(--zt-reg-muted); }

.zt-reg-message {
	margin-top: 16px;
	padding: 12px 16px;
	border-left: 3px solid var(--zt-reg-red);
	border-radius: 6px;
	background: #fdf1f0;
	font-size: 14px;
	line-height: 1.5;
}

.zt-reg-field-error { font-size: 12px; color: var(--zt-reg-red); }

/* Impresa verificata */
.zt-reg-company {
	margin-bottom: 28px;
	padding: 24px;
	border: 1px solid var(--zt-reg-line);
	border-radius: 16px;
}

.zt-reg-company-label {
	margin: 0;
	font-size: 10px;
	font-weight: 500;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--zt-reg-muted);
}

.zt-reg-company-label::before {
	content: "";
	display: inline-block;
	width: 7px;
	height: 7px;
	margin-right: 8px;
	border-radius: 50%;
	background: #2e9d57;
	vertical-align: 1px;
}

.zt-reg-company-name { margin: 10px 0 0; font-size: 20px; font-weight: 500; line-height: 1.3; }

.zt-reg-company dl {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 6px 18px;
	margin: 16px 0;
	font-size: 14px;
	line-height: 1.5;
}

.zt-reg-company dt { color: var(--zt-reg-muted); }
.zt-reg-company dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

.zt-reg-review {
	margin: -8px 0 28px;
	padding: 14px 16px;
	border-radius: 8px;
	background: #fff7e0;
	font-size: 14px;
	line-height: 1.55;
}

/* Consensi */
.zt-reg-check {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 12px;
	align-items: flex-start;
	margin-bottom: 12px;
	font-size: 14px;
	line-height: 1.5;
	cursor: pointer;
}

.zt-reg-check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--zt-reg-red); flex: none; }
.zt-reg-check > span { flex: 1; min-width: 0; }
.zt-reg-check a { color: var(--zt-reg-red); }
.zt-reg-check .zt-reg-field-error { flex-basis: 100%; padding-left: 30px; }

.zt-reg-as { display: block; margin: -8px 0 24px; }

.zt-reg-actions {
	padding-top: 20px;
	border-top: 1px solid #f0f0f0;
	display: flex;
	justify-content: flex-end;
}

/* Fine / stati */
.zt-reg-done h3 { margin: 0; font-size: 24px; font-weight: 500; line-height: 1.25; }
.zt-reg-done p { margin: 12px 0 24px; font-size: 15px; line-height: 1.6; }
.zt-reg-resend { margin: 0 0 24px; }
.zt-reg-resend .zt-reg-message { margin-top: 12px; }
.zt-reg-resend-link { font-size: 15px; }
/* Il tema dà ai <button> sfondo grigio e testo scuro in hover/focus: qui resta un link rosso. */
.zt-reg .zt-reg-resend-link,
.zt-reg .zt-reg-resend-link:hover,
.zt-reg .zt-reg-resend-link:focus,
.zt-reg .zt-reg-resend-link:active {
	background: none !important;
	color: var(--zt-reg-red) !important;
	box-shadow: none !important;
	border: 0 !important;
	padding: 0 !important;
}
.zt-reg .zt-reg-resend-link:hover { text-decoration: underline; }

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

/* Password: criteri, misuratore, conferma */
.zt-reg .zt-reg-pw-rules {
	list-style: none;
	margin: 10px 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 4px 18px;
	font-size: 12px;
	color: #64748b;
}
.zt-reg-pw-rules li { margin: 0; display: flex; align-items: center; gap: 6px; }
.zt-reg-pw-rules li::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #cbd5e1;
	flex: none;
}
.zt-reg-pw-rules li.is-ok { color: #1f7a3d; }
.zt-reg-pw-rules li.is-ok::before { background: #1f9d4a; }

.zt-reg-pw-strength { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 12px; }
.zt-reg-pw-bar { flex: 1; height: 4px; border-radius: 4px; background: #eceee9; overflow: hidden; }
.zt-reg-pw-bar > span { display: block; height: 100%; width: 0; background: var(--zt-reg-red); transition: width .2s, background-color .2s; }
.zt-reg-pw-strength[data-level="0"] .zt-reg-pw-bar > span,
.zt-reg-pw-strength[data-level="1"] .zt-reg-pw-bar > span { width: 20%; }
.zt-reg-pw-strength[data-level="2"] .zt-reg-pw-bar > span { width: 45%; background: #e08a00; }
.zt-reg-pw-strength[data-level="3"] .zt-reg-pw-bar > span { width: 72%; background: #6aa84f; }
.zt-reg-pw-strength[data-level="4"] .zt-reg-pw-bar > span { width: 100%; background: #1f9d4a; }
.zt-reg-pw-label { min-width: 80px; text-align: right; color: #475569; }

.zt-reg-pw-match { display: block; margin-top: 8px; }
.zt-reg-pw-match.is-ok { color: #1f7a3d; }
.zt-reg-pw-match.is-error { color: var(--zt-reg-red); }

@media (max-width: 1050px) {
	.zt-reg { gap: 48px; }
	.zt-reg-aside { padding: 30px; }
}

@media (max-width: 900px) {
	.zt-reg { grid-template-columns: 1fr; gap: 32px; }
	.zt-reg-card { order: -1; }
}

@media (max-width: 640px) {
	.zt-reg-aside { padding: 27px; }
	.zt-reg-title { font-size: 24px; }
	.zt-reg-row { grid-template-columns: 1fr; gap: 0; }
	.zt-reg-inline { flex-direction: column; }
	.zt-reg-button { width: 100%; }
	.zt-reg-company { padding: 20px; }
	.zt-reg-company dl { grid-template-columns: 1fr; gap: 0; }
	.zt-reg-company dd { margin-bottom: 8px; }
}
