/* Xaira Sicherer KI-Chat: Reiter-Leiste und kompakte Karten fuer Vorlagen, Skills und Unterlagen (reiter.js).
   Nur Farben aus stil.css, keine Adressen, keine Importe. Ueberschreibt Masse aus stil.css bewusst (spaeter geladen). */

/* Leiste */
.rt-leiste { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 2px; border-bottom: 1px solid var(--linie); margin: 0 0 -1px; padding: 0 4px; }
.rt-reiter { background: none; border: 1px solid transparent; border-bottom: 0; color: var(--leise); padding: 6px 14px; font-size: 14px; border-radius: 8px 8px 0 0; }
.rt-reiter:hover { color: var(--text); background: var(--blau-hell); }
.rt-reiter.aktiv { color: var(--text); font-weight: 600; background: var(--karte); border-color: var(--linie); }
.rt-zu { margin-left: auto; padding: 6px 4px; font-size: 13px; }

/* Bereiche direkt unter der Leiste, niedriger als vorher */
.vorlagen-panel { max-height: 30vh; padding: 8px 12px; margin-bottom: 8px; }
.rt-leiste:not([hidden]) + .vorlagen-panel, .rt-leiste:not([hidden]) ~ .vorlagen-panel { border-top: 0; border-radius: 0 0 12px 12px; }
.vorlagen-kopf { margin-bottom: 4px; }
.vorlagen-kopf h2 { font-size: 15px; }
.vorlagen-kopf > .leise { font-size: 13px; }
/* Die Leiste hat schon "Schliessen": den Knopf im Bereich nur ausblenden, wenn die Leiste sichtbar ist */
.rt-leiste:not([hidden]) + .vorlagen-panel .vorlagen-kopf .text-knopf { display: none; }
/* Die Ueberschrift im Bereich steht schon als aktiver Reiter darueber */
.rt-leiste:not([hidden]) ~ .vorlagen-panel .vorlagen-kopf h2 { display: none; }

/* Vorlagen: kleine Zeilen statt grosser Karten (Titel, eine Zeile Text) */
.vorlagen-karten { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px; }
.vorlagen-karten button { padding: 5px 9px; gap: 0; border-radius: 8px; }
.vorlagen-karten .karten-titel { font-size: 13px; line-height: 1.3; }
.vorlagen-karten .karten-text { font-size: 12px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.vorlagen-karten .karten-datei { font-size: 11px; }

/* Skills und Unterlagen: dichtere Listen */
#skills-liste, .unterlagen-liste { gap: 3px; }
#skills-liste { max-height: 22vh; }
.unterlagen-liste li { padding: 4px 8px; }

@media (max-width: 760px) {
  .rt-reiter { padding: 6px 10px; }
  .vorlagen-panel { max-height: 38vh; }
}
