﻿/* Bereich „Bewertung" – Vorlagen (Fragebögen, Skalen, Fahrprogrammprofile).
   Gemeinsames steht in assessment.css. */

.as-tpl-seg { margin-bottom: 0; }
.as-tpl-panel .panel-head .row { flex-wrap: wrap; }

/* Archivierte Zeilen treten zurück, bleiben aber lesbar. */
tr.as-tpl-archived td { color: var(--text-dim); }

/* Knopfgruppe am Zeilenende – nebeneinander. Sie brach vorher um, und zwar nicht nur auf
   schmalen Bildschirmen: Die Zelle ist mit width: 1 % so schmal wie möglich gesetzt, und
   ein Umbruch ist für den Browser „möglich“ – vier Knöpfe standen dann untereinander und
   jede Zeile war viermal so hoch. Umgebrochen wird jetzt nur noch am Telefon (unten). */
.as-tpl-rowbtns { gap: 2px; flex-wrap: nowrap; justify-content: flex-end; }

/* ---------- Skalenvorschau ---------- (Spektrum selbst: assess-scales.css) */
.as-tpl-defscale { gap: 8px; flex-wrap: wrap; font-size: 12px; }

/* Stufen- und Optionstabellen in Dialogen: schmale Eingaben. */
.as-tpl-code { width: 90px; }
.as-tpl-norm { width: 90px; text-align: right; }
.as-tpl-cb { width: 16px; height: 16px; accent-color: var(--accent); }
.as-tpl-levels-table td { padding: 6px 8px; }
.as-tpl-levels-table .select { min-width: 100px; }
.as-tpl-grid-3 { grid-template-columns: 1fr 1fr 1fr; }

/* Auswahlkarte (Vorlage wählen, Frage übernehmen). */
.as-tpl-pick {
    display: flex; gap: 10px; align-items: flex-start; padding: 9px 11px; cursor: pointer;
    border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel);
}
.as-tpl-pick:hover { border-color: var(--line-strong); }
.as-tpl-pick.on { border-color: var(--accent); background: var(--accent-soft); }
.as-tpl-pick > input { margin-top: 3px; accent-color: var(--accent); flex: none; }
.as-tpl-pick > span { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.as-tpl-pick .as-sub { font-size: 11.5px; color: var(--text-dim); }
.as-tpl-import { display: flex; flex-direction: column; gap: 6px; max-height: 46vh; overflow: auto; }

/* ---------- Editor: Abschnitte und Fragen ---------- */
.as-tpl-group { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 12px; background: var(--panel); }
.as-tpl-group-head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
    padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--panel-raised);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.as-tpl-group-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.as-tpl-group-title .as-sub { font-size: 11.5px; color: var(--text-dim); }
.as-tpl-noq { padding: 12px; font-size: 12.5px; }

.as-tpl-qlist { list-style: none; margin: 0; padding: 0; counter-reset: q; }
.as-tpl-q {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    padding: 9px 12px; border-bottom: 1px solid var(--line);
}
.as-tpl-q:last-child { border-bottom: 0; }
ol.as-tpl-qlist > .as-tpl-q { counter-increment: q; }
ol.as-tpl-qlist > .as-tpl-q .as-tpl-q-title::before {
    content: counter(q) "."; font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); margin-right: 8px;
}
.as-tpl-q-main { display: flex; flex-direction: column; gap: 5px; min-width: 0; flex: 1 1 280px; }
.as-tpl-q-title { font-weight: 500; overflow-wrap: anywhere; }
.as-tpl-q-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.as-tpl-small { font-size: 11px; }
.as-tpl-req { color: var(--fault); font-weight: 700; margin-left: 4px; }
.as-tpl-move { height: 30px; width: auto; min-width: 120px; font-size: 12px; padding-top: 0; padding-bottom: 0; }

.as-tpl-retired { margin-top: 6px; }
.as-tpl-retired > summary { cursor: pointer; color: var(--text-dim); font-size: 12.5px; padding: 6px 0; }
.as-tpl-retired .as-tpl-qlist { border: 1px dashed var(--line); border-radius: var(--radius-sm); margin-top: 6px; }

/* ---------- Vorschau ---------- */
.as-tpl-prev { padding: 11px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.as-tpl-prev:last-child { border-bottom: 0; }
.as-tpl-prev-title { font-weight: 500; }
.as-tpl-prev-levels { display: flex; flex-wrap: wrap; gap: 6px; }
.as-tpl-prev-levels .as-answer { min-height: 30px; padding: 0 12px; cursor: default; font-size: 12.5px; }
.as-tpl-prev-num { width: 140px; }
.as-tpl-prev-section { margin: 16px 0 2px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-dim); }
.as-tpl-prev-section:first-child { margin-top: 0; }

@media (max-width: 640px) {
    .as-tpl-grid-3 { grid-template-columns: 1fr; }
    .as-tpl-q { align-items: flex-start; }
    .as-tpl-rowbtns { justify-content: flex-start; flex-wrap: wrap; }
}
