/*
 * The viewer's layout rules only: a fixed full-screen layer, centred content, buttons in the corners
 * and (on a phone) along the bottom edge. Colours, type and finish belong to the site style (.kp-lb*).
 * Flat on purpose: square, no effects.
 */
.kp-zoomable { cursor: zoom-in; }

html.kp-lb-open { overflow: hidden; }
html.kp-lb-open body { padding-right: var(--kp-lb-sbw, 0); }

.kp-lb {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--kp-lb-bg, rgba(234, 245, 255, 0.97));
	color: var(--kp-lb-ink, #1f2d3d);
}
.kp-lb [hidden] { display: none !important; }
.kp-lb[hidden] { display: none; }

.kp-lb__stage {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 64px 72px;
	box-sizing: border-box;
}
.kp-lb__img,
.kp-lb__video {
	display: block;
	max-width: min(92vw, 1100px);
	max-height: 82vh;
	max-height: 82dvh;
	user-select: none;
	-webkit-user-select: none;
}
.kp-lb__video { background: #000; }

.kp-lb__lock {
	max-width: 340px;
	padding: 24px;
	text-align: center;
	background: var(--kp-lb-card, #fff);
	border: 1px solid currentColor;
}
.kp-lb__lock-title { display: block; margin-bottom: 4px; font-size: 17px; }
.kp-lb__lock-text { margin: 0 0 14px; font-size: 14px; }

.kp-lb__btn {
	position: absolute;
	width: 46px;
	height: 46px;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font: inherit;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	color: inherit;
	background: var(--kp-lb-card, #fff);
	border: 1px solid currentColor;
}
.kp-lb__close { top: 16px; right: 16px; }
.kp-lb__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.kp-lb__next { right: 16px; top: 50%; transform: translateY(-50%); }

.kp-lb__count {
	position: absolute;
	bottom: 18px;
	left: 50%;
	transform: translateX(-50%);
	padding: 5px 14px;
	font-size: 14px;
	background: var(--kp-lb-card, #fff);
	border: 1px solid currentColor;
}

@media (max-width: 760px) {
	.kp-lb__stage { padding: 64px 12px 84px; }
	.kp-lb__img,
	.kp-lb__video { max-width: 100%; max-height: calc(100vh - 160px); max-height: calc(100dvh - 160px); }
	.kp-lb__prev,
	.kp-lb__next { top: auto; bottom: 12px; transform: none; }
	.kp-lb__prev { left: 12px; }
	.kp-lb__next { right: 12px; }
	.kp-lb__count { bottom: 20px; }
}
