/* the lightbox of lightbox.js: the image or video of a link on a dark, blurred overlay, that fades in and out. A dialog over the whole page, also while it fades out, after it has left the top layer */ #lightbox { position: fixed; inset: 0; z-index: 9999999; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(0, 0, 0, .7); backdrop-filter: grayscale(1) blur(2px); color: #fff; font-family: sans-serif; cursor: pointer; -webkit-user-select: none; user-select: none; opacity: 0; transition: opacity .3s ease-in-out, display .3s allow-discrete; } #lightbox[open] { display: flex; align-items: center; justify-content: center; opacity: 1; } @starting-style { #lightbox[open] { opacity: 0; } } #lightbox::backdrop { background: none; } /* at most 1200px */ #lightbox img { width: auto; height: auto; max-width: min(100%, 1200px); max-height: min(100%, 1200px); } #lightbox iframe { width: min(100%, 1200px); max-height: 100%; aspect-ratio: 16 / 9; border: 0; background: #000; } #lightbox #prev, #lightbox #next { position: fixed; top: 50%; height: 50px; margin-top: -25px; padding: 0 15px; font-size: 60px; line-height: 36px; } #lightbox #prev { left: 0; } #lightbox #next { right: 0; } /* a white cross at the top right */ #lightbox #close { position: fixed; top: 0; right: 0; width: 50px; height: 50px; } #lightbox #close::before, #lightbox #close::after { content: ""; position: absolute; top: 22px; left: 14px; width: 23px; height: 2px; background: #fff; transform: rotate(-45deg); } #lightbox #close::after { transform: rotate(45deg); }