/* Styles für Erweiterung „surveys“: Fragetypen, Diagramme, Hinweise auf neue Antworten */

/* Editor */
.sv-tools { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.sv-tools .sv-type { width: auto; max-width: 100%; padding: 5px 8px; font-size: 13px; }
.sv-tools .icon-btn:disabled { opacity: .35; cursor: default; background: transparent; }
.sv-opts { display: flex; flex-direction: column; gap: 4px; }
.q-item textarea.sv-opts-input { min-height: 70px; }
.sv-scale-labels { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* Antwort-Steuerelemente (App und öffentliche Seite) */
.sv-answer { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.sv-answer > div { width: 100%; }
.sv-choices { display: flex; flex-direction: column; gap: 4px; }
.sv-choice { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; font-weight: 400; color: var(--text); font-size: 14px; min-width: 0; }
.sv-choices .sv-choice { padding: 7px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.sv-choices .sv-choice:hover { border-color: var(--accent); }
.sv-choices .sv-choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.sv-choice input { margin: 2px 0 0; accent-color: var(--accent); flex: 0 0 auto; width: 16px; height: 16px; }
.sv-choice span { min-width: 0; overflow-wrap: anywhere; }

/* Segmentierte Knöpfe für Skala und Ja/Nein – echte Radio-Buttons, daher tastaturbedienbar */
.sv-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.sv-seg .sv-choice { position: relative; flex: 1 1 0; min-width: 44px; max-width: 120px; justify-content: center; align-items: center; }
.sv-seg .sv-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.sv-seg .sv-choice span {
  display: block; width: 100%; text-align: center; padding: 8px 6px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); font-weight: 600; color: var(--text-2);
}
.sv-seg .sv-choice:hover span { border-color: var(--accent); }
.sv-seg .sv-choice input:checked + span { background: var(--accent-solid); border-color: var(--accent-solid); color: var(--on-accent); }
.sv-seg .sv-choice input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.sv-scale-hint { display: flex; justify-content: space-between; gap: 10px; max-width: 640px; }
.sv-free { margin: 0; overflow-wrap: anywhere; }

/* Neue Antworten */
.sv-new { color: var(--accent); font-weight: 700; }
.nav-item.sv-has-new .nav-count { background: var(--accent-solid); color: var(--on-accent); border-radius: var(--radius-pill); padding: 0 6px; font-weight: 650; }
.resp-chip.is-new { border-color: var(--accent); background: var(--accent-soft); }

/* Balkendiagramm */
.sv-chart { display: flex; flex-direction: column; gap: 4px; }
.sv-avg { margin: 0 0 4px; font-size: 15px; }
.sv-bars { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 5px; }
.sv-bars li { display: grid; grid-template-columns: minmax(60px, 30%) minmax(40px, 1fr) auto; gap: 10px; align-items: center; font-size: 13.5px; }
.sv-bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-bar-track { height: 10px; background: var(--surface-2); border-radius: var(--radius-pill); overflow: hidden; }
.sv-bar-fill { display: block; height: 100%; background: var(--accent-solid); border-radius: var(--radius-pill); min-width: 0; }
.sv-bar-val { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; min-width: 64px; }
.sv-details summary { cursor: pointer; color: var(--text-2); margin: 4px 0 6px; }

/* Öffentliche Seite */
.ps-fs { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ps-fs legend { font-size: var(--fs-md); font-weight: 600; line-height: 1.4; color: var(--text); padding: 0; margin-bottom: 6px; }
.ps-clear { align-self: flex-start; }

@media (max-width: 520px) {
  .sv-bars li { grid-template-columns: minmax(50px, 34%) minmax(30px, 1fr) auto; gap: 6px; }
  .sv-bar-val { min-width: 0; }
  .sv-scale-labels { grid-template-columns: 1fr; }
}
