/* The Main Street Photo Booth — frontend styles
   --msp-accent is a placeholder brand color. Swap it per-site once
   Faith supplies brand colors for the project this is installed on. */
.msp-gallery {
	--msp-accent: #2271b1;
	--msp-columns: 4;
	box-sizing: border-box;
}
.msp-gallery * {
	box-sizing: border-box;
}
.msp-notice {
	padding: 12px 16px;
	background: #f8f8f8;
	border-left: 4px solid var(--msp-accent);
}

/* ---------- One at a Time ---------- */
.msp-template-one-at-a-time {
	max-width: 720px;
	margin: 0 auto !important;
}
.msp-template-one-at-a-time .msp-slide {
	margin: 0 0 28px;
	text-align: center;
}
.msp-template-one-at-a-time .msp-slide:last-child {
	margin-bottom: 0;
}
.msp-template-one-at-a-time .msp-slide img {
	max-width: 100%;
	height: auto;
	border-radius: 4px;
}
.msp-template-one-at-a-time .msp-slide figcaption {
	margin-top: 10px;
	font-size: 0.9em;
	color: #555;
}

/* ---------- Carousel ---------- */
.msp-template-carousel {
	display: flex;
	align-items: center;
	gap: 10px;
}
.msp-template-carousel .msp-carousel-track {
	display: flex;
	gap: 14px;
	overflow-x: auto;
	scroll-behavior: smooth;
	padding: 4px;
	flex: 1;
}
.msp-template-carousel .msp-carousel-item {
	flex: 0 0 220px;
}
.msp-template-carousel .msp-img-wrap {
	overflow: hidden;
	border-radius: 6px;
}
.msp-template-carousel img {
	width: 100%;
	display: block;
}
.msp-template-carousel .msp-caption {
	font-size: 0.85em;
	margin: 6px 0 0;
	color: #555;
}
.msp-template-carousel .msp-carousel-prev,
.msp-template-carousel .msp-carousel-next {
	background: var(--msp-accent);
	color: #fff;
	border: none;
	border-radius: 50%;
	width: 34px;
	height: 34px;
	flex-shrink: 0;
	cursor: pointer;
}

/* ---------- Slideshow ---------- */
.msp-template-slideshow {
	position: relative;
}
.msp-template-slideshow .msp-slideshow-stage {
	position: relative;
	min-height: 200px;
}
.msp-template-slideshow .msp-slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 0.6s ease;
	margin: 0;
}
.msp-template-slideshow .msp-slide.is-active {
	position: relative;
	opacity: 1;
}
.msp-template-slideshow img {
	width: 100%;
	display: block;
}
.msp-template-slideshow .msp-slideshow-dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 10px;
}
.msp-template-slideshow .msp-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	border: none;
	background: #ccc;
	cursor: pointer;
}
.msp-template-slideshow .msp-dot.is-active {
	background: var(--msp-accent);
}
.msp-template-slideshow .msp-slideshow-pause {
	position: absolute;
	top: 10px;
	right: 10px;
	background: rgba(0,0,0,0.5);
	color: #fff;
	border: none;
	border-radius: 4px;
	padding: 4px 8px;
	cursor: pointer;
	font-size: 11px;
}

/* ---------- Grid (squares/rectangles) ---------- */
.msp-template-grid {
	display: grid;
	grid-template-columns: repeat(var(--msp-columns), 1fr);
	gap: 10px;
}
.msp-template-grid .msp-grid-item {
	position: relative;
	display: block;
	overflow: hidden;
	background: #eee;
}
.msp-template-grid.msp-shape-square .msp-grid-item {
	aspect-ratio: 1 / 1;
}
.msp-template-grid.msp-shape-rectangle .msp-grid-item {
	aspect-ratio: 4 / 3;
}
.msp-template-grid .msp-grid-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.msp-template-grid .msp-overlay-caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0,0,0,0.6);
	color: #fff;
	font-size: 0.8em;
	padding: 6px 8px;
	transform: translateY(100%);
	transition: transform 0.25s ease;
}
.msp-template-grid .msp-grid-item:hover .msp-overlay-caption {
	transform: translateY(0);
}

/* ---------- Circles ---------- */
.msp-template-circles {
	display: grid;
	grid-template-columns: repeat(var(--msp-columns), 1fr);
	gap: 16px;
	text-align: center;
}
.msp-template-circles .msp-circle-crop {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	border-radius: 50%;
	overflow: hidden;
	background: #eee;
}
.msp-template-circles img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.msp-template-circles .msp-circle-caption {
	display: block;
	font-size: 0.8em;
	margin-top: 6px;
	color: #555;
}

/* ---------- Average Gallery ---------- */
.msp-template-average {
	display: grid;
	grid-template-columns: repeat(var(--msp-columns), 1fr);
	gap: 12px;
}
.msp-template-average .msp-avg-item {
	margin: 0;
}
.msp-template-average img {
	width: 100%;
	display: block;
	border-radius: 3px;
}
.msp-template-average figcaption {
	font-size: 0.8em;
	color: #555;
	margin-top: 4px;
}

/* ---------- Hover style suite (applies to grid/circles/average thumbnails) ---------- */
.msp-hover-plain img { transition: none; }

.msp-hover-zoom img { transition: transform 0.35s ease; }
.msp-hover-zoom a:hover img { transform: scale(1.08); }

.msp-hover-fade_caption .msp-overlay-caption,
.msp-hover-fade_caption .msp-circle-caption {
	opacity: 0;
	transition: opacity 0.3s ease;
}
.msp-hover-fade_caption a:hover .msp-overlay-caption,
.msp-hover-fade_caption a:hover .msp-circle-caption { opacity: 1; }

.msp-hover-slide_caption .msp-overlay-caption {
	transform: translateY(100%);
	transition: transform 0.3s ease;
}
.msp-hover-slide_caption a:hover .msp-overlay-caption { transform: translateY(0); }

.msp-hover-grayscale img { filter: grayscale(100%); transition: filter 0.35s ease; }
.msp-hover-grayscale a:hover img { filter: grayscale(0%); }

.msp-hover-darken a { position: relative; display: block; }
.msp-hover-darken a::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,0);
	transition: background 0.3s ease;
}
.msp-hover-darken a:hover::after { background: rgba(0,0,0,0.35); }

.msp-hover-tilt img { transition: transform 0.3s ease; }
.msp-hover-tilt a:hover img { transform: rotate(-2deg) scale(1.03); }

.msp-hover-border_glow a { display: block; border: 2px solid transparent; transition: border-color 0.3s ease, box-shadow 0.3s ease; }
.msp-hover-border_glow a:hover { border-color: var(--msp-accent); box-shadow: 0 0 12px var(--msp-accent); }

.msp-hover-shine a { position: relative; display: block; overflow: hidden; }
.msp-hover-shine a::before {
	content: "";
	position: absolute;
	top: 0;
	left: -75%;
	width: 50%;
	height: 100%;
	background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.6) 50%, rgba(255,255,255,0) 100%);
	transform: skewX(-20deg);
	transition: left 0.6s ease;
}
.msp-hover-shine a:hover::before { left: 125%; }

/* ---------- Lightbox ---------- */
.msp-lightbox-overlay {
	position: fixed;
	inset: 0;
	background: rgba(10, 10, 12, 0.94);
	backdrop-filter: blur(6px);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	z-index: 100000;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease;
}
.msp-lightbox-overlay.is-open {
	opacity: 1;
	visibility: visible;
}
.msp-lightbox-stage {
	position: relative;
	flex: 1;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	padding: 60px 90px;
	cursor: zoom-out;
}
.msp-lightbox-img {
	max-width: 100%;
	max-height: 78vh;
	box-shadow: 0 10px 50px rgba(0,0,0,0.6);
	border-radius: 4px;
	cursor: zoom-in;
	transition: transform 0.25s ease;
	transform-origin: center center;
	user-select: none;
}
.msp-lightbox-img.is-zoomed {
	cursor: zoom-out;
}
.msp-lightbox-close {
	position: absolute;
	top: 16px;
	right: 20px;
	background: rgba(255,255,255,0.12);
	border: none;
	color: #fff;
	font-size: 26px;
	line-height: 1;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	cursor: pointer;
	transition: background 0.2s ease;
	z-index: 2;
}
.msp-lightbox-close:hover {
	background: rgba(255,255,255,0.25);
}
.msp-lightbox-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(255,255,255,0.12);
	border: none;
	color: #fff;
	font-size: 30px;
	line-height: 1;
	width: 50px;
	height: 50px;
	border-radius: 50%;
	cursor: pointer;
	transition: background 0.2s ease;
	z-index: 2;
}
.msp-lightbox-arrow:hover {
	background: rgba(255,255,255,0.25);
}
.msp-lightbox-prev { left: 16px; }
.msp-lightbox-next { right: 16px; }
.msp-lightbox-footer {
	width: 100%;
	max-width: 700px;
	padding: 10px 20px 24px;
	text-align: center;
	color: #eee;
}
.msp-lightbox-caption {
	margin: 0 0 10px;
	font-size: 0.95em;
	color: #ddd;
}
.msp-lightbox-tools {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
}
.msp-lightbox-zoom-in,
.msp-lightbox-zoom-out {
	background: rgba(255,255,255,0.12);
	border: none;
	color: #fff;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s ease;
}
.msp-lightbox-zoom-in:hover,
.msp-lightbox-zoom-out:hover {
	background: rgba(255,255,255,0.25);
}
.msp-lightbox-counter {
	font-size: 0.85em;
	color: #aaa;
	min-width: 50px;
}

@media (max-width: 640px) {
	.msp-lightbox-stage { padding: 50px 20px; }
	.msp-lightbox-arrow { width: 40px; height: 40px; font-size: 22px; }
}

@media (max-width: 640px) {
	.msp-template-grid,
	.msp-template-circles,
	.msp-template-average {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}
