/* EP Gallery — Frontend Styles */

/* Gallery title */
.ep-gallery-title {
	margin: 0 0 16px;
	font-size: 1.4em;
	font-weight: 600;
	line-height: 1.3;
}

/* Grid */
.ep-gallery {
	display: grid;
	margin: 24px 0;
}

/* Gap modifiers — default is --gap-8 */
.ep-gallery--gap-0  { gap: 0; }
.ep-gallery--gap-4  { gap: 4px; }
.ep-gallery--gap-8  { gap: 8px; }
.ep-gallery--gap-16 { gap: 16px; }
.ep-gallery--gap-24 { gap: 24px; }

.ep-gallery--cols-2 { grid-template-columns: repeat(2, 1fr); }
.ep-gallery--cols-3 { grid-template-columns: repeat(2, 1fr); }
.ep-gallery--cols-4 { grid-template-columns: repeat(2, 1fr); }
.ep-gallery--cols-5 { grid-template-columns: repeat(2, 1fr); }

@media (min-width: 640px) {
	.ep-gallery--cols-3 { grid-template-columns: repeat(3, 1fr); }
	.ep-gallery--cols-4 { grid-template-columns: repeat(3, 1fr); }
	.ep-gallery--cols-5 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 960px) {
	.ep-gallery--cols-4 { grid-template-columns: repeat(4, 1fr); }
	.ep-gallery--cols-5 { grid-template-columns: repeat(5, 1fr); }
}

.ep-gallery-item {
	margin: 0;
	overflow: hidden;
	border-radius: 4px;
}
.ep-gallery-link {
	display: block;
	line-height: 0;
}
.ep-gallery-link img {
	width: 100%;
	height: auto;
	display: block;
	margin: 0;
	transition: transform 0.2s ease;
}
.ep-gallery-link:hover img {
	transform: scale(1.03);
}
.ep-gallery-caption {
	font-size: 13px;
	color: #6b7280;
	padding: 6px 0;
	line-height: 1.4;
}

/* Lightbox */
.ep-lightbox {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
}
.ep-lightbox-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.9);
}
.ep-lightbox-content {
	position: relative;
	max-width: 90vw;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	align-items: center;
}
.ep-lightbox-image-wrap {
	position: relative;
	display: inline-block;
	line-height: 0;
}
.ep-lightbox-img {
	max-width: 90vw;
	max-height: 80vh;
	object-fit: contain;
	border-radius: 2px;
}
.ep-lightbox-close {
	position: absolute;
	top: -40px;
	right: 0;
	background: none;
	border: none;
	color: #fff;
	font-size: 32px;
	cursor: pointer;
	padding: 4px 12px;
	line-height: 1;
	z-index: 1;
}
.ep-lightbox-close:hover {
	color: #d1d5db;
}

/* Slideshow play/pause button */
.ep-lightbox-play {
	position: absolute;
	top: -40px;
	right: 44px;
	background: none;
	border: none;
	color: #fff;
	font-size: 18px;
	cursor: pointer;
	padding: 4px 10px;
	line-height: 1;
	z-index: 1;
	opacity: 0.8;
}
.ep-lightbox-play:hover {
	opacity: 1;
}

.ep-lightbox-prev,
.ep-lightbox-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(0, 0, 0, 0.5);
	border: none;
	color: #fff;
	font-size: 36px;
	cursor: pointer;
	padding: 12px 16px;
	line-height: 1;
	border-radius: 4px;
}
.ep-lightbox-prev { left: -60px; }
.ep-lightbox-next { right: -60px; }
.ep-lightbox-prev:hover,
.ep-lightbox-next:hover {
	background: rgba(0, 0, 0, 0.8);
}
.ep-lightbox-caption {
	color: #d1d5db;
	font-size: 14px;
	margin-top: 12px;
	text-align: center;
	max-width: 600px;
}

/* EXIF panel */
.ep-lightbox-exif {
	display: none;
	margin-top: 10px;
	background: rgba(0, 0, 0, 0.5);
	border-radius: 4px;
	padding: 8px 12px;
	max-width: 400px;
	width: 100%;
}
.ep-lightbox-exif-table {
	border-collapse: collapse;
	width: 100%;
}
.ep-exif-label {
	color: #9ca3af;
	font-size: 11px;
	font-family: monospace;
	padding: 2px 12px 2px 0;
	white-space: nowrap;
	vertical-align: top;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.ep-exif-value {
	color: #e5e7eb;
	font-size: 12px;
	font-family: monospace;
	padding: 2px 0;
}

/* Responsive lightbox nav */
@media (max-width: 768px) {
	.ep-lightbox-prev { left: 4px; font-size: 28px; padding: 8px 12px; }
	.ep-lightbox-next { right: 4px; font-size: 28px; padding: 8px 12px; }
	.ep-lightbox-close { top: -36px; font-size: 28px; }
	.ep-lightbox-play  { top: -36px; right: 40px; font-size: 16px; }
}
