/* Meska Lightbox: schlank, mobilfreundlich, ohne sichtbare Bildtexte */
body.msk-lightbox-open {
  overflow: hidden;
  touch-action: none;
}

.msk-lightbox {
  position: fixed;
  inset: 0;
  z-index: 300000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(14px, 3vw, 34px);
  background: rgba(15, 15, 17, .96);
  color: #fff;
  opacity: 0;
  transition: opacity .18s ease;
  box-sizing: border-box;
}

.msk-lightbox,
.msk-lightbox * {
  box-sizing: border-box;
}

.msk-lightbox.is-open {
  display: flex;
}

.msk-lightbox.is-visible {
  opacity: 1;
}

.msk-lightbox__stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.msk-lightbox__image-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.msk-lightbox__image {
  display: block;
  max-width: min(100%, 1500px);
  max-height: calc(100vh - 92px);
  width: auto;
  height: auto;
  object-fit: contain;
  border: 0;
  border-radius: 0;
  box-shadow: 0 22px 80px rgba(0, 0, 0, .48);
  background: rgba(255, 255, 255, .04);
  opacity: 1;
  transform: scale(1);
  transition: opacity .16s ease, transform .16s ease;
  user-select: none;
  -webkit-user-drag: none;
}

.msk-lightbox.is-loading .msk-lightbox__image {
  opacity: .28;
  transform: scale(.995);
}

.msk-lightbox__spinner {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 3px solid rgba(255, 255, 255, .24);
  border-top-color: #e31c79;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  animation: msk-lightbox-spin .8s linear infinite;
  transition: opacity .12s ease;
}

.msk-lightbox.is-loading .msk-lightbox__spinner {
  opacity: 1;
}

@keyframes msk-lightbox-spin {
  to { transform: rotate(360deg); }
}

.msk-lightbox__button {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(27, 27, 29, .82);
  color: #fff;
  font-family: Arial, sans-serif;
  font-weight: 400;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .14s ease, color .14s ease, transform .14s ease, opacity .14s ease;
  -webkit-tap-highlight-color: transparent;
}

.msk-lightbox__button .fa {
  display: block;
  width: auto;
  height: auto;
  margin: 0;
  color: inherit;
  font-size: inherit;
  line-height: 1;
}

.msk-lightbox__button:hover,
.msk-lightbox__button:focus-visible {
  background: #e31c79;
  color: #fff;
  outline: none;
}

.msk-lightbox__button:active {
  transform: scale(.96);
}

.msk-lightbox__button[hidden] {
  display: none !important;
}

.msk-lightbox__close {
  right: clamp(12px, 2.5vw, 28px);
  top: clamp(12px, 2.5vw, 28px);
  width: 44px;
  height: 44px;
  border-radius: 4px;
  font-size: 34px;
}

.msk-lightbox__prev,
.msk-lightbox__next {
  top: 50%;
  width: 48px;
  height: 48px;
  margin-top: -24px;
  border-radius: 4px;
  font-size: 34px;
  background: rgba(27, 27, 29, .76);
}

.msk-lightbox__prev {
  left: clamp(12px, 2.5vw, 30px);
}

.msk-lightbox__next {
  right: clamp(12px, 2.5vw, 30px);
}

.msk-lightbox__counter {
  position: absolute;
  right: clamp(66px, calc(2.5vw + 54px), 86px);
  top: clamp(12px, 2.5vw, 28px);
  bottom: auto;
  left: auto;
  z-index: 2;
  transform: none;
  min-width: 54px;
  padding: .34rem .62rem;
  border-radius: 4px;
  background: rgba(27, 27, 29, .76);
  color: rgba(255, 255, 255, .88);
  font-family: Arial, sans-serif;
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  letter-spacing: .02em;
}

.msk-lightbox__counter[hidden] {
  display: none !important;
}

.entry-content .wp-block-jetpack-tiled-gallery a,
.entry-content .wp-block-image a,
.entry-content .gallery a {
  cursor: zoom-in;
}

@media (max-width: 780px) {
  .msk-lightbox {
    padding: 0;
  }

  .msk-lightbox__image {
    max-width: 100vw;
    max-height: 100vh;
    box-shadow: none;
  }

  .msk-lightbox__close {
    top: max(10px, env(safe-area-inset-top));
    right: max(10px, env(safe-area-inset-right));
    width: 42px;
    height: 42px;
    border-radius: 4px;
    background: rgba(15, 15, 17, .66);
    font-size: 32px;
  }

  .msk-lightbox__prev,
  .msk-lightbox__next {
    display: none !important;
  }

  .msk-lightbox__counter {
    top: max(10px, env(safe-area-inset-top));
    right: calc(max(10px, env(safe-area-inset-right)) + 50px);
    bottom: auto;
    background: rgba(15, 15, 17, .66);
  }
}

@media (max-width: 520px) {
  .msk-lightbox__close {
    width: 40px;
    height: 40px;
    font-size: 31px;
  }

  .msk-lightbox__counter {
    right: calc(max(10px, env(safe-area-inset-right)) + 48px);
    padding: .32rem .56rem;
    font-size: .78rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .msk-lightbox,
  .msk-lightbox__image,
  .msk-lightbox__button,
  .msk-lightbox__spinner {
    transition: none;
    animation: none;
  }
}
