/* Widget Assistenza Zucca — stile */
#wz-assist, #wz-assist * { box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }

#wz-assist .wz-fab {
	position: fixed; right: 20px; bottom: 20px; z-index: 2147483000;
	width: 68px; height: 68px; border-radius: 50%; border: 0; padding: 0; margin: 0;
	background: #1565c0; color: #fff; cursor: pointer;
	display: flex; align-items: center; justify-content: center;
	box-shadow: 0 6px 20px rgba(0,0,0,.28);
	transition: transform .2s ease, background .2s ease;
}
#wz-assist .wz-fab:hover { background: #0d47a1; transform: scale(1.06); }
#wz-assist .wz-fab:hover .wz-mascot { filter: drop-shadow(0 6px 8px rgba(0,0,0,.35)); }
#wz-assist .wz-fab:focus-visible { outline: 4px solid #ffb300; outline-offset: 3px; }
#wz-assist .wz-fab svg { width: 34px; height: 34px; fill: currentColor; display: block; }

/* Zucca felice: saltelli veloci per 4 s + 6 s ferma = ciclo di 10 s (4 s = 40%).
   Al passaggio del cursore fa 3 capriole di fila (classe wz-flipping, vedi JS). */
/* Romeo con le cuffie è grande come le zucche della guida fin dall'inizio: stessa altezza, larghezza dalla figura. */
#wz-assist .wz-fab.wz-has-mascot {
	width: auto; height: 110px; border-radius: 14px; padding: 0;
	background: transparent; box-shadow: none; overflow: visible; align-items: flex-end;
}
/* Natale: il cappello sporge sopra, fumetto e scheda si alzano un poco */
#wz-assist.wz-natale .wz-bubble { bottom: calc(100% + 30px); }
#wz-assist.wz-natale .wz-panel, #wz-assist.wz-natale.wz-in-guida .wz-panel { bottom: 166px; max-height: calc(100vh - 186px); }
#wz-assist .wz-fab.wz-has-mascot:hover { background: transparent; transform: none; }
#wz-assist .wz-mascot {
	/* --wz-k: altezza della figura rispetto a una normale (vedi JS): il cappello di Natale sporge sopra il tasto */
	display: block; flex: none; width: auto; max-width: none; height: calc(100% * var(--wz-k, 1)); margin: 0; object-fit: contain;
	filter: drop-shadow(0 4px 6px rgba(0,0,0,.3));
	transform-origin: 50% 100%; animation: wz-hop 10s ease-in-out infinite;
}
/* Capriole: la rotazione è una sola curva continua (parte e si ferma dolcemente)
   e il salto è un'animazione a parte, così i due movimenti non si spezzano a vicenda. */
#wz-assist .wz-fab.wz-flipping .wz-mascot {
	transform: none; transform-origin: 50% 55%; will-change: rotate, translate;
	animation: wz-flip 2.4s cubic-bezier(.45, .05, .35, 1) 1, wz-flip-salto .8s cubic-bezier(.33, 0, .67, 1) 3;
}
#wz-assist .wz-bubble {
	position: absolute; right: 8px; bottom: calc(100% + 10px); white-space: nowrap;
	padding: 7px 12px; border-radius: 14px; background: #fff; color: #1a1a1a;
	font-size: 15px; font-weight: 700; line-height: 1.2;
	box-shadow: 0 3px 10px rgba(0,0,0,.22); pointer-events: none;
	transform-origin: 80% 100%; opacity: 0; animation: wz-bubble 10s ease-out infinite;
}
#wz-assist .wz-bubble::after {
	content: ""; position: absolute; right: 26px; bottom: -6px;
	border: 7px solid transparent; border-top-color: #fff; border-bottom: 0;
}

/* 8 saltelli veloci (0,5 s l'uno) con schiacciamento all'atterraggio */
@keyframes wz-hop {
	0%, 40%, 100% { transform: none; }
	5%, 10%, 15%, 20%, 25%, 30%, 35% { transform: translateY(0) scale(1.05, .92); }
	2.5%, 12.5%, 22.5%, 32.5% { transform: translateY(-16px) scale(.97, 1.05) rotate(-5deg); }
	7.5%, 17.5%, 27.5%, 37.5% { transform: translateY(-16px) scale(.97, 1.05) rotate(5deg); }
}
/* 3 capriole di fila (1080°) e, insieme, 3 saltelli ad arco */
@keyframes wz-flip { from { rotate: 0deg; } to { rotate: 1080deg; } }
@keyframes wz-flip-salto {
	0%, 100% { translate: 0 0; }
	50%      { translate: 0 -22px; }
}
@keyframes wz-bubble {
	0%, 3%    { opacity: 0; transform: scale(.6); }
	6%, 36%   { opacity: 1; transform: scale(1); }
	40%, 100% { opacity: 0; transform: scale(.6); }
}
/* Scheda aperta: la zucca sta ferma e dritta. Prima l'animazione veniva solo messa in pausa
   e la zucca restava congelata a metà capriola o a metà salto. */
#wz-assist.wz-open .wz-fab, #wz-assist.wz-open .wz-fab * { animation: none; }
/* Al tocco sul telefono il browser disegnava un riquadro grigio dietro la zucca */
#wz-assist .wz-fab, #wz-assist button, #wz-assist a, #wz-zucca-guida button, #wz-zucca-guida a { -webkit-tap-highlight-color: transparent; }

#wz-assist .wz-panel {
	position: fixed; right: 20px; bottom: 142px; z-index: 2147483001;
	width: 400px; max-width: calc(100vw - 32px);
	max-height: calc(100vh - 162px); overflow-y: auto; -webkit-overflow-scrolling: touch;
	background: #fff; color: #1a1a1a; border-radius: 18px;
	box-shadow: 0 12px 40px rgba(0,0,0,.25); border: 1px solid #e3e8ef;
	padding: 22px 20px 20px;
	opacity: 0; visibility: hidden; transform: translateY(12px);
	transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
}
#wz-assist.wz-open .wz-panel { opacity: 1; visibility: visible; transform: none; transition: opacity .2s ease, transform .2s ease; }

#wz-assist .wz-close {
	position: absolute; top: 10px; right: 10px;
	width: 44px; height: 44px; border-radius: 50%; border: 0; margin: 0; padding: 0;
	background: #eef1f5; color: #1a1a1a; font-size: 28px; line-height: 44px; text-align: center;
	cursor: pointer;
}
#wz-assist .wz-close:hover { background: #dde3ea; }
#wz-assist .wz-close:focus-visible { outline: 3px solid #1565c0; outline-offset: 2px; }

#wz-assist .wz-title {
	margin: 0 48px 18px 0; padding: 0; font-size: 24px; line-height: 1.25; font-weight: 700; color: #0d47a1;
}
#wz-assist .wz-title span { display: block; font-size: 19px; font-weight: 600; color: #1a1a1a; margin-top: 4px; }

#wz-assist .wz-btn {
	display: flex; align-items: center; justify-content: center; gap: 8px;
	width: 100%; min-height: 58px; margin: 0 0 12px; padding: 12px 14px;
	border-radius: 12px; border: 0;
	font-size: 18px; font-weight: 700; line-height: 1.25; text-align: center;
	text-decoration: none !important; cursor: pointer;
	transition: filter .15s ease, transform .1s ease;
}
#wz-assist .wz-btn:hover { filter: brightness(.93); }
#wz-assist .wz-btn:active { transform: scale(.98); }
#wz-assist .wz-btn:focus-visible { outline: 4px solid #ffb300; outline-offset: 2px; }
#wz-assist .wz-whatsapp { background: #1e8e3e; color: #fff !important; }
#wz-assist .wz-phone { background: #1565c0; color: #fff !important; }
#wz-assist .wz-reso { background: #fff; color: #00695c !important; border: 3px solid #00796b; }
#wz-assist .wz-reso:hover { background: #e0f2f1; filter: none; }
#wz-assist .wz-reso-box { margin: 0 0 18px; }
#wz-assist .wz-reso-box p { margin: 0 0 10px; font-size: 16px; line-height: 1.45; color: #333; }

#wz-assist .wz-label { margin: 6px 0 10px; font-size: 17px; font-weight: 700; color: #333; }

#wz-assist .wz-hours {
	margin: 6px 0 18px; padding: 14px 16px; border-radius: 12px;
	background: #fff8e1; border-left: 6px solid #ffb300;
	font-size: 17px; line-height: 1.55; color: #1a1a1a;
}
#wz-assist .wz-hours strong { display: block; font-size: 18px; margin-bottom: 4px; }
#wz-assist .wz-hours p { margin: 0; padding: 0; }

/* ---------- Assistente passo passo ---------- */
#wz-assist .wz-guida {
	margin: 0 0 18px; padding: 14px 14px 16px; border-radius: 14px;
	background: #e0f2f1; border: 2px solid #80cbc4;
}
#wz-assist .wz-passi { display: flex; justify-content: center; gap: 8px; margin: 0 0 10px; padding: 0; list-style: none; }
#wz-assist .wz-passi li {
	width: 30px; height: 30px; margin: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center;
	background: #fff; border: 2px solid #80cbc4; color: #00695c; font-size: 15px; font-weight: 700;
}
#wz-assist .wz-passi li.wz-fatto { background: #b2dfdb; }
#wz-assist .wz-passi li.wz-attivo { background: #00796b; border-color: #00796b; color: #fff; }
#wz-assist .wz-guida-img { display: block; width: auto; max-width: 100%; height: calc(110px * var(--wz-k, 1)); margin: 0 auto 6px; object-fit: contain; }
#wz-assist .wz-step-n { margin: 0; text-align: center; font-size: 15px; font-weight: 700; color: #00695c; text-transform: uppercase; letter-spacing: .04em; }
#wz-assist .wz-domanda { margin: 2px 0 12px; text-align: center; font-size: 21px; line-height: 1.3; font-weight: 700; color: #004d40; outline: none; }
#wz-assist .wz-step[hidden], #wz-assist .wz-nav[hidden] { display: none; }
#wz-assist .wz-suggerimento { margin: 0; text-align: center; font-size: 16px; line-height: 1.4; color: #333; }
#wz-assist .wz-suggerimento:empty { display: none; }
#wz-assist .wz-campo { margin: 0 0 10px; }
#wz-assist .wz-campo label { display: block; margin: 0 0 4px; font-size: 16px; font-weight: 700; color: #333; }
#wz-assist .wz-campo select {
	width: 100%; min-height: 52px; margin: 0; padding: 8px 12px;
	font-size: 17px; color: #1a1a1a; background: #fff;
	border: 2px solid #80cbc4; border-radius: 10px; box-shadow: none;
}
#wz-assist .wz-campo select:disabled { background: #f1f3f5; color: #8a949e; border-color: #cfd8dc; }
#wz-assist .wz-campo select:focus { border-color: #00796b; outline: 3px solid rgba(0,121,107,.25); }
#wz-assist .wz-auto-scelta {
	margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: #fff; color: #004d40;
	font-size: 16px; font-weight: 700; line-height: 1.35;
}
#wz-assist .wz-auto-scelta:empty { display: none; }
#wz-assist .wz-nav { display: flex; justify-content: space-between; gap: 8px; margin: 14px 0 0; }
#wz-assist .wz-mini {
	min-height: 44px; padding: 6px 14px; margin: 0; border-radius: 8px; border: 2px solid currentColor;
	background: #fff; color: #00695c; font-size: 16px; font-weight: 700; cursor: pointer;
	height: auto; white-space: normal; text-transform: none; letter-spacing: normal; line-height: 1.2;
}
#wz-assist .wz-mini:disabled { opacity: .45; cursor: default; }
#wz-assist .wz-mini:focus-visible { outline: 3px solid #ffb300; outline-offset: 2px; }
#wz-assist .wz-stato { margin: 10px 0 0; font-size: 16px; line-height: 1.45; color: #1a1a1a; }
#wz-assist .wz-stato:empty { display: none; }
#wz-assist .wz-caricamento::before {
	content: ""; display: inline-block; width: 16px; height: 16px; margin-right: 8px; vertical-align: -3px;
	border: 3px solid #b2dfdb; border-top-color: #00796b; border-radius: 50%; animation: wz-gira .8s linear infinite;
}
@keyframes wz-gira { to { transform: rotate(360deg); } }
#wz-assist .wz-errore { padding: 10px 12px; border-radius: 10px; background: #fff8e1; color: #6d4c00; }

/* Contatti, alla fine del percorso */
#wz-assist .wz-contatti { margin: 0 0 6px; }
#wz-assist .wz-contatti h3 { margin: 0; text-align: center; font-size: 22px; font-weight: 700; color: #004d40; }
#wz-assist .wz-contatti-testo { margin: 2px 0 12px; text-align: center; font-size: 17px; color: #333; }
/* Smartphone */
@media (max-width: 480px) {
	#wz-assist .wz-guida { padding: 12px 10px 14px; }
	#wz-assist .wz-guida-img { height: calc(90px * var(--wz-k, 1)); }
	#wz-assist .wz-fab { right: 14px; bottom: 14px; width: 62px; height: 62px; }
	#wz-assist .wz-fab.wz-has-mascot { width: auto; height: 76px; }
	#wz-assist .wz-bubble { font-size: 14px; padding: 6px 10px; }
	#wz-assist .wz-panel {
		right: 8px; left: 8px; bottom: 98px; width: auto; max-width: none;
		max-height: calc(100vh - 104px); padding: 20px 16px 16px;
	}
	#wz-assist .wz-title { font-size: 22px; }
	#wz-assist .wz-title span { font-size: 18px; }
	#wz-assist .wz-btn { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
	#wz-assist .wz-fab, #wz-assist .wz-panel, #wz-assist .wz-btn { transition: none; }
	#wz-assist .wz-fab * { animation: none !important; }
	#wz-assist .wz-bubble { display: none; }
	#wz-assist .wz-caricamento::before { animation-duration: 2.4s; }
}

/* ---------- Il tasto principale guida il cliente sulle pagine del sito ---------- */
/* Durante la guida il tasto prende la figura dello step (cambia forma) e galleggia piano. */
/* Tutte le zucche alte uguali (come quella a mani giunte): la larghezza segue la figura. */
#wz-assist .wz-fab.wz-guidando { width: auto; height: 110px; }
#wz-assist .wz-fab.wz-guidando .wz-mascot { width: auto; height: calc(100% * var(--wz-k, 1)); max-width: none; transform-origin: 50% 50%; animation: wz-zg-galleggia 2.6s ease-in-out infinite; }
#wz-assist .wz-fab.wz-guidando .wz-bubble { display: none; }
#wz-assist .wz-fab.wz-zg-salta { animation: wz-zg-entra .5s cubic-bezier(.2, 1.4, .4, 1) both; }
/* Mentre si apre la pagina successiva: saltelli più svelti, il sito non è fermo */
#wz-assist .wz-fab.wz-guidando.wz-zg-attesa .wz-mascot { animation: wz-zg-saltella .5s ease-in-out infinite; }

/* La nuvoletta con la domanda, accanto al tasto */
#wz-zucca-guida, #wz-zucca-guida * { box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
#wz-zucca-guida {
	/* --wz-fab-w: larghezza della zucca di questo step (vedi JS), la nuvoletta le sta accanto */
	position: fixed; right: calc(var(--wz-fab-w, 150px) + 26px); bottom: 20px; z-index: 2147482999;
	display: none; width: 380px; max-width: calc(100vw - var(--wz-fab-w, 150px) - 46px); pointer-events: none;
}
#wz-zucca-guida.wz-zg-visibile { display: block; }
#wz-zucca-guida.wz-zg-entra { animation: wz-zg-entra .5s cubic-bezier(.2, 1.4, .4, 1) both; }
/* Scheda aperta: la nuvoletta si fa da parte; la scheda si apre sopra il tasto più alto */
#wz-assist.wz-open #wz-zucca-guida { display: none; }
#wz-assist.wz-in-guida .wz-panel { bottom: 142px; max-height: calc(100vh - 162px); }
/* Nuvoletta: corpo ovale, tre "sbuffi" sopra e due palline verso la zucca.
   Il bordo verde acqua e l'ombra sono filtri sull'insieme, così seguono tutta la sagoma. */
#wz-zucca-guida .wz-zg-nuvola {
	position: relative; flex: 1 1 auto; margin: 22px 18px 34px 0; padding: 16px 40px 16px 20px; pointer-events: auto;
	background: #fff; color: #1a1a1a; border: 0; border-radius: 42px / 34px;
	font-size: 16px; line-height: 1.4;
	filter: drop-shadow(2px 0 0 #00796b) drop-shadow(-2px 0 0 #00796b) drop-shadow(0 2px 0 #00796b) drop-shadow(0 -2px 0 #00796b) drop-shadow(0 6px 10px rgba(0,0,0,.18));
}
#wz-zucca-guida .wz-zg-nuvola::after {
	content: ""; position: absolute; top: -18px; left: 22%; width: 56px; height: 44px; border-radius: 50%;
	background: #fff; box-shadow: 44px -6px 0 2px #fff, 92px 4px 0 -4px #fff; pointer-events: none;
}
#wz-zucca-guida .wz-zg-nuvola::before {
	content: ""; position: absolute; right: -16px; bottom: 6px; width: 16px; height: 16px; border-radius: 50%;
	background: #fff; box-shadow: 14px 12px 0 -3px #fff; pointer-events: none;
}
#wz-zucca-guida .wz-zg-nuvola > * { position: relative; z-index: 1; }
#wz-zucca-guida .wz-zg-domanda { display: block; margin: 0 0 4px; font-size: 19px; line-height: 1.3; color: #004d40; }
#wz-zucca-guida .wz-zg-testo { display: block; }
#wz-zucca-guida .wz-zg-testo:empty { display: none; }
#wz-zucca-guida .wz-zg-azioni { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
#wz-zucca-guida .wz-zg-azioni[hidden] { display: none; }
#wz-zucca-guida .wz-zg-btn {
	display: inline-flex; align-items: center; justify-content: center; min-height: 44px; margin: 0; padding: 8px 16px;
	border: 0; border-radius: 10px; font-size: 16px; font-weight: 700; line-height: 1.2; cursor: pointer;
	text-decoration: none !important; text-transform: none; letter-spacing: normal; white-space: nowrap;
}
#wz-zucca-guida .wz-zg-primario { background: #00796b; color: #fff !important; }
#wz-zucca-guida .wz-zg-primario:hover { background: #00695c; }
#wz-zucca-guida .wz-zg-whatsapp { background: #1e8e3e; color: #fff !important; }
#wz-zucca-guida .wz-zg-btn:focus-visible, #wz-zucca-guida .wz-zg-chiudi:focus-visible { outline: 3px solid #ffb300; outline-offset: 2px; }
#wz-zucca-guida .wz-zg-chiudi {
	position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; margin: 0; padding: 0;
	border: 0; border-radius: 50%; background: #eef1f5; color: #333; font-size: 20px; line-height: 30px; cursor: pointer;
}
@keyframes wz-zg-entra { from { opacity: 0; transform: translateY(24px) scale(.85); } to { opacity: 1; transform: none; } }
@keyframes wz-zg-galleggia { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes wz-zg-saltella { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* Retroilluminazione leggera dell'auto scelta: un alone sulla foto stessa, che resta grande com'è */
img.wz-luce-auto { position: relative; z-index: 3; border-radius: 12px; animation: wz-luce-auto 2.2s ease-in-out infinite; }
/* Contenitori dell'auto illuminata: la luce può uscire dai bordi (vedi JS) */
.wz-luce-libera { overflow: visible !important; }
@keyframes wz-luce-auto {
	0%, 100% { filter: drop-shadow(0 0 6px rgba(255, 193, 7, .45)); }
	50%      { filter: drop-shadow(0 0 16px rgba(255, 179, 0, .95)) drop-shadow(0 0 4px rgba(255, 193, 7, .9)); }
}

/* Retroilluminazione dei riquadri da toccare: si anima solo l'opacità */
.wz-luce { position: relative; }
.wz-luce::after {
	content: ""; position: absolute; inset: 0; z-index: 2; border-radius: 14px; pointer-events: none;
	box-shadow: 0 0 22px 6px rgba(255, 193, 7, .75), inset 0 0 0 3px rgba(255, 179, 0, .9);
	animation: wz-respira 2.2s ease-in-out infinite;
}
@keyframes wz-respira { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

@media (max-width: 480px) {
	#wz-assist .wz-fab.wz-guidando { width: auto; height: 76px; }
	#wz-assist.wz-in-guida .wz-panel { bottom: 96px; max-height: calc(100vh - 108px); }
	#wz-assist.wz-natale .wz-panel, #wz-assist.wz-natale.wz-in-guida .wz-panel { bottom: 116px; max-height: calc(100vh - 128px); }
	#wz-zucca-guida { left: 8px; right: 8px; bottom: 94px; width: auto; max-width: none; }
	#wz-zucca-guida .wz-zg-nuvola { margin: 20px 14px 18px 0; padding: 14px 36px 14px 16px; font-size: 15px; }
	#wz-zucca-guida .wz-zg-domanda { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
	#wz-zucca-guida, #wz-assist .wz-fab.wz-zg-salta, .wz-luce::after, img.wz-luce-auto { animation: none !important; }
	img.wz-luce-auto { filter: drop-shadow(0 0 12px rgba(255, 179, 0, .9)); }
}
