/*
 * On-brand visual pass over PhotoSwipe v5's stock UI (vendor/photoswipe/
 * photoswipe.css) - confirmed zero .pswp-scoped rules existed anywhere in
 * this codebase before this file, so this is a from-scratch theme, not an
 * override fight. Layers on via PhotoSwipe's own documented CSS custom
 * properties (--pswp-icon-color etc., set on .pswp itself) rather than
 * overriding individual selectors, so a future PhotoSwipe version upgrade
 * that keeps those variable names stays compatible with zero changes here.
 * Brand tokens (--color-accent, the Oswald/Lato stack) pulled from
 * css/reset.css:38-104, same values used sitewide.
 */
.pswp {
	--pswp-icon-color: #fff;
	--pswp-icon-color-secondary: rgba(255, 255, 255, 0.55);
	--pswp-icon-stroke-color: rgba(255, 255, 255, 0.55);
}

.pswp__button:hover,
.pswp__button:focus-visible {
	/* --color-accent-dark: the sienna accent lifted for dark grounds
	   (reset.css) - the core sienna reads muddy on the lightbox black.
	   Was the hardcoded stock gold (2026-08-23 accent decision). */
	--pswp-icon-color: var(--color-accent-dark, #c48f6a);
}

/*
 * Caption panel - js/fancy-gallery-lightbox.js registers this element via
 * PhotoSwipe's uiRegister()/registerElement() extension point and keeps
 * .fancy-gallery-caption__title/__exif's text in sync per-slide; this file
 * owns the visual treatment only. pointer-events:none throughout so a tap
 * anywhere on the panel still reaches PhotoSwipe's own tap-to-toggle-UI
 * handling underneath, same as tapping bare background would.
 */
.fancy-gallery-caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 10;
	padding: 32px 24px 22px;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0) 100%);
	text-align: center;
	pointer-events: none;
	opacity: 1;
	transition: opacity 200ms ease;
}

.fancy-gallery-caption--empty {
	opacity: 0;
}

.fancy-gallery-caption__title {
	/* Token, not a hardcoded stack - this file predates the type decision
	   and shipped its own literal copies of the old Oswald/Lato pairing;
	   now it follows reset.css (Fraunces/Work Sans as of 2026-08-23). */
	font-family: var(--font-family-heading, Georgia, serif);
	font-size: 17px;
	font-weight: 450;
	letter-spacing: 0.5px;
	text-transform: none;
	font-style: italic;
	color: #fff;
	margin-bottom: 5px;
	text-wrap: balance;
}

.fancy-gallery-caption__title:empty {
	display: none;
}

.fancy-gallery-caption__exif {
	font-family: var(--font-family-body, Arial, sans-serif);
	font-size: 12px;
	letter-spacing: 0.5px;
	font-variant-numeric: tabular-nums;
	color: rgba(255, 255, 255, 0.65);
}

.fancy-gallery-caption__exif:empty {
	display: none;
}

@media (max-width: 600px) {
	.fancy-gallery-caption {
		padding: 22px 16px 16px;
	}

	.fancy-gallery-caption__title {
		font-size: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.fancy-gallery-caption {
		transition: none;
	}
}
