/* VD5 Popup Immagine – overlay a tutto schermo, immagine centrata entro il limite % dello schermo
   Desktop: --vd5p-d | Tablet (<=1024px): --vd5p-t | Cellulare (<=767px): --vd5p-m | Sfondo: --vd5p-dark (0-1) */
#vd5p-popup.vd5p-overlay {
	--vd5p-size: var(--vd5p-d, 50);
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, var(--vd5p-dark, 0.6));
	opacity: 0;
	transition: opacity 0.3s ease;
}
@media (max-width: 1024px) {
	#vd5p-popup.vd5p-overlay { --vd5p-size: var(--vd5p-t, 65); }
}
@media (max-width: 767px) {
	#vd5p-popup.vd5p-overlay { --vd5p-size: var(--vd5p-m, 80); }
}
#vd5p-popup.vd5p-overlay[hidden] {
	display: none;
}
#vd5p-popup.vd5p-open {
	opacity: 1;
}
#vd5p-popup .vd5p-box {
	position: relative;
	line-height: 0;
	transform: scale(0.96);
	transition: transform 0.3s ease;
}
#vd5p-popup.vd5p-open .vd5p-box {
	transform: scale(1);
}
#vd5p-popup .vd5p-link {
	display: block;
	line-height: 0;
	cursor: pointer;
}
#vd5p-popup .vd5p-link.vd5p-nolink {
	cursor: default;
}
#vd5p-popup .vd5p-img {
	display: block;
	width: auto;
	height: auto;
	max-width: calc(var(--vd5p-size, 50) * 1vw);
	max-height: calc(var(--vd5p-size, 50) * 1vh);
	max-height: calc(var(--vd5p-size, 50) * 1dvh);
	margin: 0;
	border: 0;
	border-radius: 4px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}
#vd5p-popup .vd5p-close {
	position: absolute;
	top: -14px;
	right: -14px;
	z-index: 2;
	width: 34px;
	height: 34px;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: #222;
	font-size: 24px;
	font-family: Arial, sans-serif;
	line-height: 34px;
	text-align: center;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
#vd5p-popup .vd5p-close:hover,
#vd5p-popup .vd5p-close:focus-visible {
	background: #222;
	color: #fff;
	outline: none;
}
@media (prefers-reduced-motion: reduce) {
	#vd5p-popup.vd5p-overlay,
	#vd5p-popup .vd5p-box {
		transition: none;
	}
}
