/* Lightbox (assets/js/lightbox.js) – new, the source has none. Colours and radii from the source tokens. */

.lightbox-link { display: block; cursor: zoom-in; }
.lightbox-link:focus-visible { outline: 3px solid var(--marke-500); outline-offset: 2px; }

.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: rgba(12, 18, 32, 0.94); color: #fff;
}
.lightbox::backdrop { background: rgba(12, 18, 32, 0.94); }
.lightbox[open] { display: grid; place-items: center; animation: lightbox-auf 160ms ease-out; }
@keyframes lightbox-auf { from { opacity: 0; } to { opacity: 1; } }
.lightbox--ruhig[open] { animation: none; }
@media (prefers-reduced-motion: reduce) { .lightbox[open] { animation: none; } }

.lightbox__figur { margin: 0; display: grid; justify-items: center; gap: 0.75rem; padding: 3.5rem 4.5rem; max-width: 100%; max-height: 100%; }
.lightbox__bild { display: block; max-width: 100%; max-height: calc(100dvh - 9rem); width: auto; height: auto; object-fit: contain; box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.7); }
.lightbox__text { max-width: 70ch; text-align: center; font-size: 0.95rem; line-height: 1.45; color: rgba(255, 255, 255, 0.88); }
.lightbox__zahl { position: absolute; top: 1rem; left: 1.25rem; margin: 0; font-size: 0.9rem; color: rgba(255, 255, 255, 0.8); }

.lightbox__knopf {
  position: absolute; display: grid; place-items: center;
  width: 3rem; height: 3rem; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.12); color: #fff; cursor: pointer;
}
.lightbox__knopf .icon { width: 1.4rem; height: 1.4rem; }
.lightbox__knopf:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
@media (hover: hover) { .lightbox__knopf:hover { background: var(--marke); } }
.lightbox__zu { top: 0.75rem; right: 0.75rem; }
.lightbox__zurueck, .lightbox__weiter { top: 50%; transform: translateY(-50%); }
.lightbox__zurueck { left: 0.75rem; }
.lightbox__weiter { right: 0.75rem; }
.lightbox__weiter .icon { transform: rotate(180deg); }
.lightbox__knopf[hidden] { display: none; }

/* Small screens: image edge to edge, arrows at the bottom so they do not cover the photo. */
@media (max-width: 700px) {
  .lightbox__figur { padding: 3.5rem 0 5rem; }
  .lightbox__bild { max-height: calc(100dvh - 10rem); }
  .lightbox__text { padding-inline: 1rem; }
  .lightbox__zurueck, .lightbox__weiter { top: auto; bottom: 1rem; transform: none; }
  .lightbox__zurueck { left: calc(50% - 3.5rem); }
  .lightbox__weiter { right: calc(50% - 3.5rem); }
}

html.lightbox-offen { overflow: hidden; }
