/* =============================================================================
 * lernen.css (v518) — Learning Suite. Klassen mit Präfix .ls-
 * ========================================================================== */
.ls-kopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.ls-unter { color: var(--muted); font-size: 14px; margin: 2px 0 16px; max-width: 62ch; }
.ls-aktionen { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- Übersicht: Kategorien ---- */
.ls-kat-gitter { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.ls-kat { position: relative; display: flex; flex-direction: column; gap: 8px; text-align: left; background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 18px 18px 16px; cursor: pointer; font: inherit; color: var(--ink); transition: transform .12s, box-shadow .12s, border-color .12s;
  border-top: 5px solid var(--ls-farbe, var(--brand)); }
.ls-kat:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(16, 24, 40, .1); }
.ls-kat:focus-visible { outline: 2px solid var(--ls-farbe, var(--brand)); outline-offset: 2px; }
.ls-kat-sym { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--ls-farbe, var(--brand)) 14%, transparent); color: var(--ls-farbe, var(--brand)); }
.ls-kat h3 { margin: 4px 0 0; font-size: 18px; }
.ls-kat p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.ls-kat-fuss { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; font-size: 13px; color: var(--muted); }
.ls-balken { flex: 1 1 100%; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.ls-balken > i { display: block; height: 100%; background: var(--ok, #1a8f4c); border-radius: 3px; }
.ls-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--bg, #f3f4f7); color: var(--muted); white-space: nowrap; }
.ls-chip.chef { background: #fdecec; color: #a3261d; }
.ls-chip.ok { background: #e3f4ea; color: #1a7a43; }
.ls-chip.neu { background: var(--brand-soft, #fbf1dc); color: var(--brand-text, #8a5d10); }
.ls-chip.aend { background: #e7efff; color: #2350b5; }
.ls-menue { position: absolute; top: 10px; right: 10px; }

/* ---- Kategorie: Lektionen ---- */
.ls-zurueck { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; color: var(--muted); cursor: pointer; margin-bottom: 8px; }
.ls-zurueck:hover { color: var(--ink); }
.ls-filter { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 18px; }
.ls-filter button { font: inherit; font-size: 14px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
.ls-filter button.an { background: var(--ls-farbe, var(--navy)); border-color: transparent; color: #fff; }
.ls-abschnitt { margin: 6px 0 22px; }
.ls-abschnitt-kopf { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.ls-abschnitt-kopf h3 { margin: 0; font-size: 17px; }
.ls-lek-gitter { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.ls-lek { display: flex; flex-direction: column; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  cursor: pointer; font: inherit; color: var(--ink); padding: 0; transition: transform .12s, box-shadow .12s; }
.ls-lek:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(16, 24, 40, .09); }
.ls-lek-bild { position: relative; aspect-ratio: 16 / 9; background: #0f1726; display: grid; place-items: center; color: #9fb0c8; overflow: hidden; }
.ls-lek-bild img, .ls-lek-bild video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ls-lek-bild .ls-play { position: absolute; width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.92); display: grid; place-items: center; color: var(--navy, #1f2a40); box-shadow: 0 4px 14px rgba(0,0,0,.3); }
.ls-lek-text { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.ls-lek-text b { font-size: 15.5px; line-height: 1.3; }
.ls-lek-meta { font-size: 12.5px; color: var(--muted); }
.ls-lek-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.ls-leer { color: var(--muted); font-size: 14px; padding: 14px; border: 1px dashed var(--line); border-radius: 12px; }

/* ---- Lektion im großen Format ---- */
body.ls-offen #scanFab, body.ls-offen #aiFab { display: none !important; }
.ls-lektion { position: fixed; inset: 0; z-index: 48; background: #0d1422; color: #e9eef7; display: flex; flex-direction: column; }
.ls-l-kopf { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #0a101c; border-bottom: 1px solid rgba(255,255,255,.08); flex: 0 0 auto; }
.ls-l-kopf .ls-l-titel { flex: 1 1 auto; min-width: 0; }
.ls-l-kopf .ls-l-titel b { display: block; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ls-l-kopf .ls-l-titel small { color: #9fb0c8; font-size: 12.5px; }
.ls-l-knopf { font: inherit; font-size: 14px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: #e9eef7; border-radius: 10px; padding: 8px 12px; cursor: pointer; white-space: nowrap; }
.ls-l-knopf:hover { background: rgba(255,255,255,.14); }
.ls-l-rumpf { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 380px; }
.ls-buehne-wrap { min-height: 0; display: flex; flex-direction: column; }
.ls-buehne { position: relative; flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; background: #000; overflow: auto; }
.ls-buehne video, .ls-buehne img { max-width: 100%; max-height: 100%; width: auto; height: auto; display: block; }
.ls-buehne video { width: 100%; height: 100%; object-fit: contain; }
.ls-buehne .ls-pdf { align-self: stretch; width: 100%; max-width: 1100px; background: #2a3242; padding: 10px; overflow: auto; }
.ls-buehne .ls-pdf .pdfview-seite { display: block; margin: 0 auto 10px; background: #fff; box-shadow: 0 4px 18px rgba(0,0,0,.35); }
.ls-pfeil { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,255,255,.85); color: #16294a;
  font-size: 22px; cursor: pointer; z-index: 2; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.ls-pfeil.l { left: 12px; } .ls-pfeil.r { right: 12px; }
.ls-leiste { flex: 0 0 auto; display: flex; gap: 8px; padding: 10px 12px; overflow-x: auto; background: #0a101c; border-top: 1px solid rgba(255,255,255,.08); }
.ls-mini { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; max-width: 240px; font: inherit; font-size: 13px; color: #c9d4e6; background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 7px 10px; cursor: pointer; }
.ls-mini span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ls-mini.an { background: var(--brand, #e0a83f); color: #16294a; border-color: transparent; font-weight: 600; }
.ls-info { min-height: 0; overflow: auto; padding: 18px 18px 26px; background: #111a2b; border-left: 1px solid rgba(255,255,255,.08); }
.ls-info p { color: #c9d4e6; line-height: 1.55; margin: 0 0 14px; white-space: pre-wrap; }
.ls-info h4 { margin: 18px 0 10px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: #9fb0c8; }
.ls-schritte { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; counter-reset: s; }
.ls-schritte li { counter-increment: s; display: grid; grid-template-columns: 32px 1fr; gap: 10px; align-items: start; line-height: 1.5; color: #e9eef7; }
.ls-schritte li::before { content: counter(s); width: 28px; height: 28px; border-radius: 50%; background: var(--brand, #e0a83f); color: #16294a; font-weight: 700; display: grid; place-items: center; font-size: 14px; }
.ls-achtung { margin-top: 16px; background: #3a2b0c; border: 1px solid #8a6416; border-radius: 12px; padding: 12px 14px; color: #ffe2a6; line-height: 1.5; white-space: pre-wrap; }
.ls-achtung b { display: block; margin-bottom: 4px; color: #ffcf6b; }
.ls-ok-knopf { margin-top: 20px; width: 100%; font: inherit; font-size: 16px; font-weight: 700; padding: 14px; border-radius: 12px; border: 0; cursor: pointer; background: #1f9d57; color: #fff; }
.ls-ok-knopf[disabled] { background: #234a34; color: #a9dcbb; cursor: default; }
.ls-ok-stand { margin-top: 10px; font-size: 13px; color: #9fb0c8; text-align: center; }
.ls-leerbuehne { color: #9fb0c8; text-align: center; padding: 30px; line-height: 1.6; }
.ls-dateien { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.ls-datei { display: flex; align-items: center; gap: 8px; font-size: 13.5px; background: rgba(255,255,255,.05); border-radius: 10px; padding: 6px 8px; }
.ls-datei span { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ls-datei button { font: inherit; font-size: 13px; background: none; border: 0; color: #c9d4e6; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.ls-datei button:hover { background: rgba(255,255,255,.12); }
.ls-hochladen { margin-top: 10px; width: 100%; }
.ls-fortschritt { font-size: 13px; color: #ffcf6b; margin-top: 8px; }

/* Nachweis-Tabelle (im normalen Fenster) */
.ls-nachweis { width: 100%; border-collapse: collapse; font-size: 14px; }
.ls-nachweis td { padding: 8px 6px; border-bottom: 1px solid var(--line); }
.ls-nachweis td:last-child { text-align: right; white-space: nowrap; }
.ls-farben { display: flex; gap: 8px; flex-wrap: wrap; }
.ls-farben button { width: 30px; height: 30px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.ls-farben button.an { border-color: var(--ink); }

/* Handy / Tablet hochkant: Bühne oben, Text darunter */
@media (max-width: 900px) {
  /* minmax(0, 1fr) statt 1fr: sonst richtet sich die Spalte nach der Breite des Videos und alles ragt rechts heraus. */
  .ls-l-rumpf { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; overflow-x: hidden; overflow-y: auto; }
  .ls-buehne-wrap, .ls-info { min-width: 0; }
  .ls-buehne-wrap { min-height: auto; }
  .ls-buehne { flex: 0 0 auto; height: min(62vh, 56.25vw + 120px); min-height: 220px; }
  .ls-info { border-left: 0; overflow: visible; }
  .ls-l-kopf .ls-l-knopf .lang { display: none; }
}
