/* videokurs.css — Layout des ATSE-Videokurses (videokurs.html / videokurs.js).
   Nutzt die Farbvariablen aus style.css und die Badges aus handbuch.css,
   damit sich der Kurs nahtlos ins Handbuch-Design einfügt. */

/* ── Gesamtlayout: Player links, Lektionsliste rechts ───────────────────── */

.vk-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.6rem;
  align-items: start;
}

@media (min-width: 900px) {
  .vk-layout {
    grid-template-columns: minmax(0, 1fr) 21rem;
  }
}

/* ── Bühne: Player + Text ───────────────────────────────────────────────── */

.vk-buehne {
  min-width: 0;
}

.vk-rahmen {
  position: relative;
  border-radius: 1.15rem;
  overflow: hidden;
  border: 1px solid var(--color-border-soft);
  background: #000;
  box-shadow: var(--shadow-soft);
  aspect-ratio: 16 / 9;
}

.vk-rahmen video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

/* Das HTML-Attribut hidden muss die display-Regeln oben schlagen – sonst
   bleibt ein per JS ausgeblendetes Element (Platzhalter bzw. Video) sichtbar,
   weil eine display-Regel das Standardverhalten von [hidden] überschreibt. */
.vk-rahmen video[hidden],
.vk-platzhalter[hidden],
.vk-hinweis[hidden] {
  display: none;
}

/* Platzhalter, solange eine Lektion noch nicht hochgeladen ist */
.vk-platzhalter {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
  padding: 1.5rem;
  background: var(--bg-card);
  color: inherit;
}

.vk-platzhalter__icon {
  font-size: 2rem;
  line-height: 1;
  opacity: 0.7;
}

.vk-platzhalter__titel {
  font-weight: 600;
}

.vk-platzhalter__text {
  font-size: 0.92rem;
  opacity: 0.72;
  max-width: 32rem;
  margin: 0;
}

/* ── Kopfzeile unter dem Player ─────────────────────────────────────────── */

.vk-kopf {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem;
  margin-top: 1.2rem;
}

.vk-kopf h2 {
  margin: 0;
  flex: 1 1 18rem;
  font-size: 1.35rem;
  line-height: 1.3;
}

.vk-dauer {
  font-size: 0.88rem;
  opacity: 0.7;
  white-space: nowrap;
}

.vk-beschreibung {
  margin: 0.8rem 0 0;
  line-height: 1.65;
}

/* Fortsetzen-Hinweis */
.vk-hinweis {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.9rem;
  padding: 0.6rem 0.85rem;
  border-radius: 0.7rem;
  border: 1px solid var(--color-border-soft);
  background: var(--bg-card);
  font-size: 0.9rem;
}

.vk-hinweis button {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--color-accent);
  cursor: pointer;
  text-decoration: underline;
}

/* Vertiefungslink ins Handbuch */
.vk-vertiefung {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.1rem;
  padding: 0.85rem 1rem;
  border-radius: 0.9rem;
  border: 1px dashed var(--color-border-soft);
  font-size: 0.93rem;
}

.vk-vertiefung__label {
  opacity: 0.75;
}

/* Autoplay-Schalter */
.vk-optionen {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  opacity: 0.85;
}

.vk-optionen input {
  accent-color: var(--color-accent);
}

.vk-zaehler {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  opacity: 0.7;
}

/* ── Lektionsliste ──────────────────────────────────────────────────────── */

.vk-seitenleiste {
  min-width: 0;
}

@media (min-width: 900px) {
  .vk-seitenleiste {
    position: sticky;
    top: 1.5rem;
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
  }
}

.vk-seitenleiste h2 {
  font-size: 1.05rem;
  margin: 0 0 0.75rem;
}

.vk-liste {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.vk-liste__link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.8rem;
  border: 1px solid var(--color-border-soft);
  background: var(--bg-card);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.vk-liste__link:hover,
.vk-liste__link:focus-visible {
  border-color: var(--color-accent-border-strong);
  transform: translateX(0.15rem);
}

.vk-liste__link.is-aktiv {
  border-color: var(--color-accent-border-strong);
  box-shadow: inset 0.2rem 0 0 var(--color-accent);
}

.vk-liste__nr {
  flex: 0 0 auto;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 0.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid var(--color-border-soft);
}

.vk-liste__link.is-aktiv .vk-liste__nr {
  background: var(--color-accent);
  color: var(--color-accent-contrast);
  border-color: transparent;
}

.vk-liste__text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.vk-liste__titel {
  font-size: 0.93rem;
  font-weight: 500;
  line-height: 1.35;
}

.vk-liste__meta {
  font-size: 0.78rem;
  opacity: 0.65;
}

/* Häkchen erscheint erst, wenn die Lektion durchgesehen wurde */
.vk-liste__haken {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--color-accent);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.vk-liste__link.is-gesehen .vk-liste__haken {
  opacity: 1;
}

/* ── Weiter / Zurück (Muster aus handbuch.css) ──────────────────────────── */

.vk-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  margin-top: 1.6rem;
}

.vk-nav a {
  flex: 1 1 240px;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.95rem 1.1rem;
  border-radius: 0.9rem;
  border: 1px solid var(--color-border-soft);
  background: var(--bg-card);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.vk-nav a:hover,
.vk-nav a:focus-visible {
  border-color: var(--color-accent-border-strong);
  transform: translateY(-0.15rem);
}

.vk-nav small {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.65;
}

.vk-nav--next {
  text-align: right;
}

/* ── Ohne JavaScript ────────────────────────────────────────────────────── */

.vk-noscript ol {
  margin: 0.5rem 0 0;
  padding-left: 1.3rem;
  line-height: 1.9;
}
