/* Lern-Player. Farben über --l-* anpassbar, Standard: COOKIE-Petrol. */
.lp {
  --l-accent: var(--petrol, #00738b);
  --l-ink: var(--ink, #0b2a31);
  --l-chrome: #0f2f36;
  --l-chrome-line: rgba(255, 255, 255, .18);
  position: relative;
  background: var(--l-chrome);
  border-radius: 14px;
  overflow: hidden;
  color: #fff;
  box-shadow: 0 1px 2px rgba(11, 42, 49, .08), 0 18px 40px rgba(11, 42, 49, .16);
}
.lp:fullscreen { border-radius: 0; display: flex; flex-direction: column; background: #000; }
.lp:fullscreen .lp-stage { flex: 1; }
.lp:fullscreen .lp-video { height: 100%; max-height: none; }

.lp-stage { position: relative; background: #000; }
.lp-video { display: block; width: 100%; aspect-ratio: 16 / 9; max-height: 78vh; background: #000; }
.lp.is-enhanced .lp-video { cursor: pointer; }
.lp-video::cue { font-family: var(--font, sans-serif); font-size: 1.125rem; background: rgba(11, 42, 49, .82); }

.lp-missing {
  position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 24px;
  text-align: center; color: rgba(255, 255, 255, .8);
}

.lp-bigplay {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 84px; height: 84px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--l-accent); color: #fff; display: grid; place-items: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
.lp-bigplay svg { width: 40px; height: 40px; margin-left: 4px; }
.lp-bigplay:hover { transform: translate(-50%, -50%) scale(1.05); }
.lp-bigplay[hidden], .lp-bar[hidden], .lp-next[hidden], .lp-tip[hidden] { display: none; }

.lp-next {
  position: absolute; inset: 0; display: grid; place-content: center; gap: 14px; text-align: center;
  background: rgba(11, 42, 49, .88); padding: 20px;
}
.lp-next p { margin: 0; font-size: 1.125rem; font-weight: 600; }
.lp-next-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

.lp-bar { padding: 10px 14px 8px; background: var(--l-chrome); }

/* Zeitleiste: ein Segment pro Kapitel */
.lp-timeline { position: relative; padding: 9px 0; cursor: pointer; touch-action: none; }
.lp-timeline:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lp-segments { display: flex; gap: 3px; height: 6px; }
.lp-timeline:hover .lp-segments, .lp-timeline:focus-visible .lp-segments { height: 8px; margin-top: -1px; }
.lp-seg { position: relative; flex: 1 1 0; min-width: 3px; background: rgba(255, 255, 255, .26); border-radius: 2px; overflow: hidden; }
.lp-seg-fill { position: absolute; inset: 0; background: #7fd3e3; transform: scaleX(0); transform-origin: left; }
.lp-thumb {
  position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; left: 0;
  border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(127, 211, 227, .45); pointer-events: none;
}
.lp-tip {
  position: absolute; bottom: 26px; transform: translateX(-50%); white-space: nowrap;
  max-width: 80vw; overflow: hidden; text-overflow: ellipsis;
  background: #fff; color: var(--l-ink); font-size: .8125rem; font-weight: 600;
  padding: 5px 9px; border-radius: 6px; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); pointer-events: none;
}

.lp-controls { display: flex; align-items: center; gap: 2px; min-height: 44px; }
.lp-btn {
  display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 6px;
  background: transparent; color: #fff; border: 0; border-radius: 8px; cursor: pointer;
  font: inherit; font-weight: 650; font-size: .875rem;
}
.lp-btn:hover { background: rgba(255, 255, 255, .1); }
.lp-btn svg { width: 22px; height: 22px; }
.lp-btn[aria-pressed="true"] { color: #7fd3e3; }
.lp-i-pause { display: none; }
.lp.is-playing .lp-i-play { display: none; }
.lp.is-playing .lp-i-pause { display: block; }
.lp.is-muted .lp-i-wave { display: none; }
.lp-time { font-variant-numeric: tabular-nums; font-size: .875rem; padding: 0 8px; white-space: nowrap; color: rgba(255, 255, 255, .85); }
.lp-chapter {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: .875rem; font-weight: 600; padding-left: 10px; border-left: 1px solid var(--l-chrome-line);
}
.lp-spacer { flex: 1; }

@media (max-width: 640px) {
  .lp { border-radius: 10px; }
  .lp-bar { padding: 6px 6px 4px; }
  .lp-chapter { display: none; }
  .lp-time { padding: 0 4px; font-size: .8125rem; }
  .lp-btn { min-width: 36px; padding: 0 4px; }
  .lp-bigplay { width: 64px; height: 64px; }
  .lp-bigplay svg { width: 30px; height: 30px; }
}
@media (max-width: 380px) {
  .lp-controls [data-lp="back"], .lp-controls [data-lp="forward"] { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .lp-bigplay:hover { transform: translate(-50%, -50%); }
}
