/* =========================================================
   VEIC 2027 Image Popup
   ========================================================= */

.endo-veic-popup-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(10, 20, 35, 0.6);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	opacity: 0;
	transition: opacity 0.35s ease;
	padding: 20px;
}

.endo-veic-popup-overlay.is-visible {
	display: flex;
	opacity: 1;
}

.endo-veic-popup-card {
	position: relative;
	width: 100%;
	max-width: 560px;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 30px 80px -20px rgba(10, 40, 90, 0.5);
	transform: translateY(20px) scale(0.97);
	opacity: 0;
	transition: transform 0.4s cubic-bezier(.2,.9,.25,1.1), opacity 0.35s ease;
	background: #fff;
}

.endo-veic-popup-overlay.is-visible .endo-veic-popup-card {
	transform: translateY(0) scale(1);
	opacity: 1;
}

.endo-veic-popup-link {
	display: block;
	line-height: 0;
	cursor: pointer;
}

.endo-veic-popup-img {
	display: block;
	width: 100%;
	height: auto;
}

/* ---- Desktop — enlarge popup to 75% of the viewport ---- */
@media (min-width: 1025px) {
	.endo-veic-popup-card {
		max-width: 75vw;
		max-height: 75vh;
	}

	.endo-veic-popup-img {
		width: auto;
		height: auto;
		max-width: 75vw;
		max-height: 75vh;
		object-fit: contain;
	}
}

.endo-veic-popup-close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 32px;
	height: 32px;
	min-width: 32px;
	min-height: 32px;
	padding: 0;
	margin: 0;
	border-radius: 50%;
	border: 1px solid rgba(15, 30, 50, 0.08);
	background: #ffffff;
	color: #33475b;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 0;
	cursor: pointer;
	z-index: 3;
	box-shadow: 0 2px 8px rgba(15, 30, 50, 0.2);
	transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.endo-veic-popup-close svg {
	display: block;
	pointer-events: none;
}

.endo-veic-popup-close:hover,
.endo-veic-popup-close:focus-visible {
	background: #007aff;
	border-color: #007aff;
	color: #ffffff;
	transform: rotate(90deg);
	outline: none;
}

@media (max-width: 600px) {
	.endo-veic-popup-card {
		max-width: 100%;
	}
}
