.astch-pswp-open,
.astch-pswp-open body {
  overflow: hidden !important;
  overscroll-behavior: none;
}

.astch-pswp-open {
  scrollbar-gutter: auto !important;
}

.astch-club-photos-pswp.pswp {
  width: 100dvw;
  height: 100dvh;
  min-height: 100%;
  background: #000;
  color: #fff;
  z-index: 1090;
  touch-action: none;
}

.astch-club-photos-pswp .pswp__bg {
  background: #000;
  opacity: 1;
}

.astch-club-photos-pswp .pswp__scroll-wrap,
.astch-club-photos-pswp .pswp__container,
.astch-club-photos-pswp .pswp__item,
.astch-club-photos-pswp .pswp__zoom-wrap {
  max-width: none;
  max-height: none;
}

.astch-club-photos-pswp .pswp__img {
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.astch-club-photos-pswp .pswp__top-bar {
  height: calc(52px + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  padding-right: env(safe-area-inset-right);
  padding-left: env(safe-area-inset-left);
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0));
}

.astch-club-photos-pswp .pswp__button {
  width: 52px;
  height: 52px;
  color: #fff;
  opacity: 0.92;
}

.astch-club-photos-pswp .pswp__button:hover,
.astch-club-photos-pswp .pswp__button:focus-visible {
  opacity: 1;
}

.astch-club-photos-pswp .pswp__button:focus-visible {
  outline: 3px solid #fff;
  outline-offset: -4px;
  border-radius: 0.35rem;
}

.astch-club-photos-pswp .pswp__counter {
  height: 52px;
  line-height: 52px;
  padding-inline-start: max(14px, env(safe-area-inset-left));
  color: #fff;
  font-size: 0.95rem;
  text-shadow: 0 1px 3px #000;
  opacity: 0.95;
}

.astch-club-photos-pswp .pswp__button--arrow {
  width: 58px;
  height: 72px;
  margin-top: -36px;
  background-color: rgba(0, 0, 0, 0.36);
  border-radius: 0.4rem;
}

.astch-club-photos-pswp .pswp__button--arrow--prev {
  margin-left: max(2px, env(safe-area-inset-left));
}

.astch-club-photos-pswp .pswp__button--arrow--next {
  margin-right: max(2px, env(safe-area-inset-right));
}

.astch-pswp-caption {
  position: absolute;
  z-index: 10;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  max-height: min(32dvh, 15rem);
  overflow: auto;
  padding: 2.5rem max(1rem, env(safe-area-inset-right)) max(0.8rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0));
  text-align: center;
  text-shadow: 0 1px 2px #000;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.astch-pswp-caption[hidden] {
  display: none;
}

.astch-club-photos-pswp:not(.pswp--ui-visible) .astch-pswp-caption {
  opacity: 0;
}

.astch-pswp-caption__title,
.astch-pswp-caption__text,
.astch-pswp-caption__album {
  display: block;
}

.astch-pswp-caption__title {
  font-size: clamp(1rem, 2.8vw, 1.3rem);
}

.astch-pswp-caption__text,
.astch-pswp-caption__album {
  font-size: clamp(0.8rem, 2.3vw, 1rem);
}

.astch-pswp-caption__album {
  color: rgba(255, 255, 255, 0.78);
}

.astch-pswp-icon {
  position: absolute;
  inset: 0;
  display: block;
  background: currentColor;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: 25px 25px;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: 25px 25px;
}

.astch-pswp-icon--play {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M8 5v14l11-7z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M8 5v14l11-7z'/%3E%3C/svg%3E");
}

.pswp__button--astch-autoplay.is-playing .astch-pswp-icon--play {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6 5h4v14H6zm8 0h4v14h-4z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6 5h4v14H6zm8 0h4v14h-4z'/%3E%3C/svg%3E");
}

.astch-pswp-icon--fullscreen {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 4h6v2H6v4H4zm10 0h6v6h-2V6h-4zm4 10h2v6h-6v-2h4zM4 14h2v4h4v2H4z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 4h6v2H6v4H4zm10 0h6v6h-2V6h-4zm4 10h2v6h-6v-2h4zM4 14h2v4h4v2H4z'/%3E%3C/svg%3E");
}

.pswp__button--astch-fullscreen.is-active .astch-pswp-icon--fullscreen {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M10 4v6H4V8h4V4zm4 0h2v4h4v2h-6zm6 10v2h-4v4h-2v-6zM4 14h6v6H8v-4H4z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M10 4v6H4V8h4V4zm4 0h2v4h4v2h-6zm6 10v2h-4v4h-2v-6zM4 14h6v6H8v-4H4z'/%3E%3C/svg%3E");
}

.astch-pswp-icon--download {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M11 4h2v9l3-3 1.4 1.4L12 16.8l-5.4-5.4L8 10l3 3zm-6 14h14v2H5z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M11 4h2v9l3-3 1.4 1.4L12 16.8l-5.4-5.4L8 10l3 3zm-6 14h14v2H5z'/%3E%3C/svg%3E");
}

@media (max-width: 575.98px) {
  .astch-club-photos-pswp .pswp__button {
    width: 48px;
    height: 48px;
  }

  .astch-club-photos-pswp .pswp__top-bar {
    height: calc(48px + env(safe-area-inset-top));
  }

  .astch-club-photos-pswp .pswp__counter {
    height: 48px;
    line-height: 48px;
    max-width: 62px;
    overflow: hidden;
  }

  .astch-club-photos-pswp .pswp__button--arrow {
    width: 50px;
    height: 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .astch-club-photos-pswp *,
  .astch-club-photos-pswp *::before,
  .astch-club-photos-pswp *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
