/* Pulsante WhatsApp e finestra */
.sm-wa { position: fixed; right: 1rem; bottom: 1rem; z-index: 900; font-family: inherit; }
.sm-wa-pulsante {
	display: inline-flex; align-items: center; gap: 0.55rem; min-height: 3.5rem; padding: 0 1.2rem 0 1rem;
	border-radius: 999px; background: #1f7a4d; color: #fff; text-decoration: none; font-weight: 700;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .22); transition: background-color .15s, transform .15s;
}
.sm-wa-pulsante:hover { background: #17633e; color: #fff; transform: translateY(-1px); }
.sm-wa-pulsante:focus-visible, .sm-wa :focus-visible { outline: 3px solid var(--fuoco, #f2a900); outline-offset: 2px; }
.sm-wa.is-aperta .sm-wa-pulsante { display: none; }
@media (max-width: 40rem) {
	.sm-wa-pulsante { width: 3.5rem; padding: 0; justify-content: center; }
	.sm-wa-etichetta { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

.sm-wa-finestra {
	width: min(22.5rem, calc(100vw - 2rem)); max-height: min(36rem, calc(100vh - 2rem));
	display: flex; flex-direction: column; overflow: hidden;
	background: #fff; color: #1d2b25; border-radius: 18px; box-shadow: 0 16px 48px rgba(0, 0, 0, .28);
	font-size: 0.95rem; line-height: 1.45;
}
.sm-wa-finestra[hidden] { display: none; }
.sm-wa-testata { display: flex; align-items: center; gap: 0.75rem; padding: 0.9rem 0.8rem 0.9rem 1rem; background: #0b5a3c; color: #fff; }
.sm-wa-avatar { width: 3rem; height: 3rem; border-radius: 50%; overflow: hidden; flex: none; background: #fff; color: #0b5a3c; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; position: relative; }
.sm-wa-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sm-wa-avatar::after { content: ""; position: absolute; right: 1px; bottom: 1px; width: 0.7rem; height: 0.7rem; border-radius: 50%; background: #3ddc84; border: 2px solid #0b5a3c; }
.sm-wa-chi { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sm-wa-chi strong { font-size: 1rem; line-height: 1.25; }
.sm-wa-chi span { font-size: 0.82rem; opacity: .9; }
.sm-wa-chiudi { width: 2.75rem; height: 2.75rem; flex: none; border: 0; border-radius: 50%; background: transparent; color: #fff; font-size: 1.7rem; line-height: 1; cursor: pointer; }
.sm-wa-chiudi:hover { background: rgba(255, 255, 255, .15); }

.sm-wa-corpo { overflow-y: auto; padding: 1rem; background: #efeae2; display: flex; flex-direction: column; gap: 0.9rem; flex: 1; }
.sm-wa-conversazione { display: flex; flex-direction: column; gap: 0.5rem; }
.sm-wa-bolla { margin: 0; max-width: 90%; align-self: flex-start; background: #fff; color: #1d2b25; padding: 0.6rem 0.8rem; border-radius: 4px 14px 14px 14px; box-shadow: 0 1px 1px rgba(0, 0, 0, .08); }
.sm-wa-bolla-tu { align-self: flex-end; background: #d9fdd3; border-radius: 14px 4px 14px 14px; }
.sm-wa-titoletto { margin: 0 0 0.4rem; font-size: 0.82rem; font-weight: 700; color: #3b4a43; }
.sm-wa-titoletto span { font-weight: 400; }
.sm-wa-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.sm-wa-chip {
	font: inherit; font-size: 0.88rem; text-align: left; min-height: 2.5rem; padding: 0.45rem 0.8rem; border-radius: 999px; cursor: pointer;
	border: 1px solid #0b5a3c; background: #fff; color: #0b5a3c;
}
.sm-wa-chip:hover { background: #e7f5ee; }
.sm-wa-chip[disabled] { opacity: .55; cursor: default; }
.sm-wa-argomento[aria-pressed="true"] { background: #0b5a3c; color: #fff; }

.sm-wa-piede { padding: 0.8rem 1rem 0.9rem; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; background: #fff; border-top: 1px solid #e3e3e3; }
.sm-wa-vai {
	width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 2.9rem;
	border-radius: 999px; background: #1f7a4d; color: #fff; font-weight: 700; text-decoration: none;
}
.sm-wa-vai:hover { background: #17633e; color: #fff; }
.sm-wa-altro { font-size: 0.85rem; color: #0b5a3c; text-align: center; padding: 0.3rem 0; }
@media print { .sm-wa { display: none !important; } }
