/*
 * Grafica comune degli step del configuratore tesi (Hidoly, 2026-10-22), coerente con lo step 3.
 * Solo CSS sul markup esistente degli step (testi invariati). Ambito: body.hi-configuratore-tesi.
 * Colori del sito: rosso #c23650, azzurro #609dd6.
 */
.hi-configuratore-tesi {
	--hi-rosso: #c23650;
	--hi-azzurro: #609dd6;
	--hi-azzurro-scuro: #3f7fbf;
	--hi-bordo: #d9dde3;
	--hi-testo: #2b2f36;
	--hi-tenue: #6b7280;
}

/* ---------- Indicatore dei passaggi ---------- */
.hi-configuratore-tesi ul.steps.hi-steps {
	display: flex;
	justify-content: space-between;
	list-style: none;
	margin: 6px 0 30px;
	padding: 0;
	counter-reset: hi-step;
	position: relative;
}
.hi-configuratore-tesi ul.steps.hi-steps li {
	flex: 1 1 0;
	position: relative;
	padding-top: 46px;
	margin: 0;
	text-align: center;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .03em;
	color: var(--hi-tenue);
	background: none;
	counter-increment: hi-step;
	list-style: none;
	z-index: 0;
}
/* linea di collegamento */
.hi-configuratore-tesi ul.steps.hi-steps li::after {
	content: "";
	position: absolute;
	top: 17px;
	left: calc(-50% + 22px);
	right: calc(50% + 22px);
	width: auto !important;
	height: 3px;
	z-index: 0 !important; /* il tema la metteva a -1, dietro lo sfondo */
	margin: 0 !important;
	border: 0 !important;
	border-radius: 3px;
	background: var(--hi-bordo);
}
.hi-configuratore-tesi ul.steps.hi-steps li:first-child::after { display: none; }
.hi-configuratore-tesi ul.steps.hi-steps li.hi-fatto::after,
.hi-configuratore-tesi ul.steps.hi-steps li.hi-corrente::after { background: var(--hi-rosso); }
/* cerchio */
.hi-configuratore-tesi ul.steps.hi-steps li::before {
	content: counter(hi-step);
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 36px;
	height: 36px;
	line-height: 32px;
	border-radius: 50%;
	border: 2px solid var(--hi-bordo);
	background: #fff;
	color: var(--hi-tenue);
	font-size: 15px;
	font-weight: 700;
	box-sizing: border-box;
	z-index: 1;
}
.hi-configuratore-tesi ul.steps.hi-steps li.hi-fatto::before {
	content: "\2713";
	background: var(--hi-rosso);
	border-color: var(--hi-rosso);
	color: #fff;
}
.hi-configuratore-tesi ul.steps.hi-steps li.hi-corrente::before {
	background: #fff;
	border: 3px solid var(--hi-rosso);
	color: var(--hi-rosso);
	line-height: 30px;
	box-shadow: 0 0 0 5px rgba(194, 54, 80, .14);
}
.hi-configuratore-tesi ul.steps.hi-steps li.hi-fatto,
.hi-configuratore-tesi ul.steps.hi-steps li.hi-corrente { color: var(--hi-testo); }
.hi-configuratore-tesi ul.steps.hi-steps li.hi-corrente { color: var(--hi-rosso); }

/* ---------- Riquadro blu "Step N" ---------- */
.hi-configuratore-tesi .step_passaggi_white {
	background: var(--hi-azzurro) !important;
	border-radius: 12px;
	padding: 26px 28px !important;
	margin-bottom: 24px;
	color: #fff;
	box-shadow: 0 6px 20px rgba(63, 127, 191, .25);
}
.hi-configuratore-tesi .step_passaggi_white > div,
.hi-configuratore-tesi .step_passaggi_white .wpb_wrapper { padding: 0 !important; margin: 0 !important; background: none !important; }
.hi-configuratore-tesi .step_passaggi_white h2.passaggi_header {
	display: inline-block;
	position: static;
	margin: 0 0 12px;
	padding: 3px 14px;
	border-radius: 5px;
	background: var(--hi-rosso);
	color: #fff;
	font-size: 15px;
	line-height: 1.4;
	font-weight: 700;
}
.hi-configuratore-tesi .step_passaggi_white h1,
.hi-configuratore-tesi .step_passaggi_white h2,
.hi-configuratore-tesi .step_passaggi_white h4 { color: #fff; }
.hi-configuratore-tesi .step_passaggi_white h2:not(.passaggi_header) { font-size: 24px; margin: 4px 0 10px; }
.hi-configuratore-tesi .step_passaggi_white p,
.hi-configuratore-tesi .step_passaggi_white .wpb_wrapper { color: #fff; font-size: 15px; line-height: 1.55; }
.hi-configuratore-tesi .step_passaggi_white a:not(.btn) { color: #fff; font-weight: 700; text-decoration: underline; }
.hi-configuratore-tesi .step_passaggi_white img { border-radius: 6px; box-shadow: 0 4px 14px rgba(0, 0, 0, .2); }

/* Due colonne affiancate con spazio; riquadro da solo (es. step 2.5) a tutta larghezza */
@media (min-width: 768px) {
	.hi-configuratore-tesi .step_passaggi_white:has(+ .wpb_column) { width: calc(50% - 12px) !important; }
	.hi-configuratore-tesi .step_passaggi_white + .wpb_column { width: calc(50% - 12px) !important; margin-left: 24px; }
	.hi-configuratore-tesi .step_passaggi_white:not(:has(+ .wpb_column)) { width: 100% !important; max-width: 820px; float: none; }
}

/* ---------- Colonna di caricamento (scheda bianca) ---------- */
.hi-configuratore-tesi .step_passaggi_white + .wpb_column {
	background: #fff;
	border: 1px solid var(--hi-bordo);
	border-radius: 12px;
	padding: 24px 26px !important;
	box-shadow: 0 4px 18px rgba(0, 0, 0, .06);
}
.hi-configuratore-tesi .step_passaggi_white + .wpb_column h2 { font-size: 20px; line-height: 1.3; margin: 0 0 8px; }
.hi-configuratore-tesi .step_passaggi_white + .wpb_column h4 { font-size: 15px; font-weight: 400; line-height: 1.5; margin: 0 0 16px; }
.hi-configuratore-tesi .step_passaggi_white + .wpb_column .container { width: auto !important; min-width: 0 !important; max-width: 100% !important; padding: 0 !important; margin: 0 !important; }
.hi-configuratore-tesi .step_passaggi_white + .wpb_column [align="center"] { padding: 0 !important; }

/* Area di caricamento */
.hi-configuratore-tesi .file-upload-wrapper {
	position: relative;
	width: 100%;
	height: 132px !important;
	border: 2px dashed var(--hi-azzurro) !important;
	border-radius: 12px !important;
	background: #f4f8fd;
	transition: background-color .15s, border-color .15s;
}
.hi-configuratore-tesi .file-upload-wrapper:hover { background: #e9f2fb; border-color: var(--hi-azzurro-scuro) !important; }
.hi-configuratore-tesi .file-upload-wrapper::after {
	/* testo del campo (data-text): centrato, con icona */
	content: attr(data-text) !important;
	position: absolute !important;
	inset: 0 !important;
	width: auto !important;
	height: auto !important;
	display: flex !important;
	align-items: center;
	justify-content: center;
	padding: 52px 16px 12px !important;
	background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='34' height='34' viewBox='0 0 24 24' fill='none' stroke='%23609dd6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/><path d='M14 3v5h5M12 18v-6M9 15l3-3 3 3'/></svg>") center 22px no-repeat !important;
	color: var(--hi-testo) !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	line-height: 1.3 !important;
	border-radius: 12px !important;
	text-align: center;
}
.hi-configuratore-tesi .file-upload-wrapper::before {
	/* pulsante "Carica" */
	content: "Scegli il PDF" !important;
	position: absolute !important;
	top: auto !important;
	bottom: 12px !important;
	right: 12px !important;
	height: auto !important;
	line-height: 1.2 !important;
	padding: 6px 12px !important;
	border-radius: 6px !important;
	background: var(--hi-azzurro) !important;
	font-size: 12px !important;
	z-index: 25;
	display: none !important;
}
.hi-configuratore-tesi .file-upload-wrapper.is-caricato { border-style: solid !important; border-color: #2e9e5b !important; background: #effaf3; }
.hi-configuratore-tesi .file-upload-wrapper input { height: 100% !important; }

/* ---------- Pulsanti ---------- */
.hi-configuratore-tesi .entry-content .btn.btn-primary,
.hi-configuratore-tesi .site-main .btn.btn-primary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 46px;
	padding: 12px 24px !important;
	border: 0 !important;
	border-radius: 8px !important;
	background: var(--hi-rosso) !important;
	color: #fff !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
	text-transform: none !important;
	box-shadow: 0 3px 10px rgba(194, 54, 80, .25);
	cursor: pointer;
	transition: filter .15s, transform .15s;
}
.hi-configuratore-tesi .site-main .btn.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
/* "Torna..." in cima: pulsanti secondari */
.hi-configuratore-tesi .site-main .row > [class*="col-md"] > a.btn.btn-primary,
.hi-configuratore-tesi .site-main .row > [class*="col-md"] > form > button.btn.btn-primary {
	min-height: 40px;
	padding: 9px 16px !important;
	background: #fff !important;
	color: var(--hi-azzurro-scuro) !important;
	border: 2px solid var(--hi-azzurro) !important;
	box-shadow: none;
	font-size: 14px !important;
}
.hi-configuratore-tesi .site-main .row > [class*="col-md"] > a.btn.btn-primary::before,
.hi-configuratore-tesi .site-main .row > [class*="col-md"] > form > button.btn.btn-primary::before { content: "\2190"; }
.hi-configuratore-tesi .site-main .row > [class*="col-md"] > a.btn.btn-primary:hover,
.hi-configuratore-tesi .site-main .row > [class*="col-md"] > form > button.btn.btn-primary:hover { background: #f1f7fd !important; }
.hi-configuratore-tesi .site-main .row:has(> [class*="col-md"] > a.btn, > [class*="col-md"] > form > button.btn) {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 8px;
}
.hi-configuratore-tesi .site-main .row:has(> [class*="col-md"] > a.btn, > [class*="col-md"] > form > button.btn) > [class*="col-md"] {
	width: auto;
	float: none;
	padding: 0;
}

/* ---------- Loader ---------- */
.hi-configuratore-tesi #stampa_overlay { background: rgba(17, 24, 39, .75) !important; z-index: 100000 !important; }
.hi-configuratore-tesi #stampa_overlay > div {
	top: 50% !important;
	left: 50% !important;
	width: min(440px, calc(100% - 40px)) !important;
	transform: translate(-50%, -50%);
	padding: 32px 26px !important;
	border: 0 !important;
	border-radius: 14px;
	background: #fff !important;
	color: var(--hi-testo) !important;
	box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
}
.hi-configuratore-tesi #stampa_overlay h2 { color: var(--hi-testo) !important; font-size: 22px; margin: 0 0 6px; }
.hi-configuratore-tesi #stampa_overlay p { color: var(--hi-testo); font-size: 15px; }
.hi-loader {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(17, 24, 39, .75);
}
.hi-loader[hidden] { display: none; }
.hi-loader__box {
	width: min(440px, 100%);
	padding: 30px 26px;
	border-radius: 14px;
	background: #fff;
	text-align: center;
	box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
}
.hi-loader__spinner {
	display: inline-block;
	width: 44px;
	height: 44px;
	border: 4px solid #e5e7eb;
	border-top-color: #c23650;
	border-radius: 50%;
	animation: hi-gira .8s linear infinite;
}
.hi-loader__testo { margin: 14px 0 0; font-size: 15px; color: #2b2f36; }
@keyframes hi-gira { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .hi-loader__spinner { animation-duration: 2s; } }

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
	.hi-configuratore-tesi ul.steps.hi-steps li { font-size: 10px; padding-top: 40px; }
	.hi-configuratore-tesi ul.steps.hi-steps li::before { width: 30px; height: 30px; line-height: 26px; font-size: 13px; }
	.hi-configuratore-tesi ul.steps.hi-steps li.hi-corrente::before { line-height: 24px; }
	.hi-configuratore-tesi ul.steps.hi-steps li::after { top: 14px; left: calc(-50% + 18px); right: calc(50% + 18px); }
	.hi-configuratore-tesi .step_passaggi_white,
	.hi-configuratore-tesi .step_passaggi_white + .wpb_column { padding: 20px !important; }
	.hi-configuratore-tesi .step_passaggi_white h2:not(.passaggi_header) { font-size: 20px; }
}

/* Mobile: niente parole spezzate nell'indicatore, area di caricamento e pulsanti dentro le schede */
.hi-configuratore-tesi .file-upload-wrapper { box-sizing: border-box; max-width: 100%; }
.hi-configuratore-tesi .step_passaggi_white,
.hi-configuratore-tesi .step_passaggi_white + .wpb_column { box-sizing: border-box; max-width: 100%; }
@media (max-width: 767px) {
	.hi-configuratore-tesi ul.steps.hi-steps li { word-break: normal; overflow-wrap: normal; hyphens: none; letter-spacing: 0; line-height: 1.25; padding-left: 2px; padding-right: 2px; }
	.hi-configuratore-tesi .site-main .btn.btn-primary { white-space: normal; max-width: 100%; text-align: center; }
	.hi-configuratore-tesi .step_passaggi_white .btn.btn-primary { width: 100%; }
}
@media (max-width: 480px) {
	.hi-configuratore-tesi ul.steps.hi-steps li { font-size: 9px; }
}
