/* Ansagen-Baukasten der Spielleitung (/gm/voice) — Bausteine aus sos-components.css.
   Desktop ab 1280 px drei Spalten (Bausteine | Ansage + Speichern | Gespeichert), Tablet 760–1279 px zwei
   (Gespeichert darunter), Smartphone eine. Ab 1600 px breiter und bis an den unteren Rand, Spalten rollen in sich. */

.vb-board {
  display: grid; gap: var(--space-md, 12px);
  --vb-accent: var(--accent-blue, #60a5fa); --vb-radio: var(--accent-cyan, #22d3ee);
  --vb-pause: var(--accent-yellow, #fbbf24); --vb-bad: var(--accent-red, #f87171); --vb-ok: var(--accent-green, #4ade80);
  --vb-line: var(--border-color, rgba(159, 194, 255, 0.2));
}
.vb-label { color: var(--text-muted, #8b93a1); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; }
.vb-hint { color: var(--text-muted, #8b93a1); font-size: 0.78rem; }
.vb-inline { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.vb-search { width: 100%; box-sizing: border-box; margin-bottom: 8px; }
.vb-lib-filter { margin-bottom: 6px; }
.vb-lib-filter button { padding: 4px 8px; font-size: 0.8rem; }

/* Leiste */
.vb-bar { display: flex; flex-direction: row; flex-wrap: wrap; gap: 14px 22px; align-items: flex-end; padding: 10px 14px; }
.vb-bar__group { display: flex; flex-direction: column; gap: 4px; }
.vb-bar__group--narrow input { width: 4.5rem; }
.vb-bar__actions { margin-left: auto; display: flex; gap: 8px; }
.vb-msg { flex-basis: 100%; margin: 0; min-height: 1.2em; font-size: 0.85rem; color: var(--vb-accent); }
.vb-msg[data-level="error"] { color: var(--vb-bad); }
.vb-speakers { display: flex; flex-wrap: wrap; gap: 4px; }
.vb-speakers button {
  padding: 6px 10px; border: 1px solid var(--vb-line); border-radius: 6px; background: transparent; color: inherit; cursor: pointer;
}
.vb-speakers button[aria-checked="true"] { background: var(--vb-accent); border-color: var(--vb-accent); color: #fff; }
.vb-speakers button[data-radio="true"][aria-checked="true"] { background: var(--vb-radio); border-color: var(--vb-radio); color: #001018; }

/* Raster */
.vb-grid { display: grid; gap: var(--space-md, 12px); grid-template-columns: minmax(0, 1fr); }
.vb-col { min-width: 0; }
@media (min-width: 760px) and (max-width: 1279px) {
  .vb-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  .vb-library { grid-column: 1 / -1; }
}
@media (min-width: 1280px) {
  .vb-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 0.9fr); align-items: start; }
}

/* Bausteine */
.vb-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.vb-tools input[type="text"] { width: 9rem; }
.vb-tools select { max-width: 15rem; }
.vb-group { border-top: 1px solid var(--vb-line); padding: 6px 0; }
.vb-group > summary { cursor: pointer; font-size: 0.8rem; color: var(--text-muted, #8b93a1); text-transform: uppercase; letter-spacing: 0.06em; }
.vb-group > summary b { color: var(--text-primary, #e5e7eb); font-weight: 600; }
.vb-words { display: flex; flex-wrap: wrap; gap: 5px; padding-top: 6px; }
.vb-word {
  padding: 4px 9px; border: 1px solid var(--vb-line); border-radius: 999px; background: rgba(255, 255, 255, 0.03);
  color: inherit; font: inherit; font-size: 0.85rem; cursor: pointer; line-height: 1.3;
}
.vb-word:hover, .vb-word:focus-visible { border-color: var(--vb-accent); background: rgba(96, 165, 250, 0.12); outline: none; }
.vb-word--pause { border-style: dashed; color: var(--vb-pause); }
.vb-word[data-hit="first"] { border-color: var(--vb-accent); }

/* Ansage */
.vb-sentence {
  display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 8px; padding: 10px; min-height: 3.2rem;
  border: 1px dashed var(--vb-line); border-radius: 8px; background: rgba(0, 0, 0, 0.15);
}
.vb-sentence:empty::before { content: 'Noch leer — Bausteine links anklicken.'; color: var(--text-muted, #8b93a1); font-size: 0.85rem; }
.vb-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 10px; border-radius: 999px;
  background: rgba(96, 165, 250, 0.16); border: 1px solid rgba(96, 165, 250, 0.45); cursor: grab; user-select: none;
}
.vb-chip[data-pause="true"] { background: transparent; border-style: dashed; border-color: var(--vb-pause); color: var(--vb-pause); }
.vb-chip[data-missing="true"] { background: rgba(248, 113, 113, 0.14); border-color: var(--vb-bad); text-decoration: line-through; }
.vb-chip[aria-selected="true"] { box-shadow: 0 0 0 2px var(--vb-accent); }
.vb-chip[data-playing="true"] { background: var(--vb-accent); color: #fff; }
.vb-chip.is-dragging { opacity: 0.4; }
.vb-chip.is-drop-before { box-shadow: -3px 0 0 var(--vb-accent); }
.vb-chip button { border: 0; background: transparent; color: inherit; cursor: pointer; padding: 0 5px; font-size: 1rem; line-height: 1; opacity: 0.7; }
.vb-chip button:hover { opacity: 1; }
.vb-text { font-size: 1.05rem; margin: 6px 0; min-height: 1.4em; }
.vb-warn { color: var(--vb-bad); font-size: 0.85rem; margin: 0; }
.vb-mix { color: var(--vb-pause); font-size: 0.85rem; margin: 4px 0 0; }
.vb-find { width: 100%; flex-wrap: nowrap; margin-bottom: 8px; }
.vb-find .vb-search { margin-bottom: 0; flex: 1; min-width: 0; }
.vb-bar__group--pitch input { width: 11rem; }
.vb-hz { opacity: 0.55; font-size: 0.75em; margin-left: 4px; font-variant-numeric: tabular-nums; }
.vb-word[data-off="true"], .vb-chip[data-off="true"] { border-color: var(--vb-pause); }
.vb-save-head { border-top: 1px solid var(--vb-line); }
.vb-save { display: grid; gap: 8px; }
.vb-save label { display: grid; gap: 3px; font-size: 0.8rem; color: var(--text-muted, #8b93a1); }

/* Gespeichert */
.vb-folder { margin: 10px 0 4px; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted, #8b93a1); }
.vb-item { display: grid; gap: 4px; padding: 8px 10px; border: 1px solid var(--vb-line); border-radius: 8px; margin-bottom: 6px; }
.vb-item[data-active="true"] { border-color: var(--vb-accent); }
.vb-item__head { display: flex; gap: 8px; align-items: baseline; justify-content: space-between; }
.vb-item__name { font-weight: 600; }
.vb-item__text { font-size: 0.82rem; color: var(--text-muted, #8b93a1); }
.vb-item__actions { display: flex; flex-wrap: wrap; gap: 4px; }
.vb-empty { color: var(--text-muted, #8b93a1); font-size: 0.85rem; }

/* Breite Bildschirme: Hülle aufheben, Spalten bis unten, in sich rollend */
@media (min-width: 1600px) {
  .station-main:has(.vb-board) { max-width: min(2800px, 100%); display: flex; flex-direction: column; }
  .vb-board { flex: 1 0 auto; grid-template-rows: auto 1fr; }
  .vb-grid { align-items: stretch; height: calc(100vh - 270px); min-height: 520px; }
  .vb-col { overflow: auto; }
}

/* Smartphone: Ansage über den Bausteinen, damit man sieht, was der Klick anhängt; Kontaktwahl volle Breite. */
@media (max-width: 759px) {
  .vb-compose { order: -1; }
  .vb-tools > .vb-inline { flex: 1 1 100%; }
  .vb-tools select { flex: 1 1 0; min-width: 0; max-width: none; }
  .vb-bar__actions { margin-left: 0; }
}
