/*
|--------------------------------------------------------------------------
| Sana Gallery Lightbox
|--------------------------------------------------------------------------
*/

.sg-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 30px;
	box-sizing: border-box;
}

.sg-lightbox-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.85);
	cursor: zoom-out;
}

.sg-lightbox-content {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	max-width: 95vw;
	max-height: 95vh;
}

.sg-lightbox-image {
	display: block;
	max-width: 95vw;
	max-height: 90vh;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 6px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

.sg-lightbox-close {
	position: absolute;
	top: -18px;
	right: -18px;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 2px solid #fff;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.75);
	color: #fff;
	font-size: 28px;
	line-height: 36px;
	text-align: center;
	cursor: pointer;
	z-index: 3;
}

.sg-lightbox-close:hover {
	background: rgba(0, 0, 0, 0.95);
}

/*
|--------------------------------------------------------------------------
| جلوگیری از اسکرول صفحه هنگام باز بودن Lightbox
|--------------------------------------------------------------------------
*/

body.sg-lightbox-open {
	overflow: hidden;
}

/*
|--------------------------------------------------------------------------
| Mobile
|--------------------------------------------------------------------------
*/

@media (max-width: 768px) {

	.sg-lightbox {
		padding: 15px;
	}

	.sg-lightbox-image {
		max-width: 92vw;
		max-height: 82vh;
	}

	.sg-lightbox-close {
		top: -12px;
		right: -12px;
		width: 38px;
		height: 38px;
		font-size: 24px;
		line-height: 32px;
	}
}