/*
 * login-show.css — styles for js/login-show.js: full-screen slideshow or looping video behind a login form
 * (or any page), with fade, slide and slow-zoom effects, captions and a darkening layer.
 *
 * Put the .login-show box anywhere in <body>; it covers the window (position: fixed, z-index 0).
 * Everything that should be on top needs its own stacking above it, e.g. add class "has-show" to
 * <body> and use the rules at the end. Don't give the slideshow's parent a z-index of its own:
 * that makes a new stacking context and the pictures can end up on top of the header.
 * Preview in a box (e.g. on a settings page): wrap it in .ls-preview.
 * Uses var(--surface), var(--radius) from css/base.css (with fallbacks).
 * Origin: Multimedia book app (from MiGit bibliotek css/login-show.css)
 */
.login-show { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: #111; pointer-events: none; }
.login-show .ls-slide { position: absolute; inset: 0; margin: 0; opacity: 0; }
.login-show .ls-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* video instead of pictures: <video class="ls-video" autoplay muted loop playsinline poster="…"> */
.login-show .ls-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; z-index: 1; }
.login-show .ls-slide.is-on { opacity: 1; z-index: 2; }
.login-show .ls-slide.was-on { z-index: 1; }
.login-show .ls-dim { position: absolute; inset: 0; z-index: 3; background: #000; opacity: .35; }
.login-show figcaption {
    position: absolute; left: 1.2rem; bottom: 3.4rem; z-index: 4; max-width: min(36rem, 70%);
    color: #fff; font-size: 1rem; line-height: 1.4; text-shadow: 0 1px 6px rgba(0,0,0,.7);
    opacity: 0; transition: opacity .8s ease .6s;
}
.login-show .ls-slide.is-on figcaption { opacity: .95; }
.login-show.ls-ready .ls-slide { transition: opacity 1.2s ease; }
.login-show.ls-ready.ls-calm .ls-slide { transition-duration: 2.4s; }
/* slide: the new picture comes in from the end side, the old one leaves */
.login-show.ls-ready.fx-slide .ls-slide { opacity: 1; transform: translateX(100%); transition: none; }
.login-show.ls-ready.fx-slide .ls-slide.is-on { transform: translateX(0); transition: transform 1.1s cubic-bezier(.6,.05,.25,1); }
.login-show.ls-ready.fx-slide .ls-slide.was-on { transform: translateX(-100%); transition: transform 1.1s cubic-bezier(.6,.05,.25,1); }
[dir="rtl"] .login-show.ls-ready.fx-slide .ls-slide { transform: translateX(-100%); }
[dir="rtl"] .login-show.ls-ready.fx-slide .ls-slide.was-on { transform: translateX(100%); }
/* zoom: slow "Ken Burns" push-in while the picture is shown */
.login-show.fx-zoom .ls-slide.is-on img, .login-show.fx-zoom .ls-slide.was-on img { animation: ls-zoom var(--ls-dur, 9s) linear both; }
@keyframes ls-zoom { from { transform: scale(1); } to { transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .login-show .ls-slide img { animation: none !important; } }

/* page content on top of the pictures: <body class="has-show">, form in .ls-card */
body.has-show { background: #111; }
body.has-show > :not(.login-show), body.has-show .ls-above { position: relative; z-index: 1; }
body.has-show .ls-card {
    background: color-mix(in srgb, var(--surface, #fff) 90%, transparent);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 18px 50px rgba(0,0,0,.35); margin-top: 12vh;
}
@media (max-width: 600px) { body.has-show .ls-card { margin-top: 4vh; } .login-show figcaption { bottom: 4.2rem; font-size: .9rem; } }

/* preview in a box */
.ls-preview { position: relative; aspect-ratio: 16 / 9; max-height: 320px; width: 100%; border-radius: var(--radius, 10px); overflow: hidden; background: #2a2622; container-type: inline-size; }
.ls-preview .login-show { position: absolute; }
.ls-preview .login-show figcaption { font-size: max(.7rem, 2.4cqw); bottom: 1rem; left: .8rem; }
