/**
 * Image Lightbox Styles
 */

.dedomind-lightbox {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 9999;
}

.dedomind-lightbox.active {
	display: block;
}

/* Overlay */
.lightbox-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.9);
	cursor: pointer;
}

/* Content Container */
.lightbox-content {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	padding: 0;
	box-sizing: border-box;
}

/* Image */
.lightbox-image {
	max-width: 90vw;
	max-height: 90vh;
	width: auto;
	height: auto;
	object-fit: contain;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
	animation: lightbox-zoom-in 0.3s ease-out;
}

@keyframes lightbox-zoom-in {
	from {
		opacity: 0;
		transform: scale(0.8);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

/* Caption */
.lightbox-caption {
	position: fixed;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	max-width: 90%;
	padding: 10px 20px;
	background-color: rgba(0, 0, 0, 0.7);
	color: #fff;
	font-size: 14px;
	line-height: 1.5;
	text-align: center;
	border-radius: 4px;
	z-index: 10001;
}

/* Close Button */
.lightbox-close {
	position: fixed;
	top: 20px;
	right: 20px;
	width: 40px;
	height: 40px;
	background-color: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(4px);
	border: none;
	border-radius: 50%;
	color: #fff;
	cursor: pointer;
	transition: background-color 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10001;
	padding: 0;
}

.lightbox-close img {
	width: 20px;
	height: 20px;
	filter: brightness(0) invert(1);
	opacity: 1;
}

.lightbox-close:hover,
.lightbox-close:focus {
	background-color: rgba(0, 0, 0, 0.8);
	outline: none;
}

/* Navigation Buttons */
.lightbox-prev,
.lightbox-next {
	position: fixed;
	top: 50%;
	transform: translateY(-50%);
	width: 50px;
	height: 50px;
	background-color: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(4px);
	border: none;
	border-radius: 50%;
	cursor: pointer;
	transition: background-color 0.3s ease;
	display: flex !important;
	align-items: center;
	justify-content: center;
	z-index: 10001;
	padding: 0;
	margin: 0;
}

.lightbox-prev img,
.lightbox-next img {
	width: 24px;
	height: 24px;
	filter: brightness(0) invert(1);
	opacity: 1;
}

.lightbox-prev {
	left: 20px;
}

.lightbox-next {
	right: 20px;
}

.lightbox-prev:hover,
.lightbox-prev:focus,
.lightbox-next:hover,
.lightbox-next:focus {
	background-color: rgba(0, 0, 0, 0.8);
	outline: none;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
	.lightbox-image {
		max-width: 95%;
		max-height: 80vh;
	}

	.lightbox-close {
		top: 10px;
		right: 10px;
		width: 35px;
		height: 35px;
	}
	
	.lightbox-close img {
		width: 18px;
		height: 18px;
	}

	.lightbox-prev,
	.lightbox-next {
		width: 45px;
		height: 45px;
		top: 50%;
		transform: translateY(-50%);
	}
	
	.lightbox-prev img,
	.lightbox-next img {
		width: 20px;
		height: 20px;
	}

	.lightbox-prev {
		left: 10px;
	}

	.lightbox-next {
		right: 10px;
	}

	.lightbox-caption {
		font-size: 12px;
		padding: 8px 15px;
		bottom: 10px;
	}
}

@media screen and (max-width: 480px) {
	.lightbox-image {
		max-width: 95vw;
		max-height: 85vh;
	}

	.lightbox-prev,
	.lightbox-next {
		width: 40px;
		height: 40px;
	}
	
	.lightbox-prev img,
	.lightbox-next img {
		width: 18px;
		height: 18px;
	}
	
	.lightbox-prev {
		left: 5px;
	}

	.lightbox-next {
		right: 5px;
	}
}

/* Prevent body scroll when lightbox is open */
body.lightbox-open {
	overflow: hidden;
}

/* Loading state */
.lightbox-image[src=""] {
	opacity: 0;
}
