/* The lightbox of Photo Gallery on PhotoSwipe 5: the colors come as variables (--sgg-lb-bg, --sgg-lb-ui,
   --sgg-lb-accent, --sgg-lb-on-accent), the theme as the class sgg-lb--{theme}. */
.sgg-lb {
  --pswp-placeholder-bg: color-mix(in srgb, var(--sgg-lb-ui) 10%, var(--sgg-lb-bg));
  color: var(--sgg-lb-ui);
  font-family: inherit;
}
.sgg-lb .pswp__icn {
  fill: var(--sgg-lb-ui);
}
.sgg-lb .pswp__counter {
  color: var(--sgg-lb-ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  opacity: 0.8;
  text-shadow: none;
}
.sgg-lb .pswp__button {
  color: var(--sgg-lb-ui);
  opacity: 0.85;
  transition: opacity 0.2s;
}
.sgg-lb .pswp__button:hover,
.sgg-lb .pswp__button:focus-visible {
  opacity: 1;
}
.sgg-lb .pswp__button:focus-visible {
  outline: 2px solid var(--sgg-lb-accent);
  outline-offset: -4px;
}
.sgg-lb .sgg-lb-icn {
  width: 22px;
  height: 22px;
  margin: 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.sgg-lb .sgg-lb-icn .is-fill {
  fill: currentColor;
  stroke: none;
}
.sgg-lb .pswp__button--sgg-fs,
.sgg-lb .pswp__button--sgg-download,
.sgg-lb .pswp__button--sgg-share,
.sgg-lb .pswp__button--sgg-play {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  text-decoration: none;
}
.sgg-lb .pswp__button--sgg-download[hidden] {
  display: none;
}

/* ---------- Arrows: round, square, minimal (or none) */
.sgg-lb .pswp__button--arrow .pswp__icn {
  box-sizing: border-box;
  width: 46px;
  height: 46px;
  margin-top: -23px;
  padding: 9px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--sgg-lb-ui) 14%, transparent);
  transition: background-color 0.2s;
}
.sgg-lb .pswp__button--arrow--prev .pswp__icn {
  left: 16px;
}
.sgg-lb .pswp__button--arrow--next .pswp__icn {
  right: 16px;
}
.sgg-lb .pswp__button--arrow:hover .pswp__icn {
  background: color-mix(in srgb, var(--sgg-lb-ui) 24%, transparent);
}
.sgg-lb.sgg-lb-arrows-square .pswp__button--arrow .pswp__icn {
  border-radius: 10px;
}
.sgg-lb.sgg-lb-arrows-minimal .pswp__button--arrow .pswp__icn {
  padding: 4px;
  background: none;
}

/* ---------- Caption: a bar under the photo, over its lower edge, or a panel beside it */
.sgg-lb .pswp__sgg-caption {
  position: absolute;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 3px;
  box-sizing: border-box;
  color: var(--sgg-lb-ui);
  font-size: 14px;
  line-height: 1.45;
  pointer-events: none;
}
.sgg-lb .pswp__sgg-caption.is-empty {
  visibility: hidden;
}
.sgg-lb .sgg-lb-title {
  font-size: 15px;
  font-weight: 700;
}
.sgg-lb .sgg-lb-text {
  opacity: 0.8;
}
.sgg-lb.sgg-lb-cap-below .pswp__sgg-caption {
  right: 0;
  bottom: 0;
  left: 0;
  align-items: center;
  justify-content: center;
  min-height: 62px;
  padding: 10px 24px 14px;
  text-align: center;
}
.sgg-lb.sgg-lb-cap-below.sgg-lb-has-thumbs .pswp__sgg-caption {
  bottom: 86px;
}
.sgg-lb.sgg-lb-cap-overlay .pswp__sgg-caption {
  right: 0;
  bottom: 0;
  left: 0;
  padding: 70px 28px 24px;
  background: linear-gradient(to top, color-mix(in srgb, var(--sgg-lb-bg) 88%, transparent), transparent);
}
.sgg-lb.sgg-lb-cap-overlay.sgg-lb-has-thumbs .pswp__sgg-caption {
  bottom: 86px;
}
.sgg-lb.sgg-lb-cap-side .pswp__sgg-caption {
  top: 0;
  right: 0;
  bottom: 0;
  justify-content: center;
  width: 340px;
  padding: 80px 32px 40px;
  border-left: 1px solid color-mix(in srgb, var(--sgg-lb-ui) 12%, transparent);
  background: color-mix(in srgb, var(--sgg-lb-ui) 5%, var(--sgg-lb-bg));
  pointer-events: auto;
  overflow-y: auto;
}
.sgg-lb.sgg-lb-cap-side .sgg-lb-title {
  font-size: 22px;
  line-height: 1.25;
}
.sgg-lb.sgg-lb-cap-side .sgg-lb-text {
  font-size: 15px;
}
.sgg-lb.sgg-lb-cap-side .pswp__top-bar {
  right: 340px;
  width: auto;
}
.sgg-lb.sgg-lb-cap-side .pswp__button--arrow--next {
  right: 340px;
}

/* ---------- Thumbnails under the photo */
.sgg-lb .pswp__sgg-thumbs {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  gap: 8px;
  box-sizing: border-box;
  height: 86px;
  padding: 12px 18px;
  overflow-x: auto;
  scrollbar-width: none;
}
.sgg-lb .pswp__sgg-thumbs::-webkit-scrollbar {
  display: none;
}
.sgg-lb .sgg-lb-thumb {
  position: relative;
  flex: none;
  width: 62px;
  height: 62px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: color-mix(in srgb, var(--sgg-lb-ui) 12%, transparent);
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s, box-shadow 0.2s;
}
/* Centred while the strip fits, scrollable when it does not */
.sgg-lb .sgg-lb-thumb:first-child {
  margin-left: auto;
}
.sgg-lb .sgg-lb-thumb:last-child {
  margin-right: auto;
}
.sgg-lb .sgg-lb-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sgg-lb .sgg-lb-thumb:hover,
.sgg-lb .sgg-lb-thumb:focus-visible {
  opacity: 0.85;
  outline: none;
}
.sgg-lb .sgg-lb-thumb.is-current {
  box-shadow: 0 0 0 2px var(--sgg-lb-accent);
  opacity: 1;
}

/* ---------- Slideshow line, share menu, video */
.sgg-lb .pswp__sgg-progress {
  position: absolute;
  z-index: 4;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: color-mix(in srgb, var(--sgg-lb-ui) 14%, transparent);
  pointer-events: none;
}
.sgg-lb .pswp__sgg-progress i {
  display: block;
  height: 100%;
  background: var(--sgg-lb-accent);
  transform: scaleX(0);
  transform-origin: left center;
}
.sgg-lb .pswp__button--sgg-play[aria-pressed='true'] {
  color: var(--sgg-lb-accent);
  opacity: 1;
}
.sgg-lb .sgg-lb-share {
  position: absolute;
  z-index: 5;
  top: 60px;
  right: 16px;
  display: flex;
  flex-direction: column;
  min-width: 180px;
  padding: 6px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--sgg-lb-ui) 10%, var(--sgg-lb-bg));
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.6);
}
.sgg-lb .sgg-lb-share[hidden] {
  display: none;
}
.sgg-lb .sgg-lb-share a,
.sgg-lb .sgg-lb-share button {
  padding: 9px 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--sgg-lb-ui);
  font: inherit;
  font-size: 14px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.sgg-lb .sgg-lb-share a:hover,
.sgg-lb .sgg-lb-share button:hover {
  background: color-mix(in srgb, var(--sgg-lb-ui) 12%, transparent);
}
.sgg-lb .sgg-lb-video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(90vw, 1280px, calc(80vh * 16 / 9));
  aspect-ratio: 16 / 9;
  transform: translate(-50%, -50%);
}
.sgg-lb .sgg-lb-video iframe,
.sgg-lb .sgg-lb-video video {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 10px;
  background: #000;
}

/* ---------- Themes */
/* Light: soft shadow under the photo, dark controls */
.sgg-lb--light .pswp__img {
  box-shadow: 0 24px 60px -24px rgba(15, 23, 42, 0.35);
}
/* Glass: the page shows through a blur */
/* The blur sits on the root: the root fades in with will-change: opacity, so a blur on an inner layer would see
   nothing of the page */
.pswp.sgg-lb--glass {
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
}
.sgg-lb--glass .pswp__bg {
  background: color-mix(in srgb, var(--sgg-lb-bg) 55%, transparent);
}
.sgg-lb--glass .pswp__img {
  border-radius: 14px;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.6);
}
.sgg-lb--glass.sgg-lb-cap-overlay .pswp__sgg-caption {
  right: 50%;
  bottom: 22px;
  left: auto;
  width: min(560px, calc(100% - 32px));
  padding: 14px 18px;
  border: 1px solid color-mix(in srgb, #ffffff 30%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--sgg-lb-bg) 45%, transparent);
  transform: translateX(50%);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
/* Minimal and Cinema: thin controls that show while the mouse moves */
.sgg-lb--minimal .pswp__top-bar,
.sgg-lb--minimal .pswp__button--arrow,
.sgg-lb--cinema .pswp__top-bar,
.sgg-lb--cinema .pswp__button--arrow {
  opacity: 0;
  transition: opacity 0.35s;
}
.sgg-lb--minimal.sgg-lb-awake .pswp__top-bar,
.sgg-lb--minimal.sgg-lb-awake .pswp__button--arrow,
.sgg-lb--cinema.sgg-lb-awake .pswp__top-bar,
.sgg-lb--cinema.sgg-lb-awake .pswp__button--arrow {
  opacity: 1;
}
.sgg-lb--minimal .pswp__button--arrow .pswp__icn,
.sgg-lb--cinema .pswp__button--arrow .pswp__icn {
  padding: 4px;
  background: none;
}
/* Polaroid: a white frame with room under the photo for the caption */
.sgg-lb--polaroid .pswp__img {
  box-shadow: 0 0 0 14px #fffdf8, 0 0 0 15px rgba(63, 58, 51, 0.08), 0 40px 80px -30px rgba(63, 58, 51, 0.55);
}
.sgg-lb--polaroid .pswp__sgg-caption {
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
}
.sgg-lb--polaroid .sgg-lb-title {
  font-weight: 400;
  font-size: 18px;
}
/* Filmstrip: the strip on a slightly lighter band */
.sgg-lb--filmstrip .pswp__sgg-thumbs {
  background: color-mix(in srgb, var(--sgg-lb-ui) 6%, var(--sgg-lb-bg));
}

/* Phones: the side panel becomes a sheet under the photo, the strip and the caption get smaller */
@media (max-width: 699px) {
  .sgg-lb.sgg-lb-cap-side .pswp__sgg-caption {
    top: auto;
    width: auto;
    left: 0;
    max-height: 96px;
    padding: 12px 18px;
    border-top: 1px solid color-mix(in srgb, var(--sgg-lb-ui) 12%, transparent);
    border-left: 0;
  }
  .sgg-lb.sgg-lb-cap-side .pswp__top-bar {
    right: 0;
  }
  .sgg-lb.sgg-lb-cap-side .pswp__button--arrow--next {
    right: 0;
  }
  .sgg-lb .pswp__sgg-thumbs {
    height: 66px;
    padding: 8px 12px;
  }
  .sgg-lb .sgg-lb-thumb {
    width: 50px;
    height: 50px;
  }
  .sgg-lb.sgg-lb-has-thumbs .pswp__sgg-caption {
    bottom: 66px;
  }
  .sgg-lb.sgg-lb-cap-side.sgg-lb-has-thumbs .pswp__sgg-caption {
    bottom: 66px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sgg-lb .pswp__sgg-progress i {
    transition: none !important;
  }
}
