/* Bild-Element mit Lightbox: Bild und Lupe darunter sind ein Button, die Großansicht ist ein <dialog> */
.lightbox-trigger { display: block; width: 100%; margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: inherit; cursor: zoom-in; }
.lightbox-trigger img, .lightbox-trigger picture { display: block; }
.lightbox-trigger:has(.mw-m) img, .lightbox-trigger:has(.mw-m) picture { margin-left: auto; margin-right: auto; }
.lightbox-trigger__icon { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin: 12px auto 0; border: 2px solid currentColor; border-radius: 50%; transition: background-color 160ms ease, color 160ms ease; }
.lightbox-trigger__icon svg { width: 20px; height: 20px; }
.lightbox-trigger:hover .lightbox-trigger__icon, .lightbox-trigger:focus-visible .lightbox-trigger__icon { background: currentColor; }
.lightbox-trigger:hover .lightbox-trigger__icon svg, .lightbox-trigger:focus-visible .lightbox-trigger__icon svg { color: #fff; }
.lightbox-trigger:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; overflow: hidden; }
.lightbox::backdrop { background: rgba(0, 0, 0, .88); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; animation: lightbox-in 200ms ease; }
.lightbox img { box-sizing: border-box; max-width: calc(100vw - 32px); max-height: calc(100dvh - 96px); width: auto; height: auto; object-fit: contain; padding: 24px; border-radius: 4px; cursor: zoom-out; }
.lightbox img[src$=".svg"] { width: min(calc(100vw - 32px), calc(100dvh - 96px), 1000px); }
.lightbox__close { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .15); color: #fff; cursor: pointer; }
.lightbox__close:hover, .lightbox__close:focus-visible { background: rgba(255, 255, 255, .3); }
.lightbox__close svg { width: 20px; height: 20px; }
@keyframes lightbox-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .lightbox[open] { animation: none; } }
