/*
 * Schnittplatz – Ergänzungen zu app.css (dort: .schnitt, .player, .ut, .zeitleiste, .woerter, .ut-liste).
 * Präfix sp- für alles, was nur hier gebraucht wird.
 */

/* ---------- Übersicht ---------- */
.sp-abschnitt-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.sp-abschnitt-kopf h2 { margin: 0; }
.sp-projekte { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.sp-projekt { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.sp-projekt-bild { background: #1E1E1E; color: #777; display: grid; place-items: center; height: 240px; }
.sp-projekt-bild.quer { height: 160px; }
.sp-projekt-bild video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.sp-projekt-info { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.sp-projekt-info .titel { font-size: 17px; line-height: 1.3; }
.sp-projekt-info .titel a { color: var(--text); text-decoration: none; }
.sp-projekt-info .titel a:hover { color: var(--rot); }
.sp-projekt-info > .reihe:last-child { margin-top: auto; padding-top: 4px; }

.mat.sp-wahl { cursor: pointer; transition: box-shadow .12s, border-color .12s; }
.mat.sp-wahl:hover { border-color: var(--leise); }
.mat.sp-wahl.gewaehlt { border-color: var(--rot); box-shadow: 0 0 0 2px var(--rot); }
.mat.sp-wahl.gewaehlt .vorschau { background: var(--rot-hell); color: var(--rot); }
.mat .aktionen.sp-haken { justify-content: flex-start; align-items: center; gap: 8px; padding: 8px 10px; font-size: 13px; color: var(--leise); cursor: pointer; }
.sp-haken input, .sp-wahlliste input { accent-color: var(--rot); width: 18px; height: 18px; margin: 0; flex: none; cursor: pointer; }

.sp-auswahlleiste { position: sticky; bottom: 16px; z-index: 20; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--text); color: #fff; padding: 10px 14px; border-radius: var(--radius); box-shadow: var(--schatten-hoch); margin: 16px 64px 0 0; }
.sp-auswahlleiste .raum { flex: 1; }
.sp-auswahlleiste .k-leise { color: #fff; }
.sp-auswahlleiste .k-leise:hover { background: rgba(255,255,255,.14); color: #fff; }
@media (max-width: 900px) { .sp-auswahlleiste { bottom: calc(76px + env(safe-area-inset-bottom)); } }

/* Auswahllisten in Dialogen */
.sp-wahlliste { display: flex; flex-direction: column; border: 1px solid var(--linie); border-radius: var(--radius); max-height: 280px; overflow-y: auto; }
.sp-wahlliste label { display: flex; gap: 10px; align-items: flex-start; padding: 8px 12px; border-bottom: 1px solid var(--flaeche); cursor: pointer; font-size: 15px; color: var(--text); }
.sp-wahlliste label:last-child { border-bottom: 0; }
.sp-wahlliste label:hover { background: var(--flaeche-2); }
.sp-wahlliste input { margin-top: 3px; }
.sp-wahlliste .a { font-size: 12px; color: var(--leise); }

/* ---------- Arbeitsplatz: Kopf und Schrittleiste ---------- */
.sp-meta { margin: -8px 0 14px; }
.sp-speicherstand { margin-left: auto; }
.sp-speicherstand.ungespeichert { color: var(--gelb); }
.sp-speicherstand.fehler { color: var(--rot-dunkel); }
.sp-leiste { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.sp-leiste button { font-family: var(--schrift); font-size: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border: 1px solid var(--linie); border-radius: 18px; background: var(--weiss); color: var(--text); cursor: pointer; }
.sp-leiste button:hover { border-color: var(--leise); }
.sp-leiste .nr { width: 26px; height: 26px; border-radius: 50%; background: var(--flaeche); color: var(--leise); display: grid; place-items: center; font-size: 13px; }
.sp-leiste .erledigt .nr { background: var(--gruen); color: #fff; }
.sp-leiste .jetzt { border-color: var(--rot); }
.sp-leiste .jetzt .nr { background: var(--rot); color: #fff; }

/* ---------- Linke Spalte: Player ---------- */
.sp-links { position: sticky; top: calc(var(--kopf) + 16px); min-width: 0; }
@media (max-width: 1100px) {
  .sp-links { position: static; }
  .sp-links .player.hoch { max-width: min(380px, calc(68vh * 9 / 16)); }
}
.sp-links .player { cursor: pointer; }
.player .ut { z-index: 2; user-select: none; -webkit-user-select: none; }
.player .ut:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.player .ut.muster { opacity: .55; }
.sp-player-leer { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #DDD; font-size: 14px; padding: 24px; pointer-events: none; z-index: 1; }
.sp-player-marke { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.62); color: #fff; font-size: 12px; padding: 2px 9px; border-radius: 10px; pointer-events: none; z-index: 3; }
.sp-steuer { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.sp-zeit { font-variant-numeric: tabular-nums; font-size: 14px; color: var(--leise); margin-left: auto; }
.zeitleiste .seg { flex: none; }
.zeitleiste .seg:hover { filter: brightness(1.12); }
.zeitleiste .kopfpos::before { content: ''; position: absolute; top: 0; left: -4px; border: 5px solid transparent; border-top-color: var(--text); }

/* ---------- Rechte Spalte: Schritte ---------- */
.sp-schritte { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.sp-schritt { scroll-margin-top: calc(var(--kopf) + 16px); }
.sp-schritt-kopf { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.sp-schritt-kopf h2 { margin: 0; flex: 1; font-size: 20px; }
.sp-nr { width: 32px; height: 32px; border-radius: 50%; background: var(--rot); color: #fff; display: grid; place-items: center; font-size: 16px; flex: none; }
.sp-schritt.erledigt .sp-nr { background: var(--gruen); }
.sp-schritt-erkl { font-size: 15px; margin-bottom: 14px; }
.sp-schritt h3 { font-size: 16px; color: var(--leise); margin: 20px 0 6px; }
.sp-unten { margin-top: 12px; }
.sp-abstand { margin-top: 12px; }
.sp-voll { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.hinweis > .kreisel { margin-top: 3px; flex: none; }
.sp-log { white-space: pre-wrap; word-break: break-word; font-size: 12px; max-height: 200px; overflow: auto; background: rgba(255,255,255,.7); padding: 8px; border-radius: 4px; margin: 0; }
.sp-trenner { border: 0; border-top: 1px solid var(--flaeche); margin: 18px 0; }

/* Clips und Ablauf */
.sp-clip, .sp-teil { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--flaeche); }
.sp-clip:last-child, .sp-teil:last-child { border-bottom: 0; }
.sp-clip .haupt, .sp-teil .haupt { flex: 1; min-width: 0; }
.sp-clip .unter { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 13px; margin-top: 3px; }
.sp-clip .knoepfe, .sp-teil .knoepfe { display: flex; gap: 2px; flex-wrap: nowrap; }
.sp-clip .knoepfe .k, .sp-teil .knoepfe .k { padding: 4px 8px; }
.sp-farbe { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.sp-clip-nr { font-size: 13px; color: var(--leise); min-width: 18px; }
.sp-teil-text { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 700px) {
  .sp-clip, .sp-teil { flex-wrap: wrap; }
  .sp-clip .knoepfe, .sp-teil .knoepfe { width: 100%; justify-content: flex-end; }
}

/* Regler mit Beschriftung und Wert */
.sp-regler-zeile { display: grid; grid-template-columns: 170px minmax(0, 1fr) 64px; gap: 12px; align-items: center; margin-bottom: 12px; }
.sp-regler-zeile label { font-size: 14px; color: var(--leise); }
.sp-wert { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) {
  .sp-regler-zeile { grid-template-columns: minmax(0, 1fr) 64px; gap: 4px 12px; }
  .sp-regler-zeile label { grid-column: 1 / -1; }
}

/* Wort-Ansicht */
.sp-clip-kopf { display: flex; align-items: center; gap: 8px; margin: 14px 0 6px; flex-wrap: wrap; font-size: 15px; }
.sp-clip-kopf .raum { flex: 1; }
.woerter span { user-select: none; -webkit-user-select: none; }
.woerter span.jetzt { outline: 2px solid var(--rot); }

/* Untertitel-Liste */
.sp-ut-kopf { display: grid; grid-template-columns: 80px 80px 1fr auto; gap: 6px; padding: 0 4px 4px; }
.sp-arbeitsplatz .ut-liste { position: relative; max-height: 460px; overflow-y: auto; border-top: 1px solid var(--flaeche); }
.sp-arbeitsplatz .ut-liste .ut-zeile { padding: 6px 4px; }
.sp-arbeitsplatz .ut-liste textarea { padding: 6px 8px; font-size: 14px; min-height: 40px; line-height: 1.35; resize: vertical; }
.sp-ut-knoepfe { gap: 0; flex-wrap: nowrap; }
.sp-ut-knoepfe .k { padding: 4px 7px; }
@media (max-width: 700px) { .sp-ut-kopf { display: none; } }

.sp-stil { padding: 14px 14px 10px; background: var(--flaeche-2); border-radius: var(--radius); }

/* Musik und Abbinder */
.sp-musik { margin-top: 10px; }
.sp-musik audio { width: 100%; margin: 6px 0; }
.sp-abbinder { display: flex; gap: 16px; align-items: flex-start; }
.sp-abbinder video { width: 120px; border-radius: 6px; background: #000; flex: none; }
.sp-abbinder.quer video { width: 240px; }
@media (max-width: 600px) { .sp-abbinder { flex-direction: column; } }

/* Ergebnis und Thema */
.sp-ergebnisse { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 14px; }
.sp-ergebnisse:empty { display: none; }
.sp-ergebnis h3 { margin-top: 0; }
.sp-ergebnis video { width: 100%; max-height: 520px; background: #000; border-radius: 8px; display: block; }
.sp-thema { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--flaeche); }
.sp-thema .eingabe { width: auto; min-width: 200px; flex: 1; }
