/* Componi la tua torta a piani — stili del wizard.
   Tutto sotto .ro-torta con prefisso rot-: non tocca il tema né le classi ro-* di Elementor. */

.ro-torta {
	--rot-charcoal: #1C1C1C;
	--rot-testo: #2B2926;
	--rot-tenue: #5C574F;
	--rot-oro: #B08A3E;
	--rot-oro-scuro: #8A6824;
	--rot-avorio: #F7F3EA;
	--rot-bianco: #FFFFFF;
	--rot-filo: #DDD2BE;
	--rot-errore: #9B2C2C;
	--rot-titoli: "Playfair Display", Georgia, serif;
	--rot-testi: Montserrat, "Helvetica Neue", Arial, sans-serif;

	display: grid;
	gap: 24px;
	box-sizing: border-box;
	width: 100%;
	color: var(--rot-testo);
	font: 400 16px/1.5 var(--rot-testi);
}
.ro-torta *, .ro-torta *::before, .ro-torta *::after { box-sizing: border-box; }
.ro-torta [hidden] { display: none !important; }
.ro-torta ::selection { background: #EADBB8; color: var(--rot-charcoal); }
.ro-torta input, .ro-torta textarea { caret-color: var(--rot-oro-scuro); accent-color: var(--rot-charcoal); }

/* --- Scena ------------------------------------------------------------------- */
.rot-scena {
	position: relative;
	height: max(280px, 45vh);
	overflow: hidden;
	border-radius: 4px;
	background:
		radial-gradient(120% 80% at 50% 38%, #FFFFFF 0%, var(--rot-avorio) 62%, #EFE7D7 100%);
}
.rot-scena canvas { display: block; width: 100%; height: 100%; }
.rot-indicativa {
	position: absolute;
	right: 12px;
	bottom: 10px;
	left: 12px;
	margin: 0;
	padding: 6px 10px;
	color: var(--rot-tenue);
	font: 400 13px/1.4 var(--rot-testi);
	text-align: center;
	background: rgba(247,243,234,.85);
	border-radius: 4px;
	pointer-events: none;
}
.rot-statica { display: grid; place-items: center; gap: 8px; height: 100%; margin: 0; padding: 16px; text-align: center; }
.rot-statica img { width: auto; max-width: 100%; height: calc(100% - 56px); object-fit: contain; }
.rot-statica figcaption { color: var(--rot-tenue); }

/* --- Pannello ---------------------------------------------------------------- */
.rot-pannello {
	display: grid;
	gap: 20px;
	align-content: start;
	min-width: 0;
	padding: 24px 16px 96px; /* sotto: spazio per la barra CTA mobile del sito */
	background: var(--rot-bianco);
	border: 1px solid var(--rot-filo);
	border-radius: 4px;
}

/* Passi */
.rot-passi ol { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.rot-passi li { flex: 1 1 0; min-width: 0; }
.rot-passi button {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	width: 100%;
	min-height: 44px;
	padding: 4px 2px;
	border: 0;
	background: none;
	color: var(--rot-tenue);
	font: 600 16px/1.2 var(--rot-testi);
	cursor: pointer;
}
.rot-passo-n {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border: 1px solid var(--rot-filo);
	border-radius: 50%;
	background: var(--rot-bianco);
	transition: background-color .2s, border-color .2s, color .2s;
}
.rot-passo-nome {
	position: absolute;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
.rot-passi button[aria-current="step"] { color: var(--rot-charcoal); }
.rot-passi button[aria-current="step"] .rot-passo-n { border-color: var(--rot-charcoal); background: var(--rot-charcoal); color: var(--rot-bianco); }
.rot-passi button:hover .rot-passo-n { border-color: var(--rot-oro); }

/* Stima */
.rot-totale {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: baseline;
	gap: 0 16px;
	padding: 16px 20px;
	background: var(--rot-avorio);
	border-left: 2px solid var(--rot-oro);
}
.rot-totale-etichetta { font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.rot-stima {
	grid-row: span 2;
	align-self: center;
	color: var(--rot-charcoal);
	font: 600 32px/1.1 var(--rot-titoli);
	font-variant-numeric: tabular-nums;
}
.rot-stima.rot-cambia { animation: rot-pulsa .45s ease-out; }
@keyframes rot-pulsa { 40% { transform: scale(1.08); color: var(--rot-oro-scuro); } }
.rot-persone { color: var(--rot-tenue); }
.rot-totale .rot-nota { grid-column: 1 / -1; margin: 8px 0 0; }

/* Step */
.rot-wizard { display: grid; gap: 16px; margin: 0; }
.rot-passo, .rot-gruppo { min-width: 0; margin: 0; padding: 0; border: 0; }
.rot-passo { display: grid; gap: 16px; }
.rot-passo > legend {
	margin: 0 0 4px;
	padding: 0;
	color: var(--rot-charcoal);
	font: 600 26px/1.25 var(--rot-titoli);
	outline: none;
}
.rot-gruppo { display: grid; gap: 8px; }
.rot-gruppo > legend { margin: 0 0 8px; padding: 0; font-weight: 600; color: var(--rot-charcoal); }
.rot-nota { margin: 0; color: var(--rot-tenue); }

.rot-opzioni { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.rot-opzione {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 2px 12px;
	min-height: 56px;
	margin: 0;
	padding: 10px 16px;
	border: 1px solid var(--rot-filo);
	border-radius: 4px;
	background: var(--rot-bianco);
	color: var(--rot-testo);
	cursor: pointer;
	transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.rot-opzione input, .rot-colore input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}
.rot-opzione-nome { font-weight: 600; }
.rot-prezzo { color: var(--rot-tenue); font-variant-numeric: tabular-nums; }
.rot-opzione:hover { border-color: var(--rot-oro); }
.rot-opzione:has(input:checked) { border-color: var(--rot-charcoal); background: var(--rot-avorio); box-shadow: inset 0 0 0 1px var(--rot-charcoal); }
.rot-opzione:has(input:checked) .rot-prezzo { color: var(--rot-testo); }
.rot-opzione:has(input:focus-visible), .rot-colore:has(input:focus-visible) { outline: 2px solid var(--rot-oro-scuro); outline-offset: 2px; }
.rot-opzione:has(input:disabled) { cursor: not-allowed; opacity: .55; }
.rot-opzione:has(input[type="checkbox"])::before {
	content: "";
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	order: -1;
	border: 1px solid var(--rot-tenue);
	border-radius: 3px;
	background: var(--rot-bianco) no-repeat center / 14px;
}
.rot-opzione:has(input[type="checkbox"]:checked)::before {
	border-color: var(--rot-charcoal);
	background-color: var(--rot-charcoal);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2 7.5l3 3 7-7' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E");
}
.rot-opzione:has(input[type="checkbox"]) .rot-opzione-nome { flex: 1 1 auto; }

/* Decorazioni */
.rot-decorazioni { display: grid; gap: 8px; }
.rot-deco { display: grid; gap: 8px; }
.rot-sotto:empty { display: none; }
.rot-sotto { display: grid; gap: 8px; padding: 4px 0 8px 16px; border-left: 2px solid var(--rot-filo); margin-left: 8px; }
.rot-colori { display: flex; flex-wrap: wrap; gap: 8px; }
.rot-colore {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 4px 14px 4px 6px;
	border: 1px solid var(--rot-filo);
	border-radius: 999px;
	background: var(--rot-bianco);
	cursor: pointer;
}
.rot-colore:hover { border-color: var(--rot-oro); }
.rot-colore:has(input:checked) { border-color: var(--rot-charcoal); box-shadow: inset 0 0 0 1px var(--rot-charcoal); }
.rot-campione { width: 30px; height: 30px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(28, 28, 28, .15); }
.rot-campo { font-weight: 600; }
.ro-torta input[type="text"], .ro-torta input[type="email"], .ro-torta input[type="tel"], .ro-torta input[type="date"], .ro-torta textarea {
	width: 100%;
	min-height: 48px;
	padding: 10px 12px;
	border: 1px solid #6E6961;
	border-radius: 4px;
	background: var(--rot-bianco);
	color: var(--rot-charcoal);
	font: 400 16px/1.4 var(--rot-testi);
}
.ro-torta input:focus-visible, .ro-torta textarea:focus-visible { outline: 2px solid var(--rot-oro-scuro); outline-offset: 2px; }

/* Messaggi */
.rot-errore { margin: 0; color: var(--rot-errore); font-weight: 600; }
.rot-avviso { margin: 0; padding-left: 12px; border-left: 2px solid var(--rot-oro); color: var(--rot-testo); }
.rot-errore:empty, .rot-avviso:empty { display: none; }

/* Pulsanti */
.rot-azioni { display: flex; gap: 12px; justify-content: space-between; }
.ro-torta .rot-avanti, .ro-torta .rot-indietro, .ro-torta .rot-sorprendimi {
	min-height: 48px;
	padding: 12px 24px;
	border: 1px solid var(--rot-charcoal);
	border-radius: 4px;
	font: 600 16px/1.2 var(--rot-testi);
	letter-spacing: .02em;
	cursor: pointer;
	transition: background-color .15s, color .15s, border-color .15s;
}
.ro-torta .rot-avanti { margin-left: auto; background: var(--rot-charcoal); color: var(--rot-bianco); }
.ro-torta .rot-avanti:hover { background: var(--rot-oro-scuro); border-color: var(--rot-oro-scuro); }
.ro-torta .rot-indietro { background: var(--rot-bianco); color: var(--rot-charcoal); }
.ro-torta .rot-indietro:hover { border-color: var(--rot-oro); }
.ro-torta .rot-sorprendimi {
	justify-self: start;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border-color: var(--rot-oro);
	background: var(--rot-bianco);
	color: var(--rot-charcoal);
}
.ro-torta .rot-sorprendimi::before {
	content: "";
	width: 18px;
	height: 18px;
	background: var(--rot-oro-scuro);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5l2.2 6.3 6.3 2.2-6.3 2.2L12 19.5l-2.2-6.3L3.5 11l6.3-2.2zM19 16l.9 2.1L22 19l-2.1.9L19 22l-.9-2.1L16 19l2.1-.9z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5l2.2 6.3 6.3 2.2-6.3 2.2L12 19.5l-2.2-6.3L3.5 11l6.3-2.2zM19 16l.9 2.1L22 19l-2.1.9L19 22l-.9-2.1L16 19l2.1-.9z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ro-torta .rot-sorprendimi:hover { background: var(--rot-avorio); }
.ro-torta button:focus-visible { outline: 2px solid var(--rot-oro-scuro); outline-offset: 2px; }

/* Riepilogo */
.rot-riepilogo { display: grid; gap: 16px; }
.rot-righe { display: grid; margin: 0; padding: 0; list-style: none; }
.rot-righe li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px dotted var(--rot-filo); }
.rot-righe li span:last-child { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.rot-riepilogo-totale { display: flex; justify-content: space-between; align-items: baseline; margin: 0; font-weight: 600; }
.rot-riepilogo-totale strong { color: var(--rot-charcoal); font: 600 32px/1.1 var(--rot-titoli); }
.rot-avviso-prezzo { margin: 0; padding: 12px 16px; background: var(--rot-avorio); border-left: 2px solid var(--rot-oro); }

/* Richiesta */
.rot-richiesta { display: grid; gap: 16px; margin-top: 8px; padding-top: 24px; border-top: 1px solid var(--rot-filo); }
.rot-sottotitolo { margin: 0; color: var(--rot-charcoal); font: 600 24px/1.25 var(--rot-titoli); outline: none; }
.rot-campo-box { display: grid; gap: 6px; }
.rot-campo-errore { margin: 0; color: var(--rot-errore); font-weight: 600; }
.rot-campo-errore:empty, .rot-invio-errore:empty { display: none; }
.rot-invio-errore { margin: 0; color: var(--rot-errore); font-weight: 600; }
.ro-torta [aria-invalid="true"] { border-color: var(--rot-errore); box-shadow: inset 0 0 0 1px var(--rot-errore); }
.ro-torta textarea { resize: vertical; }
.ro-torta input[type="file"] {
	width: 100%;
	min-height: 48px;
	padding: 6px;
	border: 1px dashed #6E6961;
	border-radius: 4px;
	background: var(--rot-avorio);
	color: var(--rot-charcoal);
	font: 400 16px/1.4 var(--rot-testi);
}
.ro-torta input[type="file"]::file-selector-button {
	min-height: 36px;
	margin-right: 12px;
	padding: 6px 14px;
	border: 1px solid var(--rot-charcoal);
	border-radius: 4px;
	background: var(--rot-bianco);
	color: var(--rot-charcoal);
	font: 600 16px/1.2 var(--rot-testi);
	cursor: pointer;
}
.rot-consenso { justify-content: flex-start; }
.rot-nota a { color: var(--rot-oro-scuro); text-decoration: underline; text-underline-offset: 3px; }
.rot-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.rot-azioni-invio { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.ro-torta .rot-invia {
	min-height: 48px;
	padding: 12px 28px;
	border: 1px solid var(--rot-charcoal);
	border-radius: 4px;
	background: var(--rot-charcoal);
	color: var(--rot-bianco);
	font: 600 16px/1.2 var(--rot-testi);
	letter-spacing: .02em;
	cursor: pointer;
}
.ro-torta .rot-invia:hover { background: var(--rot-oro-scuro); border-color: var(--rot-oro-scuro); }
.ro-torta .rot-invia[aria-busy="true"] { cursor: progress; opacity: .8; }
.ro-torta .rot-whatsapp {
	display: inline-flex;
	align-items: center;
	min-height: 48px;
	padding: 12px 4px;
	color: var(--rot-charcoal);
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: var(--rot-oro);
	text-underline-offset: 4px;
}
.ro-torta .rot-whatsapp:hover { color: var(--rot-oro-scuro); }
.ro-torta a:focus-visible { outline: 2px solid var(--rot-oro-scuro); outline-offset: 2px; }
.rot-conferma { display: grid; gap: 8px; padding: 20px; background: var(--rot-avorio); border-left: 2px solid var(--rot-oro); }
.rot-conferma p { margin: 0; }

/* --- Larghezze ----------------------------------------------------------------- */
@media (min-width: 768px) {
	.rot-pannello { padding: 32px; }
	.rot-passi button { flex-direction: column; }
	.rot-passi button[aria-current="step"] .rot-passo-nome { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
}
@media (min-width: 1024px) {
	.ro-torta { grid-template-columns: minmax(0, 55fr) minmax(0, 45fr); align-items: start; gap: 32px; }
	/* Sotto l'header fisso del sito (100 px su desktop largo). */
	.rot-scena { position: sticky; top: 116px; height: min(calc(100vh - 140px), 720px); }
}

@media (prefers-reduced-motion: reduce) {
	.ro-torta *, .ro-torta *::before { transition: none !important; animation: none !important; }
}
