/*
 * Theme-level PhotoSwipe styles, loaded with the runtime by inc/integrations/lightbox.php.
 *
 * Section 1 is verbatim upstream — do not edit it. Translucent values in our own
 * sections derive from brand tokens via `color-mix(… light/dark <pct>%, transparent)`.
 */

/* comment-budget: ignore-start — section 1 is verbatim upstream */
/* 1. Stock PhotoSwipe v5 CSS — by Dmytro Semenov | photoswipe.com */

.pswp {
  --pswp-bg: #000;
  --pswp-placeholder-bg: #222;


  --pswp-root-z-index: 100000;

  --pswp-preloader-color: rgba(79, 79, 79, 0.4);
  --pswp-preloader-color-secondary: rgba(255, 255, 255, 0.9);

  /* defined via js:
  --pswp-transition-duration: 333ms; */

  --pswp-icon-color: #fff;
  --pswp-icon-color-secondary: #4f4f4f;
  --pswp-icon-stroke-color: #4f4f4f;
  --pswp-icon-stroke-width: 2px;

  --pswp-error-text-color: var(--pswp-icon-color);
}


/*
	Styles for basic PhotoSwipe (pswp) functionality (sliding area, open/close transitions)
*/

.pswp {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: var(--pswp-root-z-index);
	display: none;
	touch-action: none;
	outline: 0;
	opacity: 0.003;
	contain: layout style size;
	-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

/* Prevents focus outline on the root element,
  (it may be focused initially) */
.pswp:focus {
  outline: 0;
}

.pswp * {
  box-sizing: border-box;
}

.pswp img {
  max-width: none;
}

.pswp--open {
	display: block;
}

.pswp,
.pswp__bg {
	transform: translateZ(0);
	will-change: opacity;
}

.pswp__bg {
  opacity: 0.005;
	background: var(--pswp-bg);
}

.pswp,
.pswp__scroll-wrap {
	overflow: hidden;
}

.pswp__scroll-wrap,
.pswp__bg,
.pswp__container,
.pswp__item,
.pswp__content,
.pswp__img,
.pswp__zoom-wrap {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

.pswp__img,
.pswp__zoom-wrap {
	width: auto;
	height: auto;
}

.pswp--click-to-zoom.pswp--zoom-allowed .pswp__img {
	cursor: -webkit-zoom-in;
	cursor: -moz-zoom-in;
	cursor: zoom-in;
}

.pswp--click-to-zoom.pswp--zoomed-in .pswp__img {
	cursor: move;
	cursor: -webkit-grab;
	cursor: -moz-grab;
	cursor: grab;
}

.pswp--click-to-zoom.pswp--zoomed-in .pswp__img:active {
  cursor: -webkit-grabbing;
  cursor: -moz-grabbing;
  cursor: grabbing;
}

/* :active to override grabbing cursor */
.pswp--no-mouse-drag.pswp--zoomed-in .pswp__img,
.pswp--no-mouse-drag.pswp--zoomed-in .pswp__img:active,
.pswp__img {
	cursor: -webkit-zoom-out;
	cursor: -moz-zoom-out;
	cursor: zoom-out;
}


/* Prevent selection and tap highlights */
.pswp__container,
.pswp__img,
.pswp__button,
.pswp__counter {
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

.pswp__item {
	/* z-index for fade transition */
	z-index: 1;
	overflow: hidden;
}

.pswp__hidden {
	display: none !important;
}

/* Allow to click through pswp__content element, but not its children */
.pswp__content {
  pointer-events: none;
}
.pswp__content > * {
  pointer-events: auto;
}


/*

  PhotoSwipe UI

*/

/*
	Error message appears when image is not loaded
	(JS option errorMsg controls markup)
*/
.pswp__error-msg-container {
  display: grid;
}
.pswp__error-msg {
	margin: auto;
	font-size: 1em;
	line-height: 1;
	color: var(--pswp-error-text-color);
}

/*
class pswp__hide-on-close is applied to elements that
should hide (for example fade out) when PhotoSwipe is closed
and show (for example fade in) when PhotoSwipe is opened
 */
.pswp .pswp__hide-on-close {
	opacity: 0.005;
	will-change: opacity;
	transition: opacity var(--pswp-transition-duration) cubic-bezier(0.4, 0, 0.22, 1);
	z-index: 10; /* always overlap slide content */
	pointer-events: none; /* hidden elements should not be clickable */
}

/* class pswp--ui-visible is added when opening or closing transition starts */
.pswp--ui-visible .pswp__hide-on-close {
	opacity: 1;
	pointer-events: auto;
}

/* <button> styles, including css reset */
.pswp__button {
	position: relative;
	display: block;
	width: 50px;
	height: 60px;
	padding: 0;
	margin: 0;
	overflow: hidden;
	cursor: pointer;
	background: none;
	border: 0;
	box-shadow: none;
	opacity: 0.85;
	-webkit-appearance: none;
	-webkit-touch-callout: none;
}

.pswp__button:hover,
.pswp__button:active,
.pswp__button:focus {
  transition: none;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  opacity: 1;
}

.pswp__button:disabled {
  opacity: 0.3;
  cursor: auto;
}

.pswp__icn {
  fill: var(--pswp-icon-color);
  color: var(--pswp-icon-color-secondary);
}

.pswp__icn {
  position: absolute;
  top: 14px;
  left: 9px;
  width: 32px;
  height: 32px;
  overflow: hidden;
  pointer-events: none;
}

.pswp__icn-shadow {
  stroke: var(--pswp-icon-stroke-color);
  stroke-width: var(--pswp-icon-stroke-width);
  fill: none;
}

.pswp__icn:focus {
	outline: 0;
}

/*
	div element that matches size of large image,
	large image loads on top of it,
	used when msrc is not provided
*/
div.pswp__img--placeholder,
.pswp__img--with-bg {
	background: var(--pswp-placeholder-bg);
}

.pswp__top-bar {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 60px;
	display: flex;
  flex-direction: row;
  justify-content: flex-end;
	z-index: 10;

	/* allow events to pass through top bar itself */
	pointer-events: none !important;
}
.pswp__top-bar > * {
  pointer-events: auto;
  /* this makes transition significantly more smooth,
     even though inner elements are not animated */
  will-change: opacity;
}


/*

  Close button

*/
.pswp__button--close {
  margin-right: 6px;
}


/*

  Arrow buttons

*/
.pswp__button--arrow {
  position: absolute;
  top: 0;
  width: 75px;
  height: 100px;
  top: 50%;
  margin-top: -50px;
}

.pswp__button--arrow:disabled {
  display: none;
  cursor: default;
}

.pswp__button--arrow .pswp__icn {
  top: 50%;
  margin-top: -30px;
  width: 60px;
  height: 60px;
  background: none;
  border-radius: 0;
}

.pswp--one-slide .pswp__button--arrow {
  display: none;
}

/* hide arrows on touch screens */
.pswp--touch .pswp__button--arrow {
  visibility: hidden;
}

/* show arrows only after mouse was used */
.pswp--has_mouse .pswp__button--arrow {
  visibility: visible;
}

.pswp__button--arrow--prev {
  right: auto;
  left: 0px;
}

.pswp__button--arrow--next {
  right: 0px;
}
.pswp__button--arrow--next .pswp__icn {
  left: auto;
  right: 14px;
  /* flip horizontally */
  transform: scale(-1, 1);
}

/*

  Zoom button

*/
.pswp__button--zoom {
  display: none;
}

.pswp--zoom-allowed .pswp__button--zoom {
  display: block;
}

/* "+" => "-" */
.pswp--zoomed-in .pswp__zoom-icn-bar-v {
  display: none;
}


/*

  Loading indicator

*/
.pswp__preloader {
  position: relative;
  overflow: hidden;
  width: 50px;
  height: 60px;
  margin-right: auto;
}

.pswp__preloader .pswp__icn {
  opacity: 0;
  transition: opacity 0.2s linear;
  animation: pswp-clockwise 600ms linear infinite;
}

.pswp__preloader--active .pswp__icn {
  opacity: 0.85;
}

@keyframes pswp-clockwise {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}


/*

  "1 of 10" counter

*/
.pswp__counter {
  height: 30px;
  margin-top: 15px;
  margin-inline-start: 20px;
  font-size: 14px;
  line-height: 30px;
  color: var(--pswp-icon-color);
  text-shadow: 1px 1px 3px var(--pswp-icon-color-secondary);
  opacity: 0.85;
}

.pswp--one-slide .pswp__counter {
  display: none;
}


/* comment-budget: ignore-end */

/* 2. Nomon chrome — meta bar, thumbnail strip, arrows; registered via `uiRegister`. */

/* Non-zero only with a strip rendered; the meta bar reads `--strip-h` to sit above it. */
.pswp {
	--strip-h: 0px;
	--strip-offset: 0px;
}

.pswp:has(.pswp__thumbnails) {
	--strip-h: 80px;
	--strip-offset: 16px;
}

/* Frosted pill after Lightbox3's `.lightbox3-chrome`, holding title, caption and close.
 * Rides PhotoSwipe's `pswp--ui-visible` so it fades with the rest of the chrome. */
.pswp__meta {
	position: absolute;
	bottom: calc(var(--strip-h) + var(--strip-offset) + 1rem);
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 0.75rem;
	/* Asymmetric after Lightbox3: the close button pads itself with its own circle. */
	padding: 0.375rem 0.375rem 0.375rem 1.125rem;
	width: max-content;
	max-width: min(90vw, 600px);
	background: color-mix(in srgb, var(--wp--preset--color--black) 80%, transparent);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border-radius: 3rem;
	box-shadow: inset 0 1px 0 color-mix(in srgb, var(--wp--preset--color--white) 8%, transparent);
	color: color-mix(in srgb, var(--wp--preset--color--white) 90%, transparent);
	font-size: 15px;
	line-height: 1.3;
	letter-spacing: 0.02em;
	text-align: center;
	pointer-events: none;
	z-index: 10;
	opacity: 0;
	transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1);
}

.pswp--ui-visible .pswp__meta {
	opacity: 1;
}

.pswp__meta-text {
	display: flex;
	flex-direction: column;
	gap: 0.125rem;
	flex: 1;
	min-width: 0;
}

.pswp__meta-text.is-empty {
	display: none;
}

/* No visible text, either because both toggles are off or this slide has neither:
 * drop to uniform padding so the bar shrinks to a circle around the close button. */
.pswp__meta:not(:has(.pswp__meta-text)),
.pswp__meta:has(.pswp__meta-text.is-empty) {
	padding: 0.375rem;
}

.pswp__meta .pswp__title {
	font-weight: 600;
}

.pswp__meta .pswp__title:empty {
	display: none;
}

.pswp__meta .pswp__caption {
	font-size: 14px;
	/* Clamp matches Lightbox3: long captions wrap to 10 lines, then truncate. */
	overflow: hidden;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 10;
}

.pswp__meta .pswp__caption:empty {
	display: none;
}

/* Thinner than the arrow buttons because it sits on the already-frosted pill; the X is
 * masked from the icon registry, since `lightbox.js` renders the button empty. */
.pswp__meta-close {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	padding: 0;
	border: none;
	background: color-mix(in srgb, var(--wp--preset--color--white) 8%, transparent);
	border-radius: 50%;
	cursor: pointer;
	pointer-events: auto;
	transition: background 0.15s ease;
}

.pswp__meta-close:hover {
	background: color-mix(in srgb, var(--wp--preset--color--white) 16%, transparent);
}

.pswp__meta-close:focus {
	outline: none;
}

.pswp__meta-close:focus-visible {
	outline: 2px solid color-mix(in srgb, var(--wp--preset--color--white) 80%, transparent);
	outline-offset: 2px;
}

.pswp__meta-close::before {
	content: '';
	width: 20px;
	height: 20px;
	background-color: var(--wp--preset--color--white);
	mask-image: url("../icons/close.svg");
	-webkit-mask-image: url("../icons/close.svg");
	mask-size: contain;
	-webkit-mask-size: contain;
	mask-repeat: no-repeat;
	-webkit-mask-repeat: no-repeat;
	mask-position: center;
	-webkit-mask-position: center;
	opacity: 0.85;
	transition: opacity 0.15s ease;
}

.pswp__meta-close:hover::before {
	opacity: 1;
}

.pswp__thumbnails {
	position: absolute;
	bottom: var(--strip-offset);
	left: 0;
	right: 0;
	height: var(--strip-h);
	display: flex;
	/* `safe` falls back to start-alignment on overflow; plain `center` would put earlier
	 * thumbs past the scroll origin and out of reach. */
	justify-content: safe center;
	gap: 0.25rem;
	padding: 0.5rem;
	overflow-x: auto;
	overflow-y: hidden;
	/* Backdrop gradient lives on `.pswp::after`: this strip's `overflow` would clip a
	 * pseudo of its own before it reached the viewport floor. */
	background: transparent;
	z-index: 10;
	/* The active thumb auto-centers on slide change, so the bar is clutter; drag still scrolls. */
	scrollbar-width: none;
}

.pswp__thumbnails::-webkit-scrollbar {
	display: none;
}

/* Chevron is masked in via `::before` because init passes empty `arrow*SVG` strings, and
 * rotated per button off one shared shape. `.pswp` qualifier beats the default arrow rules. */
.pswp .pswp__button--arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	margin: 0;
	top: 50%;
	transform: translateY(-50%);
	background: color-mix(in srgb, var(--wp--preset--color--white) 10%, transparent);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-radius: 50%;
	box-shadow: inset 0 1px 0 color-mix(in srgb, var(--wp--preset--color--white) 8%, transparent);
	transition: background 0.15s ease;
}

.pswp .pswp__button--arrow--prev {
	left: 1rem;
}

.pswp .pswp__button--arrow--next {
	right: 1rem;
}

.pswp .pswp__button--arrow:hover {
	background: color-mix(in srgb, var(--wp--preset--color--white) 18%, transparent);
}

.pswp .pswp__button--arrow:focus-visible {
	outline: 2px solid color-mix(in srgb, var(--wp--preset--color--white) 80%, transparent);
	outline-offset: 2px;
}

.pswp .pswp__button--arrow::before {
	content: '';
	width: 18px;
	height: 18px;
	background-color: var(--wp--preset--color--white);
	mask-image: url("../icons/chevron.svg");
	-webkit-mask-image: url("../icons/chevron.svg");
	mask-size: contain;
	-webkit-mask-size: contain;
	mask-repeat: no-repeat;
	-webkit-mask-repeat: no-repeat;
	mask-position: center;
	-webkit-mask-position: center;
	opacity: 0.7;
	transition: opacity 0.15s ease;
}

.pswp .pswp__button--arrow--prev::before {
	transform: rotate(90deg);
}

.pswp .pswp__button--arrow--next::before {
	transform: rotate(-90deg);
}

.pswp .pswp__button--arrow:hover::before {
	opacity: 1;
}

.pswp:has(.pswp__thumbnails)::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: calc(var(--strip-h) + var(--strip-offset));
	background: linear-gradient(
		to top,
		var(--wp--preset--color--black),
		transparent
	);
	pointer-events: none;
	/* Sits below the strip (z-index: 10) but above the image. */
	z-index: 9;
	/* PhotoSwipe drops `pswp--ui-visible` before the close animation, so without a matching
	 * transition the gradient snaps out while the rest of the chrome fades. */
	opacity: 0;
	transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1);
}

.pswp--ui-visible:has(.pswp__thumbnails)::after {
	opacity: 1;
}

.pswp__thumbnail {
	flex: 0 0 auto;
	width: 64px;
	height: 64px;
	padding: 0;
	border: 2px solid transparent;
	background: none;
	cursor: pointer;
	opacity: 0.6;
	transition: opacity 0.15s, border-color 0.15s;
}

.pswp__thumbnail:hover,
.pswp__thumbnail:focus-visible {
	opacity: 1;
}

.pswp__thumbnail.is-active {
	opacity: 1;
	border-color: var(--wp--preset--color--white);
}

.pswp__thumbnail img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* 3. Lightbox-anchor shared rules — `[data-pswp-gallery] > a`, whichever block emitted it.
 *    `line-height: 0` fixes PhotoSwipe's morph origin on core/image (docs/runtimes.md). */

[data-pswp-gallery] > a {
	line-height: 0;
	position: relative;
	--nomon-zoom-icon: url("../icons/zoom-in.svg");
}

[data-pswp-gallery] > a::after {
	content: '';
	position: absolute;
	right: 0.75rem;
	bottom: 0.75rem;
	width: 2rem;
	height: 2rem;
	background-color: var(--wp--preset--color--white);
	mask-image: var(--nomon-zoom-icon);
	-webkit-mask-image: var(--nomon-zoom-icon);
	mask-size: contain;
	-webkit-mask-size: contain;
	mask-repeat: no-repeat;
	-webkit-mask-repeat: no-repeat;
	mask-position: center;
	-webkit-mask-position: center;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease-out;
}

/* Gated so the synthetic `:hover` mobile fires after touchstart doesn't flash the icon
 * for a frame before the lightbox opens. Keyboard gets it via `:focus-visible` below. */
@media (hover: hover) {
	[data-pswp-gallery] > a:hover::after {
		opacity: 1;
	}
}

[data-pswp-gallery] > a:focus-visible::after {
	opacity: 1;
}

/* Per-wrapper opt-out from nomon/gallery's `zoomIcon` toggle; core/image has no equivalent. */
.nomon-gallery--no-zoom-icon > a::after {
	content: none;
}

