.tesi-configurator {
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 20px;
	margin: 20px 0;
	background: #fafafa;
}
.tesi-cfg-title {
	margin: 0 0 16px;
	font-size: 1.2em;
	color: #0b3d66;
}
.tesi-field {
	margin-bottom: 16px;
}
.tesi-label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
}
.tesi-req {
	color: #c00;
}
.tesi-options label {
	display: block;
	margin: 4px 0;
}
.tesi-options input[type="radio"] {
	margin-right: 6px;
}
.tesi-cover-option {
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	padding: 10px 12px;
	border: 1px solid #ddd;
	border-radius: 6px;
	margin-bottom: 8px !important;
	cursor: pointer;
	background: #fff;
	transition: border-color .15s, background .15s;
}
.tesi-cover-option:hover {
	border-color: #0b3d66;
}
.tesi-cover-option.selected {
	border-color: #0b3d66;
	background: #eef4fb;
}
.tesi-cover-price {
	font-weight: 700;
	color: #0b3d66;
	white-space: nowrap;
}
.tesi-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.tesi-swatch {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	padding: 8px;
	border: 2px solid transparent;
	border-radius: 8px;
}
.tesi-swatch:hover {
	border-color: #ccc;
}
.tesi-swatch.selected {
	border-color: #0b3d66;
	background: #eef4fb;
}
.tesi-swatch-dot {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid rgba(0,0,0,.15);
	box-shadow: inset 0 0 0 2px #fff;
}
.tesi-swatch-img {
	width: 56px;
	height: 56px;
	border-radius: 8px;
	border: 1px solid rgba(0,0,0,.18);
	object-fit: cover;
	background: #fff;
	box-shadow: inset 0 0 0 2px #fff;
}
.tesi-texture-dot {
	background: linear-gradient(135deg, #c9c2b4 0%, #9a9386 50%, #c9c2b4 100%) !important;
	border-radius: 8px;
}
.tesi-swatch-label {
	font-size: .8em;
	text-align: center;
}
/* --- Mini-selettore materiale per campo colore (lusso) --- */
.tesi-texpicker {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 6px 0 12px;
}
/* Texture: quadratino + etichetta, con il "?" FUORI dal tasto (sotto) */
.tesi-tex-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
}

/* Texture: quadratino con la texture + etichetta (desktop e mobile) */
.tesi-texpicker .tesi-texture-opt {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 5px;
	padding: 6px 6px 4px;
	border: 1px solid #ccc;
	border-radius: 10px;
	background: #fff;
	cursor: pointer;
	font-size: .8em;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	max-width: 92px;
	transition: border-color .15s, background .15s, color .15s;
}
.tesi-texture-img {
	display: block;
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 7px;
	border: 1px solid rgba(0,0,0,.15);
	background: #eee;
}
.tesi-swatch.tesi-texture-opt .tesi-texture-img {
	width: 60px;
	height: 60px;
}
.tesi-texpicker .tesi-texture-opt:hover {
	border-color: #0b3d66;
}
.tesi-texpicker .tesi-texture-opt.selected {
	border-color: #0b3d66;
	background: #eef4fb;
	color: #0b3d66;
}
.tesi-selector {
	margin: 12px 0;
}
.tesi-selector-label {
	font-weight: 600;
	margin-bottom: 8px;
	color: #444;
}
.tesi-warning {
	color: #c00;
	font-weight: 600;
	margin-bottom: 8px;
}
.tesi-preview img {
	max-width: 340px;
	width: 100%;
	height: auto;
	border-radius: 10px;
	border: 1px solid #e6e6e6;
	box-shadow: 0 2px 10px rgba(0,0,0,.08);
	display: block;
}
.tesi-pdf-status {
	display: block;
	font-size: .85em;
	color: #0b3d66;
	margin-top: 6px;
	font-style: italic;
}
.tesi-auto-note {
	background: #f0f6fb;
	border-left: 3px solid #0b3d66;
	padding: 10px 12px;
	font-size: .85em;
	color: #2c3e50;
	margin: 10px 0 14px;
	border-radius: 4px;
}
.tesi-field-stampa,
.tesi-field-carta {
	background: #eaf2fb;
	border: 2px solid #0b3d66;
	border-radius: 8px;
	padding: 14px 16px;
	margin: 16px 0;
}
/* Titolo dentro la cornice (Analisi del PDF) */
.tesi-box-title {
	font-size: 1.02em;
	color: #0b3d66;
	margin-bottom: 4px;
}
.tesi-field-stampa .tesi-pdf-status {
	margin: 0 0 6px;
}
.tesi-field-stampa .tesi-radio {
	font-weight: 600;
}
/* --- Pulsanti azione --- */
body.tesi-configurator-page .single_add_to_cart_button {
	display: none !important;
}
.tesi-cart-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 20px;
}
.tesi-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	padding: 13px 22px;
	border-radius: 8px;
	font-size: .95em;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	transition: background .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
	border: 2px solid transparent;
	text-decoration: none;
}
.tesi-btn:active {
	transform: translateY(1px);
}
.tesi-btn-primary {
	background: #0b3d66;
	color: #fff;
	border-color: #0b3d66;
}
.tesi-btn-primary:hover {
	background: #082f4f;
	border-color: #082f4f;
	color: #fff;
}
.tesi-btn-secondary {
	background: #fff;
	color: #0b3d66;
	border-color: #0b3d66;
}
.tesi-btn-secondary:hover {
	background: #eef4fb;
	color: #0b3d66;
}
.tesi-btn-icon {
	width: 18px;
	height: 18px;
	flex: 0 0 auto;
}
@media (max-width: 600px) {
	.tesi-cart-actions {
		flex-direction: column;
	}
	.tesi-btn {
		width: 100%;
	}
	/* Texture: quadratini più compatti, "?" sotto l'immagine (non sul tasto) */
	.tesi-texture-img {
		width: 56px;
		height: 56px;
	}
	.tesi-texpicker {
		gap: 6px;
	}
	.tesi-texpicker .tesi-texture-opt {
		max-width: 84px;
		padding: 5px 4px 3px;
		font-size: .78em;
	}
	.tesi-help-inline {
		width: 14px;
		height: 14px;
		line-height: 14px;
		font-size: 9px;
	}
}
/* Etichetta leggera per il campo quantità (numero copie). */
body.tesi-configurator-page .quantity {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 16px;
}
body.tesi-configurator-page .quantity::before {
	content: "Copie:";
	font-weight: 700;
	font-size: .95em;
	color: #333;
}
body.tesi-configurator-page .quantity .qty {
	width: 74px;
	padding: 10px;
	border: 1px solid #ccc;
	border-radius: 6px;
	font-size: 1em;
}
.tesi-radio {
	display: inline-block;
	margin: 4px 12px 4px 0 !important;
	cursor: pointer;
}
.tesi-radio input[type="radio"] {
	margin-right: 5px;
}
/* --- Pulsanti LINEA grandi (immagini cliente) --- */
.tesi-linea-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
}
.tesi-linea-btn {
	position: relative;
	flex: 1 1 260px;
	max-width: 320px;
	cursor: pointer;
}
.tesi-linea-btn input[type="radio"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	margin: 0;
}
.tesi-linea-img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 10px;
	box-shadow: 0 2px 6px rgba(0,0,0,.12);
	transition: transform .12s ease, box-shadow .12s ease;
}
.tesi-linea-btn .tesi-linea-on {
	display: none;
}
.tesi-linea-btn input:checked ~ .tesi-linea-on {
	display: block;
}
.tesi-linea-btn input:checked ~ .tesi-linea-off {
	display: none;
}
.tesi-linea-btn:hover .tesi-linea-img {
	transform: translateY(-1px);
	box-shadow: 0 4px 10px rgba(0,0,0,.18);
}
.tesi-field input[type="number"],
.tesi-field input[type="text"],
.tesi-field textarea,
.tesi-field select {
	width: 100%;
	max-width: 400px;
	padding: 8px;
	border: 1px solid #ccc;
	border-radius: 4px;
}
.tesi-field input[type="file"] {
	padding: 6px 0;
}
.tesi-hint {
	display: block;
	font-size: .8em;
	color: #777;
	margin-top: 4px;
}
.tesi-price-preview {
	margin-top: 8px;
	padding: 12px 16px;
	background: #eef4fb;
	border-radius: 6px;
	font-size: 1.05em;
}
.tesi-price-preview strong {
	color: #0b3d66;
	font-size: 1.25em;
}

/* --- Tooltip "?" (punti interrogativi) --- */
.tesi-help {
	display: inline-block;
	width: 18px;
	height: 18px;
	line-height: 18px;
	text-align: center;
	border-radius: 50%;
	background: #0b3d66;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	cursor: help;
	margin-left: 6px;
	position: relative;
	vertical-align: middle;
}
.tesi-help:hover::after {
	content: attr(data-tip);
	position: absolute;
	bottom: 140%;
	left: 50%;
	transform: translateX(-50%);
	background: #333;
	color: #fff;
	padding: 8px 12px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 400;
	white-space: normal;
	width: 240px;
	max-width: 80vw;
	z-index: 100;
	text-align: left;
	line-height: 1.4;
	box-shadow: 0 2px 8px rgba(0,0,0,.2);
	pointer-events: none;
}
/* --- Stacco tra copertina e stampa --- */
.tesi-section-divider {
	border-top: 2px dashed #0b3d66;
	margin: 24px 0 18px;
}
.tesi-section-title {
	margin: 0 0 14px;
}
/* --- Nascondi prezzo WooCommerce e recensioni sul configuratore --- */
body.tesi-configurator-page .summary .price {
	display: none !important;
}
body.tesi-configurator-page #reviews {
	display: none !important;
}

/* --- Fix: clearfloat layout prodotto (footer nero che si sovrappone al configuratore) --- */
body.tesi-configurator-page div.product::after {
	content: "";
	display: table;
	clear: both;
}

/* ------------------------------------------------------------------ */
/* Testo introduttivo sotto il titolo del configuratore               */
/* ------------------------------------------------------------------ */
.tesi-cfg-intro {
	margin: -8px 0 18px;
	color: #333;
	font-size: .95em;
	line-height: 1.5;
}
.tesi-cfg-intro a {
	color: #0b3d66;
	font-weight: 600;
	text-decoration: underline;
}
.tesi-cfg-intro a:hover {
	color: #082f4f;
}

/* ------------------------------------------------------------------ */
/* Sotto-modelli a "sottocartella" sotto la voce di copertina scelta  */
/* ------------------------------------------------------------------ */
.tesi-cover-block {
	margin-bottom: 8px;
}
.tesi-submodels {
	margin: -4px 0 10px 20px;
	padding: 10px 12px 8px 14px;
	border-left: 3px solid #0b3d66;
	background: #f2f7fc;
	border-radius: 0 8px 8px 0;
}
.tesi-submodels[hidden] {
	display: none !important;
}
.tesi-submodels-title {
	font-weight: 600;
	font-size: .9em;
	color: #0b3d66;
	margin: 0 0 8px;
}
.tesi-options .tesi-sub-option {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 6px;
	padding: 8px 10px;
	border: 1px solid #cfdced;
	border-radius: 6px;
	background: #fff;
	cursor: pointer;
	font-size: .95em;
	line-height: 1.3;
	transition: border-color .15s, background .15s;
}
.tesi-options .tesi-sub-option:hover {
	border-color: #0b3d66;
}
.tesi-options .tesi-sub-option input[type="radio"] {
	margin: 0;
	flex: 0 0 auto;
}
.tesi-options .tesi-sub-option.selected {
	border-color: #0b3d66;
	background: #e6effa;
}
.tesi-options .tesi-sub-option.selected .tesi-sub-option-label {
	font-weight: 600;
}
.tesi-model-warning {
	margin-top: 8px;
}

/* ------------------------------------------------------------------ */
/* Caratteristiche del modello scelto, sotto la foto                  */
/* ------------------------------------------------------------------ */
.tesi-features {
	margin-top: 14px;
}
.tesi-features-list {
	list-style: none;
	margin: 0;
	padding: 0;
	max-width: 460px;
}
.tesi-features-list li {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 0 0 5px;
	font-size: .82em;
	line-height: 1.4;
	color: #2c3e50;
}
.tesi-features-list .tesi-check {
	color: #2e7d32;
	font-weight: 800;
	line-height: 1.3;
	flex: 0 0 auto;
}

/* ------------------------------------------------------------------ */
/* Note colore: resa a schermo e contrasto delle scritte              */
/* ------------------------------------------------------------------ */
.tesi-color-note {
	margin: -2px 0 12px;
	font-size: .75em;
	font-style: italic;
	color: #666;
	line-height: 1.35;
}
.tesi-color-tip {
	margin: 8px 0 12px;
	padding: 9px 12px;
	background: #fff8ec;
	border-left: 3px solid #f0a04b;
	border-radius: 4px;
	font-size: .85em;
	line-height: 1.45;
	color: #5a4630;
	max-width: 560px;
}
/* "?" compatto accanto alle texture della similpelle */
.tesi-help-inline {
	width: 15px;
	height: 15px;
	line-height: 15px;
	font-size: 10px;
	margin-left: 3px;
}

/* ------------------------------------------------------------------ */
/* Parte inferiore: upload file, analisi PDF, riquadri evidenziati    */
/* ------------------------------------------------------------------ */
/* Pulsante "Scegli file" più grande e leggibile */
.tesi-field-file input[type="file"] {
	font-size: .92em;
	color: #333;
	max-width: 100%;
}
.tesi-field-file input[type="file"]::file-selector-button {
	margin-right: 12px;
	padding: 11px 20px;
	border: 0;
	border-radius: 6px;
	background: #0b3d66;
	color: #fff;
	font-weight: 700;
	font-size: .92em;
	cursor: pointer;
	transition: background .15s ease;
}
.tesi-field-file input[type="file"]::file-selector-button:hover {
	background: #082f4f;
}
.tesi-field-analisi .tesi-label {
	margin-bottom: 2px;
}
.tesi-field-analisi .tesi-pdf-status {
	margin: 0;
	min-height: 1.2em;
}
/* Campi dentro i riquadri evidenziati (pagine, stampa, carta) */
.tesi-field-in-box {
	margin: 14px 0;
}
.tesi-field-in-box:last-of-type {
	margin-bottom: 6px;
}
.tesi-field-stampa > .tesi-label {
	margin-bottom: 8px;
}
/* Totale stimato */
.tesi-price-preview .tesi-price-label {
	font-weight: 700;
	color: #0b3d66;
}
.tesi-price-preview .tesi-hint {
	margin-top: 6px;
}

/* ------------------------------------------------------------------ */
/* Ritocchi richiesti: tooltip con corsivi, (opzionale), pulsante piccolo */
/* ------------------------------------------------------------------ */
.tesi-help--html:hover::after,
.tesi-help--html:focus::after {
	content: none;
	display: none;
}
.tesi-help .tesi-tip {
	display: none;
}
.tesi-help:hover .tesi-tip,
.tesi-help:focus .tesi-tip {
	display: block;
	position: absolute;
	bottom: 140%;
	left: 50%;
	transform: translateX(-50%);
	background: #333;
	color: #fff;
	padding: 8px 12px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 400;
	white-space: normal;
	width: 240px;
	max-width: 80vw;
	z-index: 100;
	text-align: left;
	line-height: 1.4;
	box-shadow: 0 2px 8px rgba(0,0,0,.2);
	pointer-events: none;
}
.tesi-tip em {
	font-style: italic;
}
/* "(opzionale)" in corsivo e non in grassetto */
.tesi-opt {
	font-style: italic;
	font-weight: 400;
	color: #6b6b6b;
}
/* Pulsante "Scegli file" più piccolo per la copertina (facoltativa) */
.tesi-field-file--small input[type="file"]::file-selector-button {
	padding: 6px 12px;
	font-size: .85em;
	font-weight: 600;
}
/* ------------------------------------------------------------------ */
/* Copie + pulsanti in fondo al configuratore                         */
/* ------------------------------------------------------------------ */
.tesi-buy {
	background: #fff;
	margin-top: 14px;
}
.tesi-buy .tesi-qty-slot:empty,
.tesi-buy .tesi-actions-slot:empty {
	display: none;
}
.tesi-buy .quantity {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 14px;
	font-weight: 600;
	/* WooCommerce mette float:left e width:50% sulla quantità: qui va a tutta riga */
	float: none !important;
	width: auto !important;
}
.tesi-buy .quantity::before {
	content: "Copie:";
	font-weight: 700;
	color: #0b3d66;
}
.tesi-buy .quantity .qty {
	width: 84px;
	padding: 8px 10px;
}
.tesi-buy .tesi-cart-actions {
	margin-top: 0;
	gap: 10px;
	flex-direction: column;
	float: none !important;
	width: 100% !important;
}
.tesi-buy .tesi-cart-actions .tesi-btn {
	flex: 0 0 auto;
	width: 100%;
	padding: 15px 18px;
	white-space: normal;
	text-align: center;
	line-height: 1.25;
	min-height: 50px;
}
.tesi-buy .tesi-cart-actions .tesi-btn-secondary {
	background: #fff;
	color: #0b3d66;
	border-color: #0b3d66;
}
.tesi-buy .tesi-cart-actions .tesi-btn-secondary:hover {
	background: #0b3d66;
	color: #fff;
}
/* ------------------------------------------------------------------ */
/* Attira l'attenzione sulla scelta della Linea                       */
/* ------------------------------------------------------------------ */
/* Anello pulsante: anima SOLO l'opacità di un bordo statico.
   Nessun transform/box-shadow sulle immagini: resta fluido anche su telefoni
   modesti (verificato: transform o box-shadow animati bloccano il rendering). */
@keyframes tesiAttiraPulse {
	0%, 100% { opacity: .18; }
	50%      { opacity: .95; }
}
.tesi-linea-buttons.tesi-attira .tesi-linea-btn {
	border-radius: 8px;
}
.tesi-linea-buttons.tesi-attira .tesi-linea-btn::after {
	content: "";
	position: absolute;
	inset: -1px;
	border: 3px solid #0b3d66;
	border-radius: 9px;
	pointer-events: none;
	opacity: .35;
	animation: tesiAttiraPulse 1.7s ease-in-out infinite;
}
.tesi-linea-buttons.tesi-attira .tesi-linea-btn:nth-of-type(2)::after {
	animation-delay: .55s;
}
@media (prefers-reduced-motion: reduce) {
	.tesi-linea-buttons.tesi-attira .tesi-linea-btn::after { animation: none; opacity: .55; }
}

/* Riquadro errori di completamento (dalla 2.5.0).
   Il tema ha html{font-size:10px}: qui si usano px per non finire a 1/10. */
.tesi-errore{position:fixed;left:50%;bottom:18px;transform:translateX(-50%);
  width:min(560px,calc(100% - 24px));max-height:60vh;overflow:auto;z-index:99999;
  background:#fdf1f1;border:1px solid #e0b4b4;border-left:4px solid #b32d2d;border-radius:8px;
  box-shadow:0 8px 24px rgba(0,0,0,.18);padding:12px 34px 12px 14px;font-size:15px;line-height:1.5;color:#7a1c1c;
  box-sizing:border-box;text-align:left}
.tesi-errore-chiudi{position:absolute;top:6px;right:8px;background:none;border:0;cursor:pointer;
  font-size:20px;line-height:1;color:#8a1f1f;padding:2px 4px}
.tesi-errore-chiudi:hover{color:#000}
.tesi-errore > strong{display:block;margin:0 18px 4px 0;font-size:15px;color:#8a1f1f}
/* I grassetti dentro l'elenco restano in linea: prima andavano a capo
   spezzando "la" / "Linea prodotto". */
.tesi-errore li strong{display:inline;font-weight:700;color:inherit;margin:0;font-size:inherit}
.tesi-errore ul{margin:6px 0 0 18px;padding:0;list-style:disc}
.tesi-errore li{margin:3px 0}
.tesi-errore[hidden]{display:none}
.tesi-campo-errore{outline:2px solid #b32d2d;outline-offset:3px;border-radius:6px}
@media (max-width:600px){
  .tesi-errore{font-size:13.5px;line-height:1.4;padding:9px 30px 9px 11px;bottom:10px;max-height:42vh}
  .tesi-errore > strong{font-size:13.5px;margin-bottom:3px}
  .tesi-errore ul{margin-top:4px}
  .tesi-errore li{margin:1px 0}
}
/* I pulsanti restano sempre raggiungibili: quando il riquadro è aperto il JS
   imposta qui un margine di scorrimento pari all'altezza del riquadro. */
.tesi-cart-actions{scroll-margin-bottom:0}
