/* Pasquale sul sito: bolla fissa + chat (includes/pasquale-chat.php, assets/js/pasquale.js) */
.pasq { --pasq-gap: 20px; --pasq-size: 64px; position: fixed; right: var(--pasq-gap); bottom: var(--pasq-gap); z-index: 96; font-family: var(--pv-font); }

.pasq__bubble {
	position: relative; display: block; width: var(--pasq-size); height: var(--pasq-size); padding: 0;
	border: 3px solid var(--pv-red); border-radius: 50%; background: var(--pv-white);
	box-shadow: 0 8px 24px rgba(0, 0, 0, .28); cursor: pointer; -webkit-tap-highlight-color: transparent;
	transition: transform .2s ease-out;
}
.pasq__bubble img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.pasq__bubble:hover, .pasq__bubble:focus-visible { transform: scale(1.06); }
.pasq__bubble::after { /* pallino "online" */
	content: ""; position: absolute; right: 1px; bottom: 1px; width: 14px; height: 14px;
	border: 2px solid var(--pv-white); border-radius: 50%; background: #25D366;
}
.pasq__hint {
	position: absolute; right: calc(100% + 12px); top: 50%; transform: translateY(-50%);
	padding: 8px 14px; border-radius: 999px; background: var(--pv-black); color: var(--pv-white);
	font: 700 15px/1 var(--pv-font); white-space: nowrap; pointer-events: none;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .2);
}
.pasq.is-open .pasq__hint { display: none; }
@media (hover: hover) {
	.pasq__hint { opacity: 0; transition: opacity .2s; }
	.pasq__bubble:hover .pasq__hint, .pasq__bubble:focus-visible .pasq__hint { opacity: 1; }
}
@media (hover: none) { .pasq__hint { animation: pasq-hint 6s 1.5s both; } }
@keyframes pasq-hint { 0%, 100% { opacity: 0; } 8%, 85% { opacity: 1; } }

.pasq__panel {
	position: absolute; right: 0; bottom: calc(var(--pasq-size) + 14px);
	display: flex; flex-direction: column; width: min(380px, calc(100vw - 2 * var(--pasq-gap)));
	height: min(560px, calc(100dvh - var(--pasq-size) - 3 * var(--pasq-gap)));
	border-radius: 18px; overflow: hidden; background: var(--pv-white);
	box-shadow: 0 18px 50px rgba(0, 0, 0, .3);
}
.pasq__panel[hidden] { display: none; }

.pasq__head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--pv-black); color: var(--pv-white); }
.pasq__head img { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--pv-red); background: var(--pv-white); object-fit: cover; }
.pasq__head div { display: grid; min-width: 0; flex: 1; }
.pasq__head b { font-size: 18px; font-weight: 800; line-height: 1.1; }
.pasq__head small { font-size: 13px; color: #BDBDBD; }
.pasq__close { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 30px; line-height: 1; cursor: pointer; }
.pasq__close:hover { background: rgba(255, 255, 255, .12); }

.pasq__log { flex: 1; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 10px; padding: 14px; background: #F4F1EA; }
.pasq__msg { max-width: 88%; padding: 10px 13px; border-radius: 16px; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.pasq__msg--bot { align-self: flex-start; background: var(--pv-white); color: var(--pv-black); border-bottom-left-radius: 4px; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.pasq__msg--user { align-self: flex-end; background: var(--pv-red); color: var(--pv-white); border-bottom-right-radius: 4px; font-weight: 700; }
.pasq__msg--wait { color: #777; font-style: italic; }
.pasq__msg a { color: var(--pv-red); font-weight: 700; }
.pasq__msg a.pasq__card { color: var(--pv-black); font-weight: 400; }
.pasq__results { max-width: 100%; width: 100%; }
.pasq__results p { margin: 0 0 8px; }

.pasq__list { display: grid; gap: 8px; }
.pasq__card { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; align-items: center; padding: 6px; border: 1px solid #E6E2D8; border-radius: 12px; color: var(--pv-black); text-decoration: none; }
.pasq__card:hover { border-color: var(--pv-black); }
.pasq__cover { position: relative; display: block; width: 64px; height: 64px; border-radius: 8px; overflow: hidden; background: #EEE; }
.pasq__cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pasq__txt { display: grid; gap: 2px; min-width: 0; }
.pasq__txt b { font-size: 14px; font-weight: 800; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pasq__artist { font-size: 13px; color: #666; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pasq__row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.pasq__row strong { color: var(--pv-red); font-size: 15px; font-weight: 800; }
.pasq__row del { color: #888; font-size: 12px; }
.pasq__offer { padding: 2px 7px; border-radius: 999px; background: var(--pv-red); color: var(--pv-white); font: 800 11px/1.4 var(--pv-font); font-style: normal; text-transform: uppercase; }
.pasq__more { margin-top: 10px; width: 100%; min-height: 42px; border: 2px solid var(--pv-black); border-radius: 999px; background: var(--pv-white); font: 800 14px/1 var(--pv-font); cursor: pointer; }
.pasq__more:hover { background: var(--pv-black); color: var(--pv-white); }
.pasq__all { display: block; margin-top: 10px; font-size: 14px; text-align: center; }

.pasq__form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #E6E2D8; background: var(--pv-white); }
.pasq__form input { flex: 1; min-width: 0; height: 46px; padding: 0 16px; border: 2px solid var(--pv-black); border-radius: 999px; font: 500 16px var(--pv-font); }
.pasq__form input:focus { outline: none; border-color: var(--pv-red); }
.pasq__form button { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--pv-red); color: var(--pv-white); cursor: pointer; }

/* Telefono/tablet: sopra la barra in basso; la chat diventa un pannello largo */
@media (max-width: 900px) {
	.pasq { --pasq-gap: 14px; --pasq-size: 58px; bottom: calc(var(--pv-tabbar-h, 64px) + env(safe-area-inset-bottom, 0px) + 14px); }
	.single-product .pasq { bottom: calc(var(--pv-tabbar-h, 64px) + env(safe-area-inset-bottom, 0px) + 92px); } /* sopra la barra d'acquisto */
	.pasq__panel {
		position: fixed; left: 10px; right: 10px; width: auto;
		bottom: calc(var(--pv-tabbar-h, 64px) + env(safe-area-inset-bottom, 0px) + 10px);
		height: min(620px, calc(100dvh - var(--pv-tabbar-h, 64px) - 40px));
	}
	.pasq.is-open .pasq__bubble { display: none; }
	html.menu-open .pasq, body.no-scroll .pasq { display: none; }
}
@media (prefers-reduced-motion: reduce) { .pasq__bubble { transition: none; } .pasq__hint { animation: none; } }
@media print { .pasq { display: none; } }
