/* Attachment lightbox (pb_lightbox): images open over the page with next / previous. Theme tokens from pb-base.css. */
.pb-lb {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	flex-direction: column;
	background: rgba(15, 20, 17, .92);
	color: #fff;
	font-family: var(--body-font, "Vazirmatn", Tahoma, sans-serif);
	opacity: 0;
	transition: opacity 180ms var(--ease-out, ease-out);
}
.pb-lb[hidden] { display: none; }
.pb-lb.is-open { opacity: 1; }

.pb-lb-bar {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 12px;
	min-height: 56px;
}
.pb-lb-count {
	font-size: 14px;
	font-variant-numeric: tabular-nums;
	opacity: .85;
}
.pb-lb-name {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 14px;
	opacity: .85;
}

.pb-lb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: var(--radius, 10px);
	background: rgba(255, 255, 255, .1);
	color: #fff;
	cursor: pointer;
	text-decoration: none;
	transition: background-color 150ms ease, transform 120ms var(--ease-out, ease-out);
}
.pb-lb-btn:hover { background: rgba(255, 255, 255, .2); }
.pb-lb-btn:active { transform: scale(.96); }
.pb-lb-btn:focus-visible { outline: 2px solid var(--focus, #f59e0b); outline-offset: 2px; }
.pb-lb-btn svg { width: 22px; height: 22px; }

.pb-lb-stage {
	position: relative;
	flex: 1;
	min-height: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 64px 16px;
	touch-action: pan-y;
}
.pb-lb-img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	border-radius: 4px;
	user-select: none;
	-webkit-user-drag: none;
	transform: scale(.98);
	transition: transform 200ms var(--ease-out, ease-out), opacity 200ms var(--ease-out, ease-out);
}
.pb-lb.is-open .pb-lb-img { transform: none; }
.pb-lb-img.is-loading { opacity: .35; }

/* RTL page: "next" sits on the left, "previous" on the right */
.pb-lb-prev, .pb-lb-next {
	position: absolute;
	top: 50%;
	margin-top: -22px;
}
.pb-lb-prev { right: 12px; }
.pb-lb-next { left: 12px; }
.pb-lb-single .pb-lb-prev, .pb-lb-single .pb-lb-next, .pb-lb-single .pb-lb-count { display: none; }

.pb-lb-msg {
	position: absolute;
	inset: auto 16px 50%;
	text-align: center;
	font-size: 15px;
}
.pb-lb-msg a { color: #fff; text-decoration: underline; }
.pb-lb-wait { opacity: .85; }

html.pb-lb-lock { overflow: hidden; }

@media (max-width: 600px) {
	.pb-lb-stage { padding: 0 0 72px; }
	.pb-lb-prev, .pb-lb-next { top: auto; bottom: 14px; margin-top: 0; }
	.pb-lb-prev { right: calc(50% + 8px); }
	.pb-lb-next { left: calc(50% + 8px); }
}

@media (prefers-reduced-motion: reduce) {
	.pb-lb, .pb-lb-img, .pb-lb-btn { transition: none; }
	.pb-lb-img { transform: none; }
}
