/* Lozis World – Popup unten rechts: Werbevideo + angehängter Demo-Streifen.
   Gleiches Aussehen wie auf der Startseite (index.html), hier als eigene Datei,
   damit es auch auf Seiten mit strenger CSP (keine Inline-Stile) funktioniert.
   Eingebunden in: lernspiel/anmelden.php, tools/zusatzabenteuer-demo.php
   ## HIER ÄNDERN: Breite über --popup-breite. */

/* Seiten-Styles (z. B. lernspiel/assets/style.css) geben button/input Breite, Abstände usw. –
   hier zurücksetzen. :where() hält die Spezifität niedrig, damit die Klassen unten gewinnen. */
:where(.promo-popup) button{display:inline-block;width:auto;min-height:0;margin:0;box-shadow:none;filter:none;text-transform:none;letter-spacing:normal;line-height:1.2}
:where(.promo-popup) input{display:block;width:auto;min-height:0;padding:0;border:0;border-radius:0;box-shadow:none}
:where(.promo-popup) a{text-decoration:none}
.promo-popup,.promo-popup *{box-sizing:border-box}

.promo-popup{--popup-breite:clamp(280px,25vw,380px);position:fixed;z-index:50;right:max(18px,env(safe-area-inset-right));bottom:max(18px,env(safe-area-inset-bottom));width:min(var(--popup-breite),calc(100% - 24px));transform-origin:100% 100%;font-family:"Trebuchet MS",Arial,sans-serif;text-align:left;animation:demo-pulse 2.4s ease-in-out infinite}
.promo-popup[hidden]{display:none}
.promo-popup.is-playing{animation:none}
.promo-popup__box{border-radius:14px;overflow:hidden;border:1px solid #ffe4ad;background:#0b2229;animation:demo-glow 2.4s ease-in-out infinite}
.promo-popup.is-playing .promo-popup__box{animation:none;box-shadow:0 20px 60px #0009,0 0 24px #ffd17b70}
.promo-video{position:relative;aspect-ratio:16/9;background:#0b2229}
/* Qualitätswahl oben links im Video (Auto / HD / 720p / 360p) */
.promo-video__bar{position:absolute;z-index:3;top:7px;left:7px;display:flex;gap:5px;transition:opacity .3s}
.promo-video__q,.promo-video__fs{padding:4px 9px;border-radius:20px;border:1px solid #ffe4ad80;background:#0b2229cc;color:#fff5dc;font:bold 11px/1.2 "Trebuchet MS",Arial,sans-serif;cursor:pointer}
.promo-video__fs{padding:4px 8px}
.promo-video__q:hover,.promo-video__fs:hover{background:#16404a}
/* Vollbild für den ganzen Player (Video + Qualitätswahl) */
.promo-video:fullscreen{aspect-ratio:auto;width:100%;height:100%;background:#000}
.promo-video:-webkit-full-screen{aspect-ratio:auto;width:100%;height:100%;background:#000}
.promo-video:fullscreen video{object-fit:contain;background:#000}
.promo-video:-webkit-full-screen video{object-fit:contain;background:#000}
.promo-video:fullscreen .promo-video__bar{top:18px;left:18px;gap:8px}
.promo-video:fullscreen :is(.promo-video__q,.promo-video__fs){padding:8px 14px;font-size:15px}
.promo-video:fullscreen .promo-video__menu{top:62px;left:18px;min-width:170px}
.promo-video:fullscreen .promo-video__menu button{padding:10px 13px;font-size:15px}
.promo-video:fullscreen .promo-popup__close{display:none}
/* Eigene Steuerleiste unten – erst nach dem Start sichtbar */
.promo-video__ctrl{position:absolute;z-index:3;left:0;right:0;bottom:0;display:none;align-items:center;gap:7px;padding:16px 8px 6px;background:linear-gradient(0deg,#0b2229e6,#0b222900);color:#fff5dc;font:bold 11px/1 "Trebuchet MS",Arial,sans-serif;transition:opacity .3s}
.promo-video.is-started .promo-video__ctrl{display:flex}
.promo-video__ctrl button{flex:none;display:grid;place-items:center;width:28px;height:28px;padding:0;border:0;border-radius:50%;background:#0b2229b3;color:#fff5dc;font-size:12px;cursor:pointer}
.promo-video__ctrl button:hover{background:#16404a}
.promo-video__ctrl .pv-pp{background:linear-gradient(110deg,#ffe0a0,#f8b75b);color:#372410}
.pv-seek{flex:1 1 auto;min-width:40px;height:16px;margin:0;background:none;cursor:pointer;-webkit-appearance:none;appearance:none}
.pv-seek::-webkit-slider-runnable-track{height:4px;border-radius:4px;background:linear-gradient(90deg,#ffd17b var(--pv-fill,0%),#ffffff40 var(--pv-fill,0%))}
.pv-seek::-webkit-slider-thumb{-webkit-appearance:none;width:12px;height:12px;margin-top:-4px;border-radius:50%;background:#ffd17b;border:0}
.pv-seek::-moz-range-track{height:4px;border-radius:4px;background:#ffffff40}
.pv-seek::-moz-range-progress{height:4px;border-radius:4px;background:#ffd17b}
.pv-seek::-moz-range-thumb{width:12px;height:12px;border-radius:50%;background:#ffd17b;border:0}
.pv-time{flex:none;font-weight:normal;font-variant-numeric:tabular-nums;white-space:nowrap}
.promo-popup .pv-time{display:none}
.promo-popup .promo-video:fullscreen .pv-time{display:inline}
.promo-video:focus{outline:none}
.promo-video:fullscreen .promo-video__ctrl{gap:12px;padding:40px 22px 18px;font-size:15px}
.promo-video:fullscreen .promo-video__ctrl button{width:42px;height:42px;font-size:17px}
.promo-video:fullscreen .pv-seek{height:22px}
.promo-video.is-idle .promo-video__ctrl{opacity:0;pointer-events:none}
.promo-video.is-idle .promo-video__bar{opacity:0;pointer-events:none}
.promo-video.is-idle{cursor:none}
.promo-video__menu{position:absolute;z-index:4;top:34px;left:7px;min-width:122px;padding:4px;border-radius:10px;background:#0b2229f2;border:1px solid #ffe4ad80;box-shadow:0 10px 30px #0008}
.promo-video__menu[hidden]{display:none}
.promo-video__menu button{display:block;width:100%;padding:6px 10px;border:0;border-radius:6px;background:none;color:#fff5dc;font:12px/1.2 "Trebuchet MS",Arial,sans-serif;text-align:left;cursor:pointer}
.promo-video__menu button:hover{background:#ffffff18}
.promo-video__menu button[aria-checked="true"]{color:#ffd17b;font-weight:bold}
.promo-video__menu button[aria-checked="true"]::before{content:"✓ "}
.promo-video video{display:block;width:100%;height:100%;object-fit:cover;background:#0b2229}
.promo-video__play{position:absolute;inset:0;display:flex;align-items:flex-end;justify-content:center;width:100%;border:0;border-radius:0;padding:0 0 9px;background:radial-gradient(circle at 50% 45%,#0b222900 20%,#0b222960 75%);color:#fff5dc;cursor:pointer}
.promo-video__play[hidden]{display:none}
.promo-video__icon{position:absolute;left:50%;top:45%;transform:translate(-50%,-50%);display:grid;place-items:center;width:56px;aspect-ratio:1;border-radius:50%;background:linear-gradient(110deg,#ffe0a0,#f8b75b);color:#372410;font-size:22px;padding-left:.18em;box-shadow:0 0 0 7px #ffd17b33,0 8px 24px #0008;transition:transform .2s}
.promo-video__play:hover .promo-video__icon,.promo-video__play:focus-visible .promo-video__icon{transform:translate(-50%,-50%) scale(1.08)}
.promo-video__label{padding:4px 11px;border-radius:30px;background:#0b2229d9;border:1px solid #ffe4ad80;font-weight:bold;font-size:11px;letter-spacing:.3px}
.promo-video__label small{margin-left:5px;font-weight:normal;font-size:10px;color:#ebcb8d}
/* Schmaler Demo-Streifen direkt unter dem Video */
.demo-strip{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 12px 9px 14px;border-top:1px solid #ffe4ad66;background:linear-gradient(140deg,#16404a,#102c32 60%,#0b2229);color:#fff5dc;text-decoration:none}
.demo-strip:hover{filter:brightness(1.1)}
.demo-strip>span:first-child{min-width:0}
.demo-strip strong{display:block;font:normal 15px/1.15 Georgia,serif;color:#ffd17b;text-wrap:balance}
.demo-strip small{display:block;margin-top:2px;font-size:10px;color:#d1dcd5}
.demo-strip .demo-go{flex:none;display:inline-flex;align-items:center;gap:7px;padding:7px 11px;border-radius:5px;background:linear-gradient(110deg,#ffe0a0,#f8b75b);color:#372410;font-weight:bold;font-size:11px;white-space:nowrap}
/* Schließen-Knopf oben rechts auf dem Video (schließt das ganze Popup) */
.promo-popup__close{position:absolute;z-index:2;top:7px;right:7px;width:28px;height:28px;padding:0;border:1px solid #ffe4ad80;border-radius:50%;background:#0b2229cc;color:#fff5dc;font-size:18px;line-height:1;cursor:pointer}
.promo-popup__close:hover{background:#16404a}
@media(max-width:759px){.promo-popup{right:12px;bottom:12px;--popup-breite:215px}.demo-strip{padding:7px 8px 7px 10px;gap:7px}.demo-strip strong{font-size:13px;white-space:normal}.demo-strip small{display:none}.demo-strip .demo-go{padding:6px 9px}.promo-video__icon{width:46px;font-size:18px}}
@keyframes demo-pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.035)}}
@keyframes demo-glow{0%,100%{box-shadow:0 20px 60px #0009,0 0 14px #ffd17b40;border-color:#ffe4ad80}50%{box-shadow:0 20px 60px #0009,0 0 38px #ffd17bb0,0 0 70px #f8b75b55;border-color:#ffe4ad}}
@media(prefers-reduced-motion:reduce){.promo-popup,.promo-popup__box{animation:none}.promo-popup__box{box-shadow:0 20px 60px #0009,0 0 30px #ffd17b80}}
