/* Videoübersicht: Pop-up-Player (assets/js/video-library.js) */

/* Dezente Scrollhilfen für die mobile Themenauswahl. */
.video-topics-scroll { position: relative; margin-top: 1.6rem; }
.video-topics-scroll .explainer-topics.video-library-topics { margin: 0; }
.video-topics-arrow { display: none; }
.video-topics-arrow[hidden] { display: none; }

@media (max-width: 760px) {
  .video-topics-scroll { display: grid; grid-template-columns: 36px minmax(0, 1fr) 36px; align-items: start; margin-inline: -1rem; }
  .video-topics-scroll .video-library-topics { grid-column: 2; grid-row: 1; min-width: 0; padding-inline: .25rem; scroll-padding-inline: .25rem; }
  .video-topics-scroll.has-next .video-library-topics {
    mask-image: linear-gradient(to right, #000 calc(100% - 1rem), transparent);
  }
  .video-topics-scroll.has-previous .video-library-topics {
    mask-image: linear-gradient(to right, transparent, #000 1rem);
  }
  .video-topics-scroll.has-previous.has-next .video-library-topics {
    mask-image: linear-gradient(to right, transparent, #000 1rem, #000 calc(100% - 1rem), transparent);
  }
  .video-topics-arrow { grid-row: 1; display: grid; place-items: center; width: 36px; height: 44px; margin-top: .3rem; padding: 8px; border: 0; border-radius: 4px; color: var(--text-muted); background: transparent; cursor: pointer; }
  .video-topics-arrow svg { width: 16px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; }
  .video-topics-arrow--previous { grid-column: 1; }
  .video-topics-arrow--next { grid-column: 3; }
  .video-topics-arrow:hover { color: var(--brand-strong); }
  .video-topics-arrow:focus-visible { outline: 2px solid var(--brand-focus); outline-offset: -3px; }
}
@media (max-width: 640px) {
  .video-topics-scroll { margin-inline: -.625rem; }
}

html.vl-open { overflow: hidden; }

.video-library-card { cursor: pointer; }
.video-library-card:focus-visible { outline: 3px solid var(--brand-focus); outline-offset: 2px; }
.video-library-poster .explainer-play-icon { transition: transform .2s ease, background-color .2s ease; }
.video-library-card:hover .video-library-poster .explainer-play-icon,
.video-library-card:focus-visible .video-library-poster .explainer-play-icon { transform: translate(-50%, -50%) scale(1.08); }

.vl-dialog {
  box-sizing: border-box;
  width: min(960px, calc(100vw - 2rem));
  max-width: none;
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text-body);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
  overflow: auto;
  overscroll-behavior: contain;
}
.vl-dialog[open] { animation: vl-in .18s ease-out; }
@keyframes vl-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
.vl-dialog::backdrop { background: rgba(5, 15, 25, .78); }

.vl-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem .75rem .6rem 1.1rem; }
.vl-kicker { font-size: .8rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); }
.vl-close { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: .45rem .95rem; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: var(--surface); color: var(--text-strong); font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer; }
.vl-close:hover { border-color: var(--brand); }
.vl-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.vl-close:focus-visible, .vl-dialog a:focus-visible { outline: 3px solid var(--brand-focus); outline-offset: 2px; }

.vl-frame { background: #000; width: 100%; aspect-ratio: 16 / 9; max-height: 68vh; max-height: 68dvh; }
.vl-frame video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }

.vl-status { margin: 0; padding: .75rem 1.1rem 0; font-size: .9rem; color: var(--text-body); }
.vl-status:empty { display: none; }

.vl-body { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .9rem 1.2rem; padding: 1rem 1.1rem 1.2rem; }
.vl-copy { flex: 1 1 280px; min-width: 0; }
.vl-title { margin: 0; font-size: 1.2rem; line-height: 1.3; color: var(--text-strong); }
.vl-desc { margin: .3rem 0 0; font-size: .92rem; line-height: 1.55; color: var(--text-muted); }
.vl-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.vl-actions .btn { font-size: .9rem; }
.vl-actions [hidden] { display: none; }
.vl-page { flex-basis: 100%; margin: 0; font-size: .85rem; }
.vl-page a { color: var(--brand-strong); font-weight: 700; }

@media (max-width: 560px) {
  .vl-dialog { width: 100vw; max-height: 100vh; max-height: 100dvh; margin: auto 0 0; border-width: 1px 0 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .vl-actions { width: 100%; }
  .vl-actions .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .vl-dialog[open] { animation: none; }
  .video-library-poster .explainer-play-icon { transition: none; }
}
.vl-page[hidden] { display: none; }
