/* DZ Share: barra fissa (computer), pulsante tondo (telefono), pannello, pulsanti sulle foto */
:root {
	--dzs-accent: #2c3431;
	--dzs-bg: #fff;
	--dzs-fg: #2c3431;
	--dzs-muted: #66706b;
	--dzs-line: #dfe3e0;
	--dzs-whatsapp: #1c9e50;
	--dzs-facebook: #1877f2;
	--dzs-instagram: linear-gradient(45deg, #f09433, #dc2743 50%, #bc1888);
	--dzs-telegram: #229ed9;
	--dzs-pinterest: #e60023;
	--dzs-email: #66706b;
	--dzs-z: 900;
}
.dzs-start, .dzs-end { display: block; height: 0; overflow: hidden; }
.dzs-panel[hidden], .dzs-panel [hidden], .dzs-veil[hidden], .dzs-toast[hidden] { display: none !important; }

.dzs-b {
	display: inline-grid; place-items: center; width: 42px; height: 42px; padding: 0; margin: 0;
	border-radius: 50%; border: 1.5px solid var(--dzs-line); background: var(--dzs-bg); color: var(--dzs-muted);
	cursor: pointer; font: inherit; line-height: 1; box-shadow: 0 2px 6px rgba(0, 0, 0, .08);
	transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.dzs-b svg { width: 20px; height: 20px; display: block; }
.dzs-b:hover, .dzs-b:focus-visible { color: #fff; border-color: transparent; transform: translateY(-1px); }
.dzs-b:focus-visible { outline: 2px solid var(--dzs-accent); outline-offset: 2px; }
.dzs-whatsapp:hover, .dzs-whatsapp:focus-visible { background: var(--dzs-whatsapp); }
.dzs-facebook:hover, .dzs-facebook:focus-visible { background: var(--dzs-facebook); }
.dzs-instagram:hover, .dzs-instagram:focus-visible { background: var(--dzs-instagram); }
.dzs-telegram:hover, .dzs-telegram:focus-visible { background: var(--dzs-telegram); }
.dzs-pinterest:hover, .dzs-pinterest:focus-visible { background: var(--dzs-pinterest); }
.dzs-email:hover, .dzs-email:focus-visible { background: var(--dzs-email); }
.dzs-link:hover, .dzs-link:focus-visible, .dzs-more:hover, .dzs-more:focus-visible { background: var(--dzs-accent); }

/* barra fissa a sinistra */
.dzs-rail {
	position: fixed; left: 18px; top: 50%; z-index: var(--dzs-z);
	display: flex; flex-direction: column; align-items: center; gap: 9px;
	opacity: 0; visibility: hidden; transform: translate(-14px, -50%);
	transition: opacity .25s, transform .25s, visibility .25s;
}
.dzs-rail.is-on { opacity: 1; visibility: visible; transform: translate(0, -50%); }
.dzs-rail-ic { color: var(--dzs-muted); height: 22px; display: grid; place-items: center; }
.dzs-rail-ic svg { width: 16px; height: 16px; }
.dzs-rail .dzs-b { position: relative; transition: background .35s, color .35s, border-color .35s, transform .35s; }
/* evidenza a turno (ogni «pulse» secondi): stesso aspetto del passaggio del mouse */
.dzs-rail .dzs-b.is-pulse { color: #fff; border-color: transparent; transform: scale(1.1); }
.dzs-rail .dzs-whatsapp.is-pulse { background: var(--dzs-whatsapp); }
.dzs-rail .dzs-facebook.is-pulse { background: var(--dzs-facebook); }
.dzs-rail .dzs-instagram.is-pulse { background: var(--dzs-instagram); }
.dzs-rail .dzs-telegram.is-pulse { background: var(--dzs-telegram); }
.dzs-rail .dzs-pinterest.is-pulse { background: var(--dzs-pinterest); }
.dzs-rail .dzs-email.is-pulse { background: var(--dzs-email); }
.dzs-rail .dzs-link.is-pulse { background: var(--dzs-accent); }
.dzs-rail .dzs-b::after {
	content: attr(data-label); position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%);
	background: var(--dzs-fg); color: #fff; font-size: 13px; font-weight: 600; padding: 4px 9px; border-radius: 6px;
	white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .12s;
}
.dzs-rail .dzs-b:hover::after, .dzs-rail .dzs-b:focus-visible::after { opacity: 1; }

/* barra sul telefono (rail_mobile): più piccola e vicina al bordo, senza etichette */
@media (hover: none), (max-width: 700px) {
	.dzs-rail { left: 8px; gap: 7px; }
	.dzs-rail .dzs-b { width: 38px; height: 38px; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }
	.dzs-rail .dzs-b svg { width: 18px; height: 18px; }
	.dzs-rail .dzs-b::after { display: none; }
	.dzs-rail-ic { display: none; }
}

/* pulsante tondo (telefono) */
.dzs-fab {
	position: fixed; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: var(--dzs-z);
	width: 52px; height: 52px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
	display: grid; place-items: center; background: var(--dzs-accent); color: #fff;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
	opacity: 0; visibility: hidden; transform: translateY(14px) scale(.9);
	transition: opacity .25s, transform .25s, visibility .25s;
}
.dzs-fab.is-on { opacity: 1; visibility: visible; transform: none; }
.dzs-fab svg { width: 22px; height: 22px; }
.dzs-fab:focus-visible { outline: 3px solid var(--dzs-accent); outline-offset: 3px; }

/* pannello: popover vicino al pulsante su computer, dal basso sul telefono; sopra tutto (anche chat e banner dei cookie) */
.dzs-panel {
	position: fixed; z-index: 2147483646; background: var(--dzs-bg); color: var(--dzs-fg);
	border: 1px solid var(--dzs-line); border-radius: 14px; box-shadow: 0 14px 40px rgba(0, 0, 0, .22);
	padding: 12px 14px 16px; width: 300px; max-width: calc(100vw - 24px); font-size: 14px; line-height: 1.3;
}
.dzs-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.dzs-panel-head strong { font-size: 15px; }
.dzs-x { border: 0; background: none; color: var(--dzs-muted); cursor: pointer; padding: 4px; display: grid; place-items: center; border-radius: 6px; }
.dzs-x svg { width: 18px; height: 18px; }
.dzs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 4px; }
.dzs-cell { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 12px; color: var(--dzs-muted); text-align: center; }
.dzs-panel .dzs-b { width: 46px; height: 46px; color: #fff; border: 0; box-shadow: none; }
.dzs-panel .dzs-whatsapp { background: var(--dzs-whatsapp); }
.dzs-panel .dzs-facebook { background: var(--dzs-facebook); }
.dzs-panel .dzs-instagram { background: var(--dzs-instagram); }
.dzs-panel .dzs-telegram { background: var(--dzs-telegram); }
.dzs-panel .dzs-pinterest { background: var(--dzs-pinterest); }
.dzs-panel .dzs-email { background: var(--dzs-email); }
.dzs-panel .dzs-link, .dzs-panel .dzs-more { background: var(--dzs-accent); }
.dzs-panel.is-sheet {
	left: 0; right: 0; bottom: 0; top: auto; width: auto; max-width: none; border-radius: 18px 18px 0 0;
	padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); border-width: 1px 0 0;
}
.dzs-panel.is-sheet::before { content: ""; display: block; width: 38px; height: 4px; border-radius: 2px; background: var(--dzs-line); margin: -2px auto 8px; }
.dzs-veil { position: fixed; inset: 0; z-index: 2147483645; background: rgba(0, 0, 0, .35); }

.dzs-toast {
	position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
	z-index: 2147483647; background: var(--dzs-fg); color: #fff; padding: 9px 16px; border-radius: 8px;
	font-size: 14px; line-height: 1.35; max-width: calc(100vw - 32px); text-align: center; box-shadow: 0 6px 18px rgba(0, 0, 0, .2);
}

/* pulsanti sulle foto */
.dzs-ph { position: relative; display: inline-block; max-width: 100%; vertical-align: top; line-height: 0; }
.dzs-ph.is-block { display: block; width: fit-content; }
.dzs-ph-btns { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 8px; line-height: 1; opacity: 0; transition: opacity .2s; }
.dzs-ph:hover .dzs-ph-btns, .dzs-ph:focus-within .dzs-ph-btns { opacity: 1; }
.dzs-ph-btns .dzs-b { width: 38px; height: 38px; border: 0; background: rgba(255, 255, 255, .92); color: #1c2320; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.dzs-ph-btns .dzs-b svg { width: 18px; height: 18px; }
.dzs-ph-btns .dzs-pinterest { background: var(--dzs-pinterest); color: #fff; }
.dzs-ph-btns .dzs-b:hover { transform: scale(1.06); }
.dzs-ph-btns .dzs-share:hover { background: #fff; color: #1c2320; }
@media (hover: none) {
	.dzs-ph-btns { opacity: 1; right: 8px; bottom: 8px; gap: 6px; }
	.dzs-ph-btns .dzs-b { width: 34px; height: 34px; }
}
.dzs-hl { animation: dzs-hl 2.4s ease-out; }
@keyframes dzs-hl { 0%, 40% { box-shadow: 0 0 0 4px var(--dzs-accent); } 100% { box-shadow: 0 0 0 4px transparent; } }

/* shortcode [dz_share] */
.dzs-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 1.5em 0; }
.dzs-inline-l { font-size: .9em; color: var(--dzs-muted); margin-right: 4px; }

@media (prefers-reduced-motion: reduce) {
	.dzs-rail, .dzs-fab, .dzs-b, .dzs-ph-btns { transition: none; }
	.dzs-hl { animation: none; outline: 4px solid var(--dzs-accent); }
}
@media print { .dzs-rail, .dzs-fab, .dzs-ph-btns, .dzs-panel { display: none !important; } }
