body.kh-lightbox-open {
	overflow: hidden;
}

.kh-lightbox {
	position: fixed;
	inset: 0;
	z-index: 4000;
	display: none;
}

.kh-lightbox.is-open {
	display: block;
}

.kh-lightbox-backdrop {
	position: absolute;
	inset: 0;
	background: radial-gradient(circle at 20% 20%, rgba(34, 70, 112, 0.35), rgba(7, 11, 18, 0.92) 60%);
	backdrop-filter: blur(6px);
}

.kh-lightbox-dialog {
	position: relative;
	margin: 3vh auto;
	width: min(96vw, 1360px);
	height: min(94vh, 920px);
	border-radius: 16px;
	border: 1px solid rgba(255, 255, 255, 0.15);
	background: linear-gradient(180deg, rgba(15, 21, 33, 0.95), rgba(10, 15, 24, 0.95));
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
	display: grid;
	grid-template-rows: auto 1fr auto;
	overflow: hidden;
	transform: translateY(10px) scale(0.985);
	opacity: 0;
	transition: transform 0.22s ease, opacity 0.22s ease;
}

.kh-lightbox.is-open .kh-lightbox-dialog {
	transform: translateY(0) scale(1);
	opacity: 1;
}

.kh-lightbox-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 12px 14px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	background: rgba(255, 255, 255, 0.02);
}

.kh-lightbox-meta {
	min-width: 0;
}

.kh-lightbox-title {
	color: #f4f7fb;
	font-size: 14px;
	font-weight: 700;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.kh-lightbox-counter {
	color: #a7b3c5;
	font-size: 12px;
}

.kh-lightbox-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.kh-lightbox-action,
.kh-lightbox-close {
	height: 34px;
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0.18);
	background: rgba(26, 36, 53, 0.86);
	color: #f3f6fb;
	font-size: 13px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	padding: 0 12px;
	transition: background 0.18s ease, border-color 0.18s ease;
}

.kh-lightbox-close {
	width: 34px;
	padding: 0;
	font-size: 24px;
	line-height: 1;
}

.kh-lightbox-action:hover,
.kh-lightbox-close:hover {
	background: rgba(38, 52, 75, 1);
	border-color: rgba(255, 255, 255, 0.35);
	color: #fff;
}

.kh-lightbox-body {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 0;
	padding: 16px;
}

.kh-lightbox-image {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	border-radius: 10px;
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
	background: #0f141f;
}

.kh-lightbox-caption {
	min-height: 42px;
	padding: 10px 14px;
	color: #d2d9e6;
	font-size: 13px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	background: rgba(255, 255, 255, 0.015);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.kh-lightbox-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.25);
	background: rgba(15, 24, 38, 0.8);
	color: #fff;
	font-size: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.kh-lightbox-prev {
	left: 18px;
}

.kh-lightbox-next {
	right: 18px;
}

.kh-lightbox-nav:hover {
	background: rgba(32, 47, 68, 0.95);
}

.kh-lightbox.is-loading .kh-lightbox-image {
	opacity: 0.5;
	filter: saturate(0.8);
}

@media (max-width: 900px) {
	.kh-lightbox-dialog {
		width: 100vw;
		height: 100vh;
		margin: 0;
		border-radius: 0;
		border: 0;
	}

	.kh-lightbox-body {
		padding: 10px;
	}

	.kh-lightbox-nav {
		top: auto;
		bottom: 12px;
		transform: none;
	}

	.kh-lightbox-prev {
		left: calc(50% - 54px);
	}

	.kh-lightbox-next {
		right: calc(50% - 54px);
	}
}
