/* Bereich „Bewertung" – Fahrten und Bewertungseditor. Gemeinsames steht in assessment.css. */

/* ---------- Liste ---------- */
.as-rt-seg button { height: 32px; padding: 0 12px; font-size: 12px; }
.as-rt-flag { color: var(--fault); font-family: var(--font-mono); font-weight: 600; }
.as-rt-missing { color: var(--warn); }
.as-rt-show-sm { display: none; }
@media (max-width: 760px) {
    .as-rt-hide-sm { display: none; }
    .as-rt-show-sm { display: block; }
    .as-rt-table td, .as-rt-table th { padding: 9px 10px; }
}

/* ---------- Editor: Kopf ---------- */
.as-rt-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.as-rt-head-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.as-rt-head-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-family: var(--font-ui); font-size: 18px; min-width: 0; }
.as-rt-head-sub { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12.5px; color: var(--text-dim); }
.as-rt-head-sub a { color: var(--accent); text-decoration: none; }
.as-rt-head-actions { flex-wrap: wrap; gap: 6px; }

/* Fortschritt, der beim Rollen oben stehen bleibt – der Fahrer sieht jederzeit, wie
   weit er ist, ohne nach oben zu müssen. */
.as-rt-sticky {
    position: sticky; top: 0; z-index: 5; margin: 0 -2px; padding: 6px 2px;
    background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(4px);
}
.as-rt-progress { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.as-rt-progress-bar { flex: 1 1 180px; height: 8px; border-radius: 4px; background: var(--panel-inset); border: 1px solid var(--line); overflow: hidden; }
.as-rt-progress-bar > span { display: block; height: 100%; background: var(--accent); transition: width .25s; }
.as-rt-progress-text { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-dim); }
.as-rt-saved { font-family: var(--font-mono); font-size: 10.5px; color: var(--ok); }

/* Seitenspalte breiter als im Standardraster: die Fahrtdaten haben Zahlenfelder in zwei Spalten. */
.as-rt-layout { grid-template-columns: minmax(0, 1fr) 380px; }
@media (max-width: 1100px) { .as-rt-layout { grid-template-columns: minmax(0, 1fr); } .as-rt-side { order: -1; } }

/* ---------- Fragen ---------- */
.as-rt-questions { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.as-rt-section { margin: 10px 0 0; }
.as-rt-section h3 { font-size: 13px; font-family: var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); }
.as-rt-section p { margin: 4px 0 0; font-size: 12px; }

.as-rt-q {
    border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel);
    padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0;
}
.as-rt-q.flagged { border-left: 3px solid var(--fault); }
.as-rt-q.missing { border-color: color-mix(in srgb, var(--warn) 60%, transparent); }
.as-rt-q.retired { opacity: .7; }
.as-rt-q-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.as-rt-q-title { display: flex; align-items: center; gap: 6px; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.as-rt-req { color: var(--fault); font-weight: 700; }
.as-rt-q-state { display: flex; align-items: center; gap: 6px; flex: none; }
.as-rt-flag-tag {
    font-family: var(--font-mono); font-size: 10px; letter-spacing: .04em; color: var(--fault);
    border: 1px solid color-mix(in srgb, var(--fault) 50%, transparent); border-radius: 20px; padding: 1px 8px; white-space: nowrap;
}
.as-rt-done { color: var(--ok); font-weight: 700; }

/* Wahlknöpfe (Ja/Nein, Einzel- und Mehrfachwahl): große Flächen, auf dem Telefon mit dem
   Daumen zu treffen. Die Stufen einer Skala zeichnet ScaleSpectrum (assess-scales.css). */
.as-rt-levels { display: flex; flex-wrap: wrap; gap: 6px; }
/* Die Vorgabefarbe ohne Gewicht (:where): die Stufenfarbe aus assessment.css (.as-c-…)
   hat dieselbe Spezifität und stünde sonst hinter dieser Datei zurück – jede gewählte
   Stufe sah grau aus. */
:where(.as-rt-level) { --as-c: var(--text-dim); }
.as-rt-level {
    min-width: 46px; min-height: 42px; padding: 4px 12px; display: inline-flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 1px; cursor: pointer;
    border: 1px solid color-mix(in srgb, var(--as-c) 55%, var(--line)); border-radius: var(--radius-sm);
    background: var(--panel-inset); color: var(--text); font-family: var(--font-ui); font-size: 13px;
    transition: background .12s, border-color .12s, transform .05s;
}
.as-rt-level:hover:not(:disabled) { border-color: var(--as-c); background: color-mix(in srgb, var(--as-c) 10%, var(--panel-inset)); }
.as-rt-level:active:not(:disabled) { transform: translateY(1px); }
.as-rt-level.on { background: var(--as-c); border-color: var(--as-c); color: #fff; font-weight: 600; }
.as-rt-level.as-c-neutral.on { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.as-rt-level:disabled { cursor: default; }
.as-rt-level:disabled:not(.on) { opacity: .55; }
.as-rt-choice { flex-direction: row; gap: 6px; }
.as-rt-na { font-size: 12px; color: var(--text-dim); border-style: dashed; }
.as-rt-na.on { background: var(--text-dim); border-color: var(--text-dim); color: var(--panel); }
.as-rt-box { font-size: 14px; }

.as-rt-number .input { max-width: 180px; }
.as-rt-q-comment { display: flex; flex-direction: column; gap: 4px; }
.as-rt-invalid { border-color: var(--warn) !important; }

/* Anhänge: Vorschaubilder in einer Reihe, der Knopf zum Anhängen als letzte Kachel. */
.as-rt-att { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.as-rt-att-item { position: relative; }
.as-rt-att-item img { width: 72px; height: 72px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); display: block; }
.as-rt-att-file { display: inline-flex; align-items: center; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 4px; font-size: 12px; color: var(--text); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.as-rt-att-item a { text-decoration: none; }
.as-rt-att-del {
    position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%;
    border: 1px solid var(--line-strong); background: var(--panel); color: var(--text-dim); cursor: pointer; font-size: 10px; line-height: 1;
}
.as-rt-att-del:hover { color: var(--fault); border-color: var(--fault); }
.as-rt-att-add {
    position: relative; display: inline-flex; align-items: center; height: 32px; padding: 0 12px; cursor: pointer;
    border: 1px dashed var(--line-strong); border-radius: 4px; font-size: 12px; color: var(--text-dim);
}
.as-rt-att-add:hover { border-color: var(--accent); color: var(--text); }
.as-rt-att-add.busy { opacity: .6; cursor: progress; }
.as-rt-att-add input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }

/* ---------- Fahrtdaten ---------- */
.as-rt-fields { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
/* minmax(0, …): Ein datetime-local-Feld hat eine Mindestbreite, die in der schmalen
   Seitenspalte über 1fr hinausgeht – das Ende-Feld ragte sonst über den Panelrand. */
.as-rt-grid { gap: 10px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.as-rt-grid .input { min-width: 0; }
.as-rt-distance { font-size: 12.5px; color: var(--text-dim); min-height: 16px; margin-top: -4px; }
.as-rt-road-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.as-rt-road-row label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--text-dim); }
.as-rt-programs { gap: 8px; }
.as-rt-program { display: grid; grid-template-columns: minmax(70px, 1fr) minmax(80px, 2fr) 64px auto; gap: 8px; align-items: center; }
.as-rt-program-name { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.as-rt-program input[type=range] { width: 100%; accent-color: var(--accent); }
.as-rt-program .input { height: 30px; padding: 0 6px; }
.as-rt-target { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-faint); white-space: nowrap; }
.as-rt-figures ul { margin: 6px 0 0; }

.as-rt-finish { display: flex; justify-content: flex-end; padding: 6px 0 20px; }

@media (max-width: 640px) {
    .as-rt-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .as-rt-program { grid-template-columns: minmax(0, 1fr) 64px; }
    .as-rt-program input[type=range] { grid-column: 1 / -1; grid-row: 2; }
    .as-rt-head-title { font-size: 16px; }
    .as-rt-finish .btn { width: 100%; }
}
