/* VP1 Videoplayer (partials/video-player.ejs, js/video-player.js). Ohne Skript: natives Video in voller Breite. Mit Skript: eigene Leiste unter dem Bild. */
.vp { --vp-grund: #101334; --vp-leiste: #171b45; --vp-text: #eef0fb; --vp-leise: #b9bedf; --vp-akzent: #8f9cff;
  margin: 0 0 24px; max-width: 960px; color: var(--ink, #101334); }
.vp-buehne { position: relative; background: var(--vp-grund); border-radius: 8px 8px 0 0; overflow: hidden; }
.vp:not(.vp-js) .vp-buehne { border-radius: 8px; }
.vp-video { display: block; width: 100%; height: auto; background: var(--vp-grund); }
.vp-js .vp-buehne { aspect-ratio: 16 / 9; }
.vp-js .vp-video { position: absolute; inset: 0; height: 100%; object-fit: contain; }
.vp-js .vp-video-neu { opacity: 0; pointer-events: none; }
.vp-video:focus-visible { outline: 3px solid var(--vp-akzent); outline-offset: -3px; }

/* Startfläche über dem Poster: Titel und Dauer, großer Knopf. Kein Autoplay. */
.vp-start { position: absolute; inset: 0; z-index: 3; display: flex; align-items: flex-end; justify-content: flex-start; gap: 16px;
  padding: clamp(14px, 4%, 32px); border: 0; margin: 0; background: rgba(16, 19, 52, 0.38); color: #fff; cursor: pointer; text-align: left; font: inherit; }
.vp-start[hidden] { display: none; }
.vp-start-knopf { flex: 0 0 auto; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--brand, #0e24ea);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9); transition: transform 160ms var(--ease-out, ease-out); }
.vp-start-knopf svg { margin-left: 3px; }
.vp-start-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 10px 14px; border-radius: 6px; background: rgba(16, 19, 52, 0.9); }
.vp-start-titel { font: 700 clamp(16px, 2.6vw, 22px)/1.25 var(--display, inherit); }
.vp-start-dauer { font: 500 14px/1.3 var(--sans, inherit); color: var(--vp-leise); }
.vp-start:hover .vp-start-knopf { transform: scale(1.06); }
.vp-start:focus-visible { outline: 3px solid #fff; outline-offset: -6px; }
.vp-start:focus-visible .vp-start-knopf { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--brand, #0e24ea); }

/* Untertitel, vom Player gezeichnet */
.vp-cue { position: absolute; z-index: 2; left: 4%; right: 4%; bottom: 5%; display: flex; justify-content: center; pointer-events: none; }
.vp-cue[hidden] { display: none; }
.vp-cue span { max-width: 46ch; padding: 6px 12px; border-radius: 4px; background: rgba(8, 10, 30, 0.86); color: #fff; text-align: center;
  font: 600 clamp(14px, 2.4vw, 24px)/1.35 var(--sans, inherit); white-space: pre-line; }
.vp-vollbild .vp-cue span { font-size: clamp(20px, 2.6vw, 34px); }
.vp-hinweis { position: absolute; z-index: 4; left: 12px; right: 12px; top: 12px; margin: 0; padding: 10px 14px; border-radius: 6px; background: #fff; color: var(--ink, #101334); font-size: 14px; }
.vp-hinweis[hidden] { display: none; }

/* Leiste */
.vp-leiste { background: var(--vp-leiste); color: var(--vp-text); border-radius: 0 0 8px 8px; padding: 2px 8px 6px; }
.vp-leiste[hidden] { display: none; }
.vp-knoepfe { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; }
.vp-luecke { flex: 1 1 8px; }
.vp-k { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--vp-text); cursor: pointer; }
.vp-k svg { fill: currentColor; }
.vp-k:hover { background: rgba(255, 255, 255, 0.1); }
.vp-k:focus-visible, .vp-wahl select:focus-visible, .vp-leiste input[type="range"]:focus-visible { outline: 3px solid var(--vp-akzent); outline-offset: 0; }
.vp-k-text[aria-pressed="true"] { color: #fff; box-shadow: inset 0 -3px 0 var(--vp-akzent); }
.vp-k-text[aria-pressed="false"] { color: var(--vp-leise); }
.vp .vp-i-pause, .vp .vp-i-stumm, .vp .vp-i-klein { display: none; }
.vp.vp-laeuft .vp-i-play, .vp.vp-stumm .vp-i-laut, .vp.vp-vollbild .vp-i-voll { display: none; }
.vp.vp-laeuft .vp-i-pause, .vp.vp-stumm .vp-i-stumm, .vp.vp-vollbild .vp-i-klein { display: inline; }
.vp-zeit { min-width: 92px; padding: 0 6px; font: 500 14px/44px var(--sans, inherit); font-variant-numeric: tabular-nums; white-space: nowrap; }
.vp-einst { display: inline-flex; align-items: center; gap: 4px 8px; margin-left: 4px; }
.vp-wahl { display: inline-flex; align-items: center; gap: 6px; height: 44px; font-size: 13px; color: var(--vp-leise); }
.vp-wahl select { height: 44px; min-width: 64px; padding: 0 8px; border: 1px solid #4a5088; border-radius: 6px; background: var(--vp-grund); color: var(--vp-text); font: 500 14px var(--sans, inherit); cursor: pointer; }
.vp-status { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Schieberegler: Zeitleiste in voller Breite, 44 px hohe Trefferfläche, sichtbar 6 px */
.vp-leiste input[type="range"] { -webkit-appearance: none; appearance: none; height: 44px; margin: 0; background: transparent; cursor: pointer; }
.vp-zeitleiste { display: block; width: 100%; --vp-anteil: 0%; }
.vp-lautstaerke { width: 88px; }
.vp-leiste input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: #3a3f73; }
.vp-zeitleiste::-webkit-slider-runnable-track { background: linear-gradient(to right, var(--vp-akzent) var(--vp-anteil), #3a3f73 var(--vp-anteil)) !important; }
.vp-leiste input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -5px; border-radius: 50%; background: #fff; border: 0; }
.vp-leiste input[type="range"]::-moz-range-track { height: 6px; border-radius: 3px; background: #3a3f73; }
.vp-leiste input[type="range"]::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--vp-akzent); }
.vp-leiste input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 0; }

/* Kapitelmarken in der Zeitleiste (nur Anzeige) */
.vp-zeitwrap { position: relative; }
.vp-marke { position: absolute; top: 50%; width: 2px; height: 14px; margin: -7px 0 0 -1px; border-radius: 1px; background: #fff; opacity: 0.8; pointer-events: none; }

/* Kapitel: aufklappbare Liste unter der Leiste; ohne Skript Links auf die Textfassung */
.vp-kapitel { margin-top: 10px; border: 1px solid var(--hairline, #d9dcef); border-radius: 8px; background: var(--surface, #fff); }
.vp-kapitel summary { display: flex; align-items: center; min-height: 44px; padding: 0 14px; font-weight: 600; cursor: pointer; }
.vp-kapitel summary:focus-visible, .vp-kapitel a:focus-visible { outline: 3px solid var(--focus, #0e24ea); outline-offset: -3px; }
.vp-kapitel ol { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 2px 8px; margin: 0; padding: 0 6px 8px; list-style: none; }
.vp-kapitel a { display: grid; grid-template-columns: 3.4em minmax(0, 1fr); align-items: center; min-height: 44px; padding: 4px 10px; border-radius: 6px; color: var(--ink, #101334); text-decoration: none; overflow-wrap: anywhere; }
.vp-kapitel a:hover { background: var(--hairline, #eceefb); }
.vp-kapitel a[aria-current="true"] { background: var(--hairline, #eceefb); box-shadow: inset 3px 0 0 var(--brand, #0e24ea); font-weight: 600; }
.vp-kap-zeit { color: var(--muted, #484d6b); font-variant-numeric: tabular-nums; }
.vp.vp-vollbild .vp-kapitel { display: none; }

/* Sprungknopf „Dazu im Video“ (partials/video-sprung.ejs) auf beliebigen Seiten */
.vp-sprung { margin: 10px 0 0; }
.vp-sprung-knopf { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; text-decoration: none; }
.vp-sprung-knopf svg { flex: 0 0 auto; }
.vp-sprung-knopf:focus-visible { outline: 3px solid var(--focus, #0e24ea); outline-offset: 2px; }

/* Text unter dem Video */
.vp-text { margin-top: 10px; font-size: 14px; line-height: 1.55; color: var(--muted, #484d6b); max-width: 70ch; }
.vp-text a { display: flex; align-items: center; width: fit-content; min-height: 44px; font-weight: 600; }

/* Hilfe: Video mit Ablauf als Text */
.hilfe-video .vp { margin-top: 16px; }
.hilfe-video-text { max-width: 75ch; padding-left: 22px; }
.hilfe-video-text li { margin-bottom: 10px; line-height: 1.55; }
.hilfe-video-marke { display: inline-block; min-width: 3.2em; color: var(--muted, #484d6b); font-variant-numeric: tabular-nums; }

/* Vollbild: Bild füllt die Fläche, Leiste bleibt unten */
.vp.vp-vollbild { max-width: none; margin: 0; display: flex; flex-direction: column; background: #000; }
.vp.vp-vollbild .vp-buehne { flex: 1 1 auto; aspect-ratio: auto; border-radius: 0; }
.vp.vp-vollbild .vp-leiste { border-radius: 0; }
.vp.vp-vollbild .vp-text { display: none; }

@media (max-width: 560px) {
  .vp-lautstaerke { display: none; }
  .vp-einst { flex: 1 1 100%; margin: 0; }
  .vp-einst .vp-wahl { flex: 1 1 40%; min-width: 0; }
  .vp-einst .vp-wahl:last-child { flex: 1 1 60%; }
  .vp-einst select { flex: 1 1 auto; width: 100%; min-width: 0; }
  .vp-start-knopf { width: 56px; height: 56px; }
  .vp-start-dauer { font-size: 13px; }
  .vp-zeit { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .vp-start-knopf { transition: none; }
  .vp-start:hover .vp-start-knopf { transform: none; }
}
