body.kachel-lightbox-open {
  overflow: hidden;
}

.has-kachel-lightbox .eintrag-inhalt img:not(.kachel-lightbox-image),
.has-kachel-lightbox .kachel-editorial-content img:not(.kachel-lightbox-image) {
  cursor: zoom-in;
}

.has-kachel-lightbox img[data-kachel-lightbox-trigger] {
  outline-offset: 4px;
}

.has-kachel-lightbox img[data-kachel-lightbox-trigger]:focus-visible {
  outline: 3px solid rgba(var(--kachel-content-akzent-rgb, 247, 148, 29), 0.38);
}

.kachel-lightbox {
  width: fit-content;
  max-width: 94vw;
  height: auto;
  max-height: 92vh;
  padding: 0;
  border: 0;
  border-radius: var(--radius, 8px);
  background: transparent;
  color: #fff;
  overflow: visible;
}

.kachel-lightbox[open] {
  position: fixed;
  inset: 50% auto auto 50%;
  z-index: 9999;
  display: block;
  margin: 0;
  transform: translate(-50%, -50%);
}

.kachel-lightbox::backdrop {
  background: rgba(20, 18, 18, 0.78);
  backdrop-filter: blur(4px);
}

.kachel-lightbox[open]::backdrop {
  animation: kachel-lightbox-backdrop 180ms ease-out both;
}

.kachel-lightbox[open] .kachel-lightbox-figure {
  animation: kachel-lightbox-pop 200ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.kachel-lightbox.is-open-fallback {
  position: fixed;
  inset: 50% auto auto 50%;
  z-index: 9999;
  display: block;
  transform: translate(-50%, -50%);
}

.kachel-lightbox.is-open-fallback::before {
  content: "";
  position: fixed;
  inset: -100vh -100vw;
  z-index: -1;
  background: rgba(20, 18, 18, 0.78);
  animation: kachel-lightbox-backdrop 180ms ease-out both;
}

.kachel-lightbox-figure {
  display: grid;
  place-items: center;
  gap: 12px;
  margin: 0;
  transform-origin: center center;
}

.kachel-lightbox-image {
  display: block;
  width: auto;
  max-width: 92vw;
  height: auto;
  max-height: 82vh;
  border-radius: var(--radius, 8px);
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  object-fit: contain;
}

.kachel-lightbox-caption {
  max-width: min(760px, 88vw);
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.92);
  font-family: var(--schrift-text, "Open Sans", Arial, sans-serif);
  font-size: 0.94rem;
  line-height: 1.5;
  text-align: center;
}

.kachel-lightbox-close {
  position: absolute;
  top: -16px;
  right: -16px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #262626;
  font-family: var(--schrift-display, "Open Sans", Arial, sans-serif);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
}

.kachel-lightbox-close:hover,
.kachel-lightbox-close:focus-visible {
  background: var(--kachel-content-akzent, #f49c00);
  color: #fff;
}

.kachel-lightbox-close:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.78);
  outline-offset: 3px;
}

@keyframes kachel-lightbox-pop {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.94);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes kachel-lightbox-backdrop {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kachel-lightbox[open]::backdrop,
  .kachel-lightbox[open] .kachel-lightbox-figure,
  .kachel-lightbox.is-open-fallback::before {
    animation: none;
  }
}

@media (max-width: 640px) {
  .kachel-lightbox {
    max-width: 94vw;
  }

  .kachel-lightbox-image {
    max-width: 92vw;
    max-height: 78vh;
  }

  .kachel-lightbox-close {
    top: -12px;
    right: -8px;
    width: 40px;
    height: 40px;
  }
}
