/* LS Photo Gallery */

/* -------------------------------------------------------------------------
   Controls
   ------------------------------------------------------------------------- */

.ls-pg-controls {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	margin-bottom: 24px;
}

.ls-pg-search {
	flex: 1 1 260px;
	min-width: 200px;
	padding: 8px 12px;
	font-size: 14px;
	border: 1px solid #ccc;
	border-radius: 4px;
	background: #fff;
}

.ls-pg-filter {
	flex: 0 1 auto;
	padding: 8px 12px;
	font-size: 14px;
	border: 1px solid #ccc;
	border-radius: 4px;
	background: #fff;
	cursor: pointer;
}

.ls-pg-reset-btn {
	padding: 8px 16px;
	font-size: 14px;
	border: 1px solid #555;
	border-radius: 4px;
	background: #555;
	color: #fff;
	cursor: pointer;
	white-space: nowrap;
}

.ls-pg-reset-btn:hover {
	background: #333;
	border-color: #333;
}

.ls-pg-copy-link-btn {
	padding: 8px 16px;
	font-size: 14px;
	border: 1px solid #0073aa;
	border-radius: 4px;
	background: #0073aa;
	color: #fff;
	cursor: pointer;
	white-space: nowrap;
}

.ls-pg-copy-link-btn:hover {
	background: #005a87;
	border-color: #005a87;
}

.ls-pg-result-count {
	flex-basis: 100%;
	font-size: 13px;
	color: #666;
	margin-top: -4px;
}

/* -------------------------------------------------------------------------
   Grid
   ------------------------------------------------------------------------- */

.ls-pg-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
}

.ls-pg-card {
	cursor: pointer;
	border-radius: 6px;
	overflow: hidden;
	background: #f9f9f9;
	transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.ls-pg-card:hover,
.ls-pg-card:focus-visible {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
	transform: translateY(-2px);
}

.ls-pg-card:focus-visible {
	outline: 2px solid #0073aa;
	outline-offset: 2px;
}

.ls-pg-card-thumb {
	position: relative;
	width: 100%;
	padding-top: 75%; /* 4:3 aspect ratio */
	overflow: hidden;
	background: #e0e0e0;
}

.ls-pg-card-thumb img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ls-pg-card-caption {
	padding: 10px 12px;
	font-size: 13px;
	line-height: 1.4;
	color: #333;
}

/* -------------------------------------------------------------------------
   No results
   ------------------------------------------------------------------------- */

.ls-pg-no-results {
	text-align: center;
	padding: 48px 16px;
	color: #666;
	font-size: 15px;
}

/* -------------------------------------------------------------------------
   Pagination
   ------------------------------------------------------------------------- */

.ls-pg-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 4px;
	margin-top: 24px;
	flex-wrap: wrap;
}

.ls-pg-page-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	font-size: 14px;
	border: 1px solid #ccc;
	border-radius: 4px;
	background: #fff;
	cursor: pointer;
	color: #333;
}

.ls-pg-page-btn:hover {
	background: #f0f0f0;
}

.ls-pg-page-btn.is-active {
	background: #0073aa;
	color: #fff;
	border-color: #0073aa;
	cursor: default;
}

.ls-pg-page-btn:disabled {
	opacity: 0.4;
	cursor: default;
}

.ls-pg-page-ellipsis {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	font-size: 14px;
	color: #999;
}

/* -------------------------------------------------------------------------
   Lightbox overlay
   ------------------------------------------------------------------------- */

.ls-pg-lightbox-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	background: rgba(0, 0, 0, 0.9);
	display: flex;
	align-items: center;
	justify-content: center;
}

.ls-pg-lightbox {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: 90vw;
	max-height: 95vh;
	width: 100%;
}

.ls-pg-lightbox-close {
	position: fixed;
	top: 16px;
	right: 20px;
	z-index: 10;
	background: none;
	border: none;
	color: #fff;
	font-size: 32px;
	cursor: pointer;
	line-height: 1;
	padding: 4px 8px;
	opacity: 0.8;
}

.ls-pg-lightbox-close:hover {
	opacity: 1;
}

/* Image container */
.ls-pg-lightbox-img-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	max-height: 75vh;
	flex-shrink: 0;
}

.ls-pg-lightbox-img-wrap img {
	display: block;
	max-width: min(90vw, 1400px);
	max-height: 75vh;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 4px;
}

/* Caption below image */
.ls-pg-lightbox-caption {
	margin-top: 12px;
	padding: 0 60px;
	color: #ddd;
	font-size: 15px;
	line-height: 1.5;
	text-align: center;
	max-width: 900px;
}

.ls-pg-lightbox-description {
	margin-top: 6px;
	font-size: 13px;
	color: #aaa;
}

.ls-pg-lightbox-description a {
	color: #6cb4ee;
	text-decoration: underline;
}

.ls-pg-lightbox-description a:hover {
	color: #fff;
}

/* Navigation arrows */
.ls-pg-lightbox-prev,
.ls-pg-lightbox-next {
	position: fixed;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	background: rgba(255, 255, 255, 0.15);
	border: none;
	color: #fff;
	font-size: 28px;
	width: 48px;
	height: 64px;
	cursor: pointer;
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0.7;
	transition: opacity 0.2s ease, background 0.2s ease;
}

.ls-pg-lightbox-prev:hover,
.ls-pg-lightbox-next:hover {
	opacity: 1;
	background: rgba(255, 255, 255, 0.25);
}

.ls-pg-lightbox-prev {
	left: 12px;
}

.ls-pg-lightbox-next {
	right: 12px;
}

/* Share icons — left edge */
.ls-pg-lightbox-shares {
	position: fixed;
	left: 16px;
	top: 16px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	z-index: 10;
}

.ls-pg-share-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.15);
	border: none;
	cursor: pointer;
	padding: 0;
	transition: background 0.2s ease;
}

.ls-pg-share-icon:hover {
	background: rgba(255, 255, 255, 0.3);
}

.ls-pg-share-icon svg {
	width: 20px;
	height: 20px;
	fill: #fff;
}

/* -------------------------------------------------------------------------
   Responsive — tablet
   ------------------------------------------------------------------------- */

@media (max-width: 768px) {
	.ls-pg-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.ls-pg-lightbox-shares {
		position: static;
		transform: none;
		flex-direction: row;
		justify-content: center;
		margin-top: 12px;
	}

	.ls-pg-lightbox-prev {
		left: 4px;
	}

	.ls-pg-lightbox-next {
		right: 4px;
	}

	.ls-pg-lightbox-caption {
		padding: 0 16px;
	}
}

/* -------------------------------------------------------------------------
   Responsive — mobile
   ------------------------------------------------------------------------- */

@media (max-width: 480px) {
	.ls-pg-grid {
		grid-template-columns: 1fr;
	}

	.ls-pg-lightbox-prev,
	.ls-pg-lightbox-next {
		width: 40px;
		height: 52px;
		font-size: 22px;
	}
}
