/* LRGallery — thumbnail grid */
.lrgallery-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 0 0 1.5em;
}

.lrgallery-thumb {
	display: block;
	width: 100px;
	height: 100px;
	padding: 0;
	border: none;
	background: #000;
	cursor: pointer;
	overflow: hidden;
	flex-shrink: 0;
}

.lrgallery-thumb img {
	display: block;
	width: 100px;
	height: 100px;
	object-fit: cover;
	transition: opacity 0.15s;
}

.lrgallery-thumb:hover img,
.lrgallery-thumb:focus img {
	opacity: 0.75;
}

.lrgallery-thumb:focus {
	outline: 2px solid #fff;
	outline-offset: -2px;
}

/* Lightbox overlay */
#lrg-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.92);
	z-index: 99999;
	align-items: center;
	justify-content: center;
}

#lrg-overlay.lrg-active {
	display: flex;
}

body.lrg-open {
	overflow: hidden;
}

#lrg-inner {
	position: relative;
	max-width: 92vw;
	max-height: 88vh;
	display: flex;
	flex-direction: column;
	align-items: center;
}

#lrg-img {
	display: block;
	max-width: 90vw;
	max-height: 82vh;
	object-fit: contain;
	border: none;
}

#lrg-img.lrg-loading {
	opacity: 0.3;
}

#lrg-caption {
	color: #ccc;
	font-size: 0.85em;
	margin: 6px 0 0;
	text-align: center;
}

/* Close button */
#lrg-close {
	position: fixed;
	top: 16px;
	right: 20px;
	background: none;
	border: none;
	color: #fff;
	font-size: 2.5em;
	line-height: 1;
	cursor: pointer;
	opacity: 0.8;
	z-index: 2;
	padding: 0 6px;
}

#lrg-close:hover { opacity: 1; }

/* Prev / Next arrows */
#lrg-prev,
#lrg-next {
	position: fixed;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(0,0,0,0.4);
	border: none;
	color: #fff;
	font-size: 3em;
	line-height: 1;
	cursor: pointer;
	padding: 10px 16px;
	z-index: 2;
	opacity: 0.75;
}

#lrg-prev { left: 10px; }
#lrg-next { right: 10px; }
#lrg-prev:hover, #lrg-next:hover { opacity: 1; background: rgba(0,0,0,0.7); }

/* Counter */
#lrg-counter {
	position: fixed;
	bottom: 16px;
	left: 50%;
	transform: translateX(-50%);
	color: #aaa;
	font-size: 0.85em;
}

/* Block editor styles */
.lrgallery-editor { padding: 8px; }

.lrgallery-editor-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-top: 8px;
}

.lrgallery-editor-thumb {
	position: relative;
	width: 80px;
	height: 80px;
}

.lrgallery-editor-thumb img {
	width: 80px;
	height: 80px;
	object-fit: cover;
	display: block;
}

.lrgallery-remove-btn {
	position: absolute;
	top: 2px;
	right: 2px;
	background: rgba(0,0,0,0.6);
	color: #fff;
	border: none;
	border-radius: 50%;
	width: 18px;
	height: 18px;
	font-size: 13px;
	line-height: 16px;
	text-align: center;
	cursor: pointer;
	padding: 0;
}

.lrgallery-add-btn { margin-bottom: 4px; }

.lrgallery-placeholder {
	color: #888;
	font-style: italic;
}
