/* BACKdigit: ingrandimento delle immagini (0.9.4). */
img.bdt-lb-on { cursor: zoom-in; }
.bdt-lb-fig { position: relative; }
.bdt-lb-fig > .bdt-lb-lens,
.bdt-lb-fig > a > .bdt-lb-lens { position: absolute; top: 10px; right: 10px; z-index: 2; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: rgb(0 0 0 / .55); color: #fff; opacity: 0; transform: scale(.8); transition: opacity .2s ease, transform .2s ease; pointer-events: none; }
.bdt-lb-fig:hover .bdt-lb-lens { opacity: 1; transform: none; }
@media (hover: none) { .bdt-lb-lens { display: none !important; } }

html.bdt-lb-lock, html.bdt-lb-lock body { overflow: hidden !important; }
.bdt-lb { position: fixed; inset: 0; z-index: 2147483000; display: none; color: #fff; font-family: inherit; -webkit-tap-highlight-color: transparent; }
.bdt-lb.is-open { display: block; }
.bdt-lb-back { position: absolute; inset: 0; overflow: hidden; background: rgb(8 8 10 / .94); }
.bdt-lb[data-bg="light"] { color: #111; }
.bdt-lb[data-bg="light"] .bdt-lb-back { background: rgb(248 248 248 / .97); }
.bdt-lb[data-bg="glass"] .bdt-lb-back { background: rgb(10 12 16 / .55); -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2); }
.bdt-lb[data-bg="blur"] .bdt-lb-back { background: #000; }
.bdt-lb-back img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; transform: scale(1.25); filter: blur(40px) brightness(.45) saturate(1.3); opacity: 0; transition: opacity .5s ease; }
.bdt-lb[data-bg="blur"] .bdt-lb-back img.is-on { opacity: 1; }

.bdt-lb-stage { position: absolute; inset: 0; overflow: hidden; touch-action: none; perspective: 1400px; }
.bdt-lb-slide { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 64px 84px var(--bdt-lb-pb, 118px); box-sizing: border-box; backface-visibility: hidden; will-change: transform, opacity; }
.bdt-lb:not(.has-thumbs) .bdt-lb-slide { --bdt-lb-pb: 70px; }
.bdt-lb-zoom { display: flex; align-items: center; justify-content: center; max-width: 100%; max-height: 100%; transform-origin: 0 0; will-change: transform; }
.bdt-lb-img { display: block; max-width: 100%; max-height: calc(100vh - 64px - var(--bdt-lb-pb, 118px)); max-height: calc(100dvh - 64px - var(--bdt-lb-pb, 118px)); width: auto; height: auto; object-fit: contain; border-radius: 4px; box-shadow: 0 20px 60px rgb(0 0 0 / .45); user-select: none; -webkit-user-drag: none; }
.bdt-lb[data-bg="light"] .bdt-lb-img { box-shadow: 0 16px 48px rgb(0 0 0 / .18); }
.bdt-lb.is-zoomed .bdt-lb-stage { cursor: grab; }
.bdt-lb.is-zoomed.is-dragging .bdt-lb-stage { cursor: grabbing; }
.bdt-lb-stage { cursor: zoom-in; }
.bdt-lb-spin { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 3px solid rgb(255 255 255 / .25); border-top-color: #fff; border-radius: 50%; opacity: 0; transition: opacity .2s ease .25s; animation: bdt-lb-spin .8s linear infinite; pointer-events: none; }
.bdt-lb-slide.is-loading .bdt-lb-spin { opacity: 1; }
@keyframes bdt-lb-spin { to { transform: rotate(360deg); } }

/* Barra in alto, frecce, didascalia, miniature. */
.bdt-lb-ui { transition: opacity .25s ease; }
.bdt-lb.is-idle .bdt-lb-ui { opacity: 0; }
.bdt-lb-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: linear-gradient(rgb(0 0 0 / .45), transparent); pointer-events: none; }
.bdt-lb[data-bg="light"] .bdt-lb-top { background: linear-gradient(rgb(255 255 255 / .8), transparent); }
.bdt-lb-count { font-size: 14px; font-weight: 700; letter-spacing: .5px; font-variant-numeric: tabular-nums; opacity: .9; }
.bdt-lb-tools { display: flex; gap: 6px; pointer-events: auto; }
.bdt-lb-btn { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; background: rgb(255 255 255 / .12); color: inherit; cursor: pointer; transition: background .15s ease, transform .15s ease; }
.bdt-lb[data-bg="light"] .bdt-lb-btn { background: rgb(0 0 0 / .07); }
.bdt-lb-btn:hover { background: rgb(255 255 255 / .24); }
.bdt-lb[data-bg="light"] .bdt-lb-btn:hover { background: rgb(0 0 0 / .14); }
.bdt-lb-btn:focus-visible { outline: 2px solid var(--bdt-accent, #fc8f00); outline-offset: 2px; }
.bdt-lb-btn svg { width: 22px; height: 22px; }
.bdt-lb-side { position: absolute; top: 50%; width: 56px; height: 56px; margin-top: -48px; background: rgb(255 255 255 / .1); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.bdt-lb-side svg { width: 28px; height: 28px; }
.bdt-lb-side:hover { transform: scale(1.08); }
.bdt-lb-prev { left: 14px; }
.bdt-lb-next { right: 14px; }
.bdt-lb-side[disabled] { opacity: .25; cursor: default; transform: none; }
.bdt-lb.is-single .bdt-lb-side,
.bdt-lb.is-single .bdt-lb-thumbs { display: none; }
.bdt-lb-cap { position: absolute; left: 50%; bottom: calc(var(--bdt-lb-pb, 118px) - 54px); transform: translateX(-50%); width: min(820px, calc(100% - 32px)); max-height: 3.2em; overflow: hidden; text-align: center; font-size: 15px; line-height: 1.55; text-shadow: 0 1px 3px rgb(0 0 0 / .6); pointer-events: none; }
.bdt-lb[data-bg="light"] .bdt-lb-cap { text-shadow: none; }
.bdt-lb-cap:empty { display: none; }
.bdt-lb-thumbs { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: safe center; gap: 8px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.bdt-lb-thumbs::-webkit-scrollbar { display: none; }
.bdt-lb-thumb { flex: none; width: 64px; height: 44px; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: rgb(255 255 255 / .08); opacity: .55; cursor: pointer; transition: opacity .2s ease, border-color .2s ease, transform .2s ease; }
.bdt-lb-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bdt-lb-thumb:hover { opacity: .9; }
.bdt-lb-thumb.is-cur { opacity: 1; border-color: var(--bdt-accent, #fc8f00); transform: translateY(-2px); }

/* Mobile e touch: niente frecce ai lati (si sfoglia con il dito), foto da bordo a bordo. */
@media (max-width: 689.98px), (hover: none) {
	.bdt-lb-side { display: none; }
	.bdt-lb-thumbs { display: none; }
	.bdt-lb-slide { padding: 56px 0 72px; --bdt-lb-pb: 72px; }
	.bdt-lb .bdt-lb-img { border-radius: 0; }
	.bdt-lb-cap { bottom: 14px; font-size: 14px; }
	.bdt-lb-zoombtn { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.bdt-lb-back img, .bdt-lb-ui { transition: none; }
}
