/**
 * Image lightbox (replaces Simple Lightbox, Dec 2026). Like the plugin's default look:
 * image in a white frame on a dark background (80%), caption and "3 of 9" below the image.
 */
.exl-lb {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	height: 100%;
	max-height: 100%;
	margin: 0;
	padding: 16px 64px;
	border: 0;
	background: transparent;
	display: none;
	align-items: center;
	justify-content: center;
	overscroll-behavior: contain;
}
.exl-lb[open] { display: flex; }
.exl-lb::backdrop { background: rgba(0, 0, 0, .8); }
html.exl-lb-open { overflow: hidden; }

.exl-lb__frame {
	box-sizing: border-box;
	max-width: 100%;
	max-height: 100%;
	margin: 0;
	padding: 10px;
	background: #fff;
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 0;
}
.exl-lb__img {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	/* Room for the frame padding, the dialog padding and the caption bar. */
	max-height: calc(100vh - 32px - 20px);
	max-height: calc(100dvh - 32px - 20px);
	margin: 0 auto;
	object-fit: contain;
}
.exl-lb.has-bar .exl-lb__img {
	max-height: calc(100vh - 32px - 20px - 40px);
	max-height: calc(100dvh - 32px - 20px - 40px);
}
.exl-lb.is-loading .exl-lb__img { opacity: .3; }

.exl-lb__bar {
	display: none;
	gap: 12px;
	justify-content: space-between;
	align-items: baseline;
	padding: 10px 2px 0;
	color: #363940;
	font-size: 14px;
	line-height: 1.4;
}
.exl-lb.has-bar .exl-lb__bar { display: flex; }
.exl-lb__counter { flex: none; color: #6b6e75; white-space: nowrap; }

.exl-lb__btn {
	position: fixed;
	z-index: 1;
	width: 48px;
	height: 48px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, .45);
	color: #fff;
	font-size: 34px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}
.exl-lb__btn:hover,
.exl-lb__btn:focus { background: rgba(0, 0, 0, .75); color: #fff; }
.exl-lb__btn:focus-visible { outline: 3px solid #97ced3; outline-offset: 2px; }
.exl-lb__close { top: 10px; right: 10px; font-size: 30px; }
.exl-lb__prev { left: 8px; top: 50%; transform: translateY(-50%); }
.exl-lb__next { right: 8px; top: 50%; transform: translateY(-50%); }
.exl-lb.is-single .exl-lb__prev,
.exl-lb.is-single .exl-lb__next { display: none; }

@media (max-width: 600px) {
	.exl-lb { padding: 64px 8px; }
	.exl-lb__frame { padding: 6px; }
	.exl-lb__img { max-height: calc(100vh - 128px - 12px); max-height: calc(100dvh - 128px - 12px); }
	.exl-lb.has-bar .exl-lb__img { max-height: calc(100vh - 128px - 12px - 40px); max-height: calc(100dvh - 128px - 12px - 40px); }
	.exl-lb__prev,
	.exl-lb__next { top: auto; bottom: 8px; transform: none; }
}

@media (prefers-reduced-motion: no-preference) {
	.exl-lb__img { transition: opacity .2s; }
}
