/**
 * Image zoom overlay (lightbox) – fullscreen image on click.
 * Used by listing condominium and room details galleries.
 */

.cnd-image-zoom {
	position: fixed;
	inset: 0;
	z-index: 100002;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	background: rgba(0, 0, 0, 0.9);
	cursor: pointer;
}

.cnd-image-zoom.is-open {
	display: flex;
}

.cnd-image-zoom__close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	z-index: 1;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	font-size: 1.5rem;
	line-height: 1;
	color: rgba(255, 255, 255, 0.85);
	cursor: pointer;
	transition: color 0.2s;
}

.cnd-image-zoom__close:hover,
.cnd-image-zoom__close:focus {
	color: #fff;
	outline: none;
}

.cnd-image-zoom__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 1;
	width: 44px;
	height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(255, 255, 255, 0.42);
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.35);
	color: #fff;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.cnd-image-zoom__nav--prev {
	left: 1rem;
}

.cnd-image-zoom__nav--next {
	right: 1rem;
}

.cnd-image-zoom__nav:hover,
.cnd-image-zoom__nav:focus {
	background: rgba(0, 0, 0, 0.55);
	border-color: rgba(255, 255, 255, 0.7);
	outline: none;
}

.cnd-image-zoom__nav:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.cnd-image-zoom__inner {
	max-width: 90vw;
	max-height: 90vh;
	pointer-events: none;
}

.cnd-image-zoom__img {
	display: block;
	max-width: 100%;
	max-height: 85vh;
	width: auto;
	height: auto;
	object-fit: contain;
	filter: brightness(1.05) contrast(1.03);
	/* image-rendering: pixelated;
	image-rendering: crisp-edges; */
}

/* Clickable image in galleries – show pointer */
.cnd-zoom-image {
	cursor: pointer;
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	padding: 0;
	background: transparent;
	text-align: left;
}

.cnd-zoom-image:focus {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.cnd-zoom-image img,
.cnd-zoom-image picture {
	pointer-events: none;
}

body.has-cnd-image-zoom-open,
html.has-cnd-image-zoom-open {
	overflow: hidden;
}

body.has-cnd-image-zoom-open {
	padding-right: var(--scrollbar-width, 0);
}
