/**
 * McMyra gallery lightbox.
 * Scoped to .gallery-item cards (the design system's gallery classes) and the
 * overlay itself, so nothing here reaches the rest of the page.
 */

.gallery-item { position: relative; }
.gallery-item img.gallery-image { cursor: zoom-in; }

.mcm-zoom-btn {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba( 14, 32, 52, 0.62 );
	color: #fff;
	display: grid;
	place-items: center;
	cursor: zoom-in;
	opacity: 0;
	transition: opacity 0.15s ease, background 0.15s ease;
	z-index: 2;
}

.gallery-item:hover .mcm-zoom-btn,
.gallery-item:focus-within .mcm-zoom-btn { opacity: 1; }
.mcm-zoom-btn:hover { background: rgba( 14, 32, 52, 0.88 ); }
.mcm-zoom-btn:focus-visible { opacity: 1; outline: 3px solid var( --blue-pale, #dfefff ); outline-offset: 2px; }

@media ( hover: none ) {
	.mcm-zoom-btn { opacity: 1; }
}

.mcm-zoom-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

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

.mcm-lb[hidden] { display: none; }

.mcm-lb {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba( 14, 32, 52, 0.95 );
	display: flex;
	flex-direction: column;
	font-family: var( --font-body, Karla, "Helvetica Neue", Helvetica, Arial, sans-serif );
}

.mcm-lb__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 12px 16px;
	color: #fff;
	flex: 0 0 auto;
}

.mcm-lb__count { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; opacity: 0.72; }
.mcm-lb__tools { display: flex; align-items: center; gap: 8px; }

.mcm-lb__btn {
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba( 255, 255, 255, 0.12 );
	color: #fff;
	font-size: 19px;
	line-height: 1;
	cursor: pointer;
	display: grid;
	place-items: center;
}

.mcm-lb__btn:hover:not(:disabled) { background: rgba( 255, 255, 255, 0.24 ); }
.mcm-lb__btn:disabled { opacity: 0.35; cursor: default; }
.mcm-lb__btn:focus-visible { outline: 3px solid var( --blue-pale, #dfefff ); outline-offset: 2px; }

.mcm-lb__stage {
	flex: 1 1 auto;
	min-height: 0;
	display: grid;
	place-items: center;
	overflow: hidden;
	position: relative;
	touch-action: none;
}

.mcm-lb__media {
	max-width: 94vw;
	max-height: 100%;
	display: block;
	border-radius: 8px;
	transform-origin: center center;
	transition: transform 0.14s ease-out;
	will-change: transform;
	background: #0e2034;
}

.mcm-lb__media.is-zoomed { cursor: grab; }
.mcm-lb__media.is-dragging { cursor: grabbing; transition: none; }

.mcm-lb__nav {
	position: absolute;
	top: 50%;
	transform: translateY( -50% );
	width: 48px;
	height: 48px;
	border: 0;
	border-radius: 999px;
	background: rgba( 255, 255, 255, 0.14 );
	color: #fff;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	display: grid;
	place-items: center;
	z-index: 2;
}

.mcm-lb__nav:hover { background: rgba( 255, 255, 255, 0.26 ); }
.mcm-lb__nav:focus-visible { outline: 3px solid var( --blue-pale, #dfefff ); outline-offset: 2px; }
.mcm-lb__nav--prev { left: 14px; }
.mcm-lb__nav--next { right: 14px; }

.mcm-lb__caption {
	flex: 0 0 auto;
	padding: 12px 20px 20px;
	color: #fff;
	text-align: center;
	font-size: 15px;
	line-height: 1.5;
	opacity: 0.9;
}

.mcm-lb__hint { display: block; margin-top: 4px; font-size: 12px; opacity: 0.6; }

@media ( max-width: 600px ) {
	.mcm-lb__nav { width: 40px; height: 40px; font-size: 22px; }
	.mcm-lb__nav--prev { left: 6px; }
	.mcm-lb__nav--next { right: 6px; }
	.mcm-lb__media { max-width: 100vw; }
}

@media ( prefers-reduced-motion: reduce ) {
	.mcm-lb__media { transition: none; }
}
