/* Medienarten (PDF, Audio, Karussell): Ansicht, Kacheln, Dialog. Zu medienarten.js.
   Look wie der Rest des Portals: Funnel Display, Konturen 1 px, keine Schatten, ein Hauptknopf je Flaeche,
   Farben ueber die Theme-Variablen. Die Buehne (vlm-stage) bleibt wie der Videoplayer in beiden Themes dunkel. */

/* ---- Buehne in der Detailansicht ---- */
.vlm-stage { background: #0A0708; color: #F4F4F4; }
.vlm-stage * { box-sizing: border-box; }
.vlm-wrap { position: absolute; inset: 0; display: flex; flex-direction: column; min-height: 0; font-family: var(--font-body, 'Funnel Display', system-ui, sans-serif); }
.vlm-stage[data-medienart="audio"] .vlm-wrap { position: relative; inset: auto; }
.vlm-stage[data-medienart="pdf"] .vlm-wrap { position: relative; inset: auto; height: 100%; }

.vlm-leiste { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid rgba(244,244,244,0.12); flex-wrap: wrap; min-height: 56px; }
.vlm-stage[data-medienart="carousel"] .vlm-leiste { border-bottom: 0; border-top: 1px solid rgba(244,244,244,0.12); }
.vlm-abstand { flex: 1 1 8px; }
.vlm-zaehler { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; color: #F4F4F4; }

.vlm-knopf, .vlm-ib, .vlm-tempo, .vlm-play, .vlm-haupt, .vlm-mini, .vlm-nav { font-family: inherit; cursor: pointer; }
.vlm-knopf { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(244,244,244,0.28); background: transparent; color: #F4F4F4; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.vlm-knopf .material-symbols-outlined { font-size: 18px; color: inherit !important; }
.vlm-knopf:hover { background: rgba(244,244,244,0.08); }
.vlm-ib { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid rgba(244,244,244,0.28); background: transparent; color: #F4F4F4; padding: 0; }
.vlm-ib .material-symbols-outlined { font-size: 20px; color: inherit !important; }
.vlm-ib:hover:not([disabled]) { background: rgba(244,244,244,0.08); }
.vlm-ib[disabled] { opacity: .35; cursor: default; }
.vlm-knopf:focus-visible, .vlm-ib:focus-visible, .vlm-tempo:focus-visible, .vlm-play:focus-visible, .vlm-haupt:focus-visible, .vlm-mini:focus-visible, .vlm-nav:focus-visible, .vlm-feld:focus-visible, .vlm-bild:focus-visible, .vlm-leiste-bar:focus-visible {
  outline: 2px solid #F4F4F4; outline-offset: 2px; }

/* ---- PDF ---- */
.vlm-pdf { flex: 1 1 auto; width: 100%; min-height: 0; border: 0; background: #fff; }
.vlm-seite { display: inline-flex; align-items: center; gap: 6px; }
.vlm-seite-l { font-size: 14px; font-weight: 600; color: #F4F4F4; }
.vlm-feld { height: 44px; border-radius: 12px; border: 1px solid rgba(244,244,244,0.28); background: rgba(244,244,244,0.06); color: #F4F4F4; font: inherit; font-size: 16px; padding: 0 12px; width: 76px; text-align: center; font-variant-numeric: tabular-nums; }
.vlm-feld.vlm-breit { width: 100%; text-align: left; }

/* ---- Audio und Karten ---- */
.vlm-karte { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 36px 20px; text-align: center; flex: 1 1 auto; }
.vlm-gross { font-size: 56px; color: rgba(244,244,244,0.5) !important; }
.vlm-karte-titel { margin: 0; font-size: 18px; font-weight: 600; color: #F4F4F4; overflow-wrap: anywhere; max-width: 90%; }
.vlm-karte-meta { margin: 0; font-size: 14px; color: #B4B4AE; overflow-wrap: anywhere; }
.vlm-karte-text { margin: 4px 0 8px; font-size: 14px; line-height: 1.5; color: #B4B4AE; max-width: 36ch; }
.vlm-player { display: flex; align-items: center; gap: 10px; padding: 12px 14px 16px; flex-wrap: wrap; }
.vlm-play { width: 52px; height: 52px; border-radius: 50%; border: 0; background: #F4F4F4; color: #0A0708; display: inline-flex; align-items: center; justify-content: center; padding: 0; flex: none; }
.vlm-play .material-symbols-outlined { font-size: 28px; color: #0A0708 !important; font-variation-settings: 'FILL' 1; }
.vlm-zeit { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; color: #F4F4F4; min-width: 92px; }
.vlm-leiste-bar { position: relative; flex: 1 1 140px; height: 44px; cursor: pointer; min-width: 120px; }
.vlm-spur { position: absolute; left: 0; right: 0; top: 20px; height: 4px; border-radius: 2px; background: rgba(244,244,244,0.2); }
.vlm-fort { position: absolute; left: 0; top: 20px; height: 4px; border-radius: 2px; background: #F4F4F4; width: 0; }
.vlm-leiste-bar .del-tc-marker { top: 14px !important; }
.vlm-tempo { min-width: 56px; height: 44px; border-radius: 999px; border: 1px solid rgba(244,244,244,0.28); background: transparent; color: #F4F4F4; font-size: 14px; font-weight: 600; padding: 0 12px; }

/* ---- Karussell ---- */
.vlm-bild { position: relative; flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 12px 56px; }
.vlm-folie { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 12px; }
.vlm-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(244,244,244,0.28); background: rgba(10,7,8,0.7); color: #F4F4F4; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.vlm-nav .material-symbols-outlined { font-size: 24px; color: inherit !important; }
.vlm-zurueck { left: 8px; } .vlm-weiter { right: 8px; }
.vlm-streifen { display: flex; gap: 8px; overflow-x: auto; padding: 8px 12px 12px; border-top: 1px solid rgba(244,244,244,0.12); scrollbar-width: thin; }
.vlm-mini { flex: none; width: 56px; height: 56px; padding: 0; border-radius: 8px; border: 2px solid transparent; background: #1E1A1C; overflow: hidden; opacity: .6; }
.vlm-mini img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vlm-mini.vlm-an { border-color: #F4F4F4; opacity: 1; }

/* ---- Dialog Karussell anlegen (vl-on-dark: bleibt in beiden Themes dunkel) ---- */
.vlm-dialog { position: fixed; inset: 0; z-index: 800; background: rgba(8,6,7,0.8); display: flex; align-items: center; justify-content: center; padding: 16px; }
.vlm-box { width: min(560px, 100%); max-height: min(90vh, 760px); overflow-y: auto; border: 1px solid rgba(244,244,244,0.2); border-radius: 20px; background: #141012; color: #F4F4F4; padding: 24px; font-family: var(--font-body, 'Funnel Display', system-ui, sans-serif); display: flex; flex-direction: column; gap: 12px; }
.vlm-d-titel { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: 0; text-transform: none; color: #F4F4F4; }
.vlm-d-text { margin: 0; font-size: 14px; line-height: 1.5; color: #B4B4AE; }
.vlm-d-l { font-size: 14px; font-weight: 600; color: #F4F4F4; }
.vlm-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.vlm-zeile { display: grid; grid-template-columns: 48px 24px minmax(0, 1fr) auto auto auto; align-items: center; gap: 8px; }
.vlm-vor { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; background: #1E1A1C; }
.vlm-nr { font-size: 14px; font-weight: 600; color: #B4B4AE; text-align: center; font-variant-numeric: tabular-nums; }
.vlm-dname { font-size: 14px; color: #F4F4F4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vlm-d-zeile { display: flex; }
.vlm-d-fehler { margin: 0; font-size: 14px; color: #F4F4F4; border: 1px solid rgba(244,244,244,0.4); border-radius: 12px; padding: 10px 12px; }
.vlm-d-fuss { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.vlm-haupt { min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid #F4F4F4; background: #F4F4F4; color: #0A0708; font-size: 14px; font-weight: 600; }
.vlm-haupt[disabled] { opacity: .4; cursor: default; }

/* ---- Kacheln im Raster (views.js): Symbol statt Vorschaubild ---- */
.vlm-platz { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: var(--bg-s2, #1E1A1C); color: var(--text-secondary, #B4B4AE); }
.vlm-platz .material-symbols-outlined { font-size: 44px; color: var(--text-muted, #8A8A84) !important; }
.vlm-platz b { font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--text-secondary, #B4B4AE); }
.vlm-platz-klein .material-symbols-outlined { font-size: 28px; }
.vlm-platz-klein b { display: none; }
.vlm-art { position: absolute; left: 10px; bottom: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 4px; min-height: 24px; padding: 0 8px; border-radius: 999px; background: rgba(10,7,8,0.78); color: #F4F4F4; font-size: 12px; font-weight: 600; pointer-events: none; }
.vlm-art .material-symbols-outlined { font-size: 14px; color: inherit !important; }


@media (max-width: 640px) {
  .vlm-stage[data-medienart="carousel"] { height: auto !important; }
  .vlm-bild { aspect-ratio: 4 / 5; max-height: 60svh; }
  .vlm-bild { padding: 8px 48px; }
  .vlm-zeile { grid-template-columns: 40px 20px minmax(0, 1fr) auto auto auto; gap: 4px; }
  .vlm-zeile .vlm-ib { width: 44px; height: 44px; }
  .vlm-vor { width: 40px; height: 40px; }
  .vlm-box { padding: 20px 16px; border-radius: 16px; }
  .vlm-player { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) { .vlm-stage *, .vlm-dialog * { transition: none !important; animation: none !important; } }
