body.pg-lock {
	overflow: hidden;
}

.pg-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	width: 100%;
	height: 100vh;
	height: 100dvh;
	background: rgba(8, 14, 20, 0.95);
	display: none;
	flex-direction: column;
	overflow: hidden;
	direction: ltr;
	-webkit-tap-highlight-color: transparent;
}

.pg-overlay.pg-open {
	display: flex;
}

.pg-header {
	flex: 0 0 auto;
	min-height: 54px;
	padding: 8px 14px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	color: #fff;
	background: rgba(0, 0, 0, 0.35);
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pg-meta {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
	flex: 1 1 auto;
}

.pg-counter {
	flex: 0 0 auto;
	background: rgba(0, 152, 170, 0.28);
	border: 1px solid rgba(0, 152, 170, 0.55);
	color: #d8f4f8;
	font-size: 13px;
	font-weight: 600;
	padding: 3px 10px;
	border-radius: 999px;
	white-space: nowrap;
}

.pg-title {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	color: #fff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	min-width: 0;
	font-family: 'Montserrat', 'Cairo', sans-serif;
}

.pg-close {
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.22);
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease;
}

.pg-close:hover,
.pg-close:focus-visible {
	background: rgba(255, 255, 255, 0.2);
	outline: none;
}

.pg-stage {
	flex: 1 1 auto;
	min-height: 0;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	padding: 12px 68px;
	overflow: hidden;
}

.pg-peek {
	flex: 0 0 130px;
	height: 64%;
	max-height: 360px;
	position: relative;
	border-radius: 8px;
	overflow: hidden;
	opacity: 0.42;
	cursor: pointer;
	border: 1px solid rgba(255, 255, 255, 0.16);
	background: #000;
	padding: 0;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.pg-peek:hover,
.pg-peek:focus-visible {
	opacity: 0.78;
	transform: scale(1.03);
	outline: none;
}

.pg-peek img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.pg-main {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 0;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
}

.pg-main img,
.pg-main video {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 6px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.65);
	background: #000;
}

.pg-main img {
	background: transparent;
	user-select: none;
	-webkit-user-drag: none;
}

.pg-nav-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.25);
	background: rgba(10, 40, 60, 0.78);
	color: #fff;
	font-size: 22px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease, transform 0.2s ease;
}

.pg-nav-btn:hover,
.pg-nav-btn:focus-visible {
	background: rgba(0, 152, 170, 0.92);
	outline: none;
}

.pg-prev {
	left: 12px;
}

.pg-next {
	right: 12px;
}

.pg-caption {
	flex: 0 0 auto;
	padding: 6px 20px 8px;
	text-align: center;
	color: #e4eff3;
	font-size: 14px;
	line-height: 1.45;
	max-height: 58px;
	overflow-y: auto;
	font-family: 'Montserrat', 'Cairo', sans-serif;
}

.pg-thumbs-bar {
	flex: 0 0 auto;
	padding: 8px 12px calc(12px + env(safe-area-inset-bottom, 0px));
	background: rgba(0, 0, 0, 0.42);
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.pg-thumbs-track {
	display: flex;
	align-items: center;
	gap: 10px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scroll-behavior: smooth;
	scroll-snap-type: x proximity;
	padding: 4px 2px;
	margin: 0 auto;
	width: max-content;
	max-width: 100%;
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

.pg-thumb {
	position: relative;
	flex: 0 0 auto;
	width: 78px;
	height: 54px;
	padding: 0;
	border: 2px solid rgba(255, 255, 255, 0.18);
	border-radius: 6px;
	overflow: hidden;
	background: #141c24;
	opacity: 0.58;
	cursor: pointer;
	scroll-snap-align: center;
	transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.pg-thumb:hover {
	opacity: 0.88;
}

.pg-thumb.pg-active {
	opacity: 1;
	border-color: #0098aa;
	box-shadow: 0 0 0 2px rgba(0, 152, 170, 0.45);
	transform: translateY(-2px);
}

.pg-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.pg-play-badge {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	background: rgba(10, 20, 30, 0.78);
	border: 1px solid rgba(255, 255, 255, 0.7);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

.pg-thumb .pg-play-badge {
	width: 26px;
	height: 26px;
	font-size: 11px;
	padding-left: 2px;
}

.pg-peek .pg-play-badge {
	width: 38px;
	height: 38px;
	font-size: 14px;
	padding-left: 2px;
}

.pg-overlay.pg-single .pg-peek,
.pg-overlay.pg-single .pg-nav-btn,
.pg-overlay.pg-single .pg-thumbs-bar {
	display: none;
}

@media (max-width: 991px) {
	.pg-peek {
		flex: 0 0 84px;
		height: 54%;
	}
	.pg-stage {
		padding: 10px 52px;
		gap: 10px;
	}
}

@media (max-width: 600px) {
	.pg-peek {
		display: none;
	}
	.pg-stage {
		padding: 8px 10px;
	}
	.pg-nav-btn {
		width: 40px;
		height: 40px;
		font-size: 18px;
		background: rgba(10, 40, 60, 0.65);
	}
	.pg-prev {
		left: 8px;
	}
	.pg-next {
		right: 8px;
	}
	.pg-thumb {
		width: 64px;
		height: 48px;
	}
	.pg-thumbs-track {
		gap: 8px;
	}
	.pg-caption {
		font-size: 13px;
		padding: 4px 14px 6px;
	}
	.pg-title {
		font-size: 14px;
	}
}
