.gallery-lightbox-hidden {
	display: none;
}

.gallery-lightbox {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	align-items: stretch;
	justify-content: center;
	background: rgba(0, 0, 0, 0.94);
	color: #fff;
}

.gallery-lightbox-backdrop {
	position: absolute;
	inset: 0;
	background: transparent;
}

.gallery-lightbox-panel {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-rows: auto 1fr auto;
	width: min(96vw, 1600px);
	height: min(96vh, 1100px);
	margin: auto;
	padding: 0.75rem;
	box-sizing: border-box;
}

.gallery-lightbox-topbar,
.gallery-lightbox-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
}

.gallery-lightbox-topbar {
	padding-bottom: 0.5rem;
}

.gallery-lightbox-title {
	font-size: 1rem;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.gallery-lightbox-counter {
	font-size: 0.9rem;
	opacity: 0.8;
	white-space: nowrap;
}

.gallery-lightbox-close,
.gallery-lightbox-prev,
.gallery-lightbox-next,
.gallery-lightbox-zoom-btn {
	border: 0;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	border-radius: 999px;
	padding: 0.5rem 0.85rem;
	font-size: 1rem;
	line-height: 1;
	cursor: pointer;
}

.gallery-lightbox-close:hover,
.gallery-lightbox-prev:hover,
.gallery-lightbox-next:hover,
.gallery-lightbox-zoom-btn:hover {
	background: rgba(255, 255, 255, 0.22);
}

.gallery-lightbox-stage {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	min-height: 0;
	cursor: crosshair;
	touch-action: none;
}

.gallery-lightbox-image {
	position: absolute;
	top: 50%;
	left: 50%;
	max-width: none;
	max-height: none;
	transform-origin: center center;
	will-change: transform;
	user-select: none;
	-webkit-user-drag: none;
	cursor: pointer;
}

.gallery-lightbox-caption {
	padding-top: 0.5rem;
	text-align: center;
	font-size: 0.95rem;
	opacity: 0.9;
	min-height: 1.5rem;
}

.gallery-lightbox-controls {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
	justify-content: center;
	padding-top: 0.5rem;
}

.gallery-lightbox-zoom-chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.35rem 0.7rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	font-size: 0.9rem;
	line-height: 1;
	white-space: nowrap;
}

.gallery-lightbox-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
}

.gallery-lightbox-prev {
	left: 0.25rem;
}

.gallery-lightbox-next {
	right: 0.25rem;
}

.gallery-lightbox-prev,
.gallery-lightbox-next {
	font-size: 1.4rem;
	width: 2.4rem;
	height: 2.4rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

@media (max-width: 720px) {
	.gallery-lightbox-panel {
		width: 100vw;
		height: 100vh;
		padding: 0.5rem;
	}

	.gallery-lightbox-title,
	.gallery-lightbox-counter,
	.gallery-lightbox-caption {
		font-size: 0.85rem;
	}

}
