/**
 * Play Matters editorial lightbox skin.
 *
 * The article Gallery grid stays owned by style.css. These rules apply only to
 * PhotoSwipe's open overlay after an approved gallery or marked image is used.
 */

.pm-gallery-lightbox {
  --pswp-bg: #10263a;
  --pswp-placeholder-bg: #10263a;
  --pswp-root-z-index: 100000;
  --pswp-icon-color: #fffaf1;
  --pswp-icon-color-secondary: #10263a;
  --pswp-error-text-color: #fffaf1;
  color: #fffaf1;
  font-family: "Source Sans 3", system-ui, sans-serif;
}

.pm-gallery-lightbox .pswp__top-bar {
  height: 64px;
  background: linear-gradient(180deg, rgb(16 38 58 / 92%), rgb(16 38 58 / 0%));
}

.pm-gallery-lightbox .pswp__counter {
  height: 46px;
  margin-block-start: 8px;
  margin-inline-start: 14px;
  padding: 0 12px;
  color: #fffaf1;
  font-family: "Bricolage Grotesque", "Source Sans 3", system-ui, sans-serif;
  font-size: 1rem;
  font-variation-settings: "wght" 650;
  line-height: 46px;
  opacity: 1;
}

.pm-gallery-lightbox .pswp__button {
  min-width: 46px;
  min-height: 46px;
  color: #fffaf1;
  opacity: 1;
}

.pm-gallery-lightbox .pswp__button--close {
  margin-block-start: 8px;
  margin-inline-end: 10px;
  border-radius: 999px;
  background: rgb(162 72 53 / 88%);
}

.pm-gallery-lightbox .pswp__button--arrow {
  --pswp-icon-color: #fffaf1;
  width: 54px;
  height: 54px;
  margin-top: -27px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.pm-gallery-lightbox .pswp__button--arrow .pswp__icn {
  top: 50%;
  left: 50%;
  right: auto;
  width: 46px;
  height: 46px;
  margin: 0;
  transform: translate(-50%, -50%);
}

.pm-gallery-lightbox .pswp__button--arrow--prev {
  left: 14px;
}

.pm-gallery-lightbox .pswp__button--arrow--next {
  right: 14px;
}

.pm-gallery-lightbox .pswp__button--arrow--next .pswp__icn {
  left: 50%;
  right: auto;
  transform: translate(-50%, -50%) scale(-1, 1);
}

.pm-gallery-lightbox .pswp__button--close:hover {
  background-color: #a24835;
}

@media (hover: hover) {
  .pm-gallery-lightbox .pswp__button--arrow:hover {
    --pswp-icon-color: #b5523a;
    background: transparent;
  }
}

.pm-gallery-lightbox .pswp__button:focus-visible {
  outline: 3px solid #fffaf1;
  outline-offset: 2px;
  box-shadow: 0 0 0 5px #a24835;
}

.pm-gallery-lightbox .pswp__button--arrow:focus-visible {
  --pswp-icon-color: #fffaf1;
  border-radius: 4px;
  background: transparent;
  outline: 3px solid #fffaf1;
  outline-offset: 2px;
  box-shadow: none;
}

.pm-gallery-lightbox .pswp__button[disabled] {
  cursor: default;
  opacity: 0.36;
}

.pm-gallery-lightbox .pm-lightbox-caption {
  position: absolute;
  z-index: 20;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  gap: 4px;
  min-height: 92px;
  box-sizing: border-box;
  padding: 16px clamp(20px, 7vw, 112px) 18px;
  border-top: 1px solid rgb(255 250 241 / 26%);
  background: rgb(16 38 58 / 92%);
  color: #fffaf1;
  pointer-events: none;
}

.pm-gallery-lightbox .pm-lightbox-caption[hidden],
.pm-gallery-lightbox .pm-lightbox-caption__text[hidden],
.pm-gallery-lightbox .pm-lightbox-caption__credit[hidden] {
  display: none;
}

.pm-gallery-lightbox .pm-lightbox-caption__text,
.pm-gallery-lightbox .pm-lightbox-caption__credit {
  max-width: 76rem;
  margin: 0 auto;
  text-wrap: pretty;
}

.pm-gallery-lightbox .pm-lightbox-caption__text {
  font-family: "Bricolage Grotesque", "Source Sans 3", system-ui, sans-serif;
  font-size: clamp(1rem, 1.2vw, 1.18rem);
  font-variation-settings: "wght" 600;
  line-height: 1.35;
}

.pm-gallery-lightbox .pm-lightbox-caption__credit {
  color: rgb(255 250 241 / 82%);
  font-size: 0.9rem;
  line-height: 1.4;
}

@media (max-width: 699px) {
  .pm-gallery-lightbox .pswp__top-bar {
    height: 58px;
  }

  .pm-gallery-lightbox .pswp__counter {
    margin-block-start: 4px;
    margin-inline-start: 4px;
  }

  .pm-gallery-lightbox .pswp__button--close {
    margin-block-start: 4px;
    margin-inline-end: 4px;
  }

  .pm-gallery-lightbox.pswp--touch .pswp__button--arrow {
    visibility: visible;
  }

  .pm-gallery-lightbox .pswp__button--arrow {
    width: 46px;
    height: 46px;
    margin-top: -23px;
    background: transparent;
  }

  .pm-gallery-lightbox .pswp__button--arrow .pswp__icn {
    width: 40px;
    height: 40px;
  }

  .pm-gallery-lightbox .pswp__button--arrow--prev {
    left: 4px;
  }

  .pm-gallery-lightbox .pswp__button--arrow--next {
    right: 4px;
  }

  .pm-gallery-lightbox .pm-lightbox-caption {
    min-height: 118px;
    max-height: 34vh;
    overflow-y: auto;
    padding: 12px 18px calc(14px + env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .pm-gallery-lightbox,
  .pm-gallery-lightbox *,
  .pm-gallery-lightbox *::before,
  .pm-gallery-lightbox *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
