/* teamchat.css — BERTA-W5 13.11.2026: Team-Chat (Bernegger Nr. 11). BERTA-W5d 15.11.2026: Leiste oben.
   Farben und Rundungen aus susi.css (:root). */

#teamchat-view.view { padding: 0; overflow: hidden; flex-direction: column }
.tc-wrap { display: flex; flex: 1; min-height: 0; height: 100% }

/* ── Liste links ── */
.tc-liste {
  width: 280px; flex: 0 0 280px; border-right: 1.5px solid var(--bdr);
  overflow-y: auto; padding: 22px 14px; background: var(--bg);
}
.tc-kopf h2 { font-size: 18px; font-weight: 700; margin: 0 6px 14px }
.tc-lbl {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em;
  color: var(--txt3); margin: 14px 8px 6px;
}
.tc-zeile {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 8px; border: none; background: none; border-radius: 12px;
  cursor: pointer; text-align: left; color: var(--txt);
}
.tc-zeile:hover { background: var(--bg2) }
.tc-zeile.tc-aktiv { background: var(--bg3) }
.tc-zeile-text { display: flex; flex-direction: column; min-width: 0; flex: 1 }
.tc-zeile-titel { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.tc-zeile.tc-neu .tc-zeile-titel { font-weight: 700 }
.tc-zeile-unter { font-size: 11px; color: var(--txt3) }
.tc-av {
  flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--acc), var(--cyan)); color: #fff;
  font-size: 12px; font-weight: 700;
}
.tc-punkt {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--acc); color: #fff; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ── Unterhaltung rechts ── */
.tc-raum { flex: 1; display: flex; flex-direction: column; min-width: 0; position: relative }
.tc-raum.tc-ziehen { outline: 2px dashed var(--acc); outline-offset: -8px }
.tc-raum-kopf {
  display: flex; align-items: baseline; gap: 12px; padding: 18px 24px 12px;
  border-bottom: 1.5px solid var(--bdr);
}
.tc-zurueck { display: none; border: none; background: none; color: var(--acc); cursor: pointer; font-size: 13px; font-weight: 600 }
.tc-raum-titel { font-size: 16px; font-weight: 700 }
.tc-raum-unter { font-size: 12px; color: var(--txt3) }
.tc-privat { font-size: 12px; color: var(--txt2); background: var(--bg2); padding: 6px 24px }
.tc-verlauf { flex: 1; overflow-y: auto; padding: 16px 24px }
.tc-leer { color: var(--txt3); text-align: center; padding: 48px 0; font-size: 13px }
.tc-aeltere {
  display: block; margin: 0 auto 12px; border: 1.5px solid var(--bdr2); background: #fff;
  color: var(--txt2); border-radius: 18px; padding: 5px 14px; font-size: 12px; cursor: pointer;
}
.tc-msg { display: flex; gap: 10px; margin: 0 0 12px; align-items: flex-start }
.tc-msg.tc-eigen { flex-direction: row-reverse }
.tc-blase {
  max-width: min(640px, 78%); background: var(--bg2); border: 1.5px solid var(--bdr);
  border-radius: 16px; padding: 8px 12px;
}
.tc-msg.tc-eigen .tc-blase { background: #fff; border-color: var(--bdr2) }
.tc-msg-kopf { display: flex; gap: 8px; align-items: baseline; font-size: 11px; color: var(--txt3) }
.tc-msg-name { font-weight: 600; color: var(--txt2) }
.tc-msg-weg {
  margin-left: auto; border: none; background: none; color: var(--txt3);
  cursor: pointer; font-size: 14px; line-height: 1; padding: 0 2px;
}
.tc-msg-weg:hover { color: var(--red) }
.tc-msg-text { white-space: pre-wrap; word-break: break-word; font-size: 14px; margin-top: 2px }
.tc-msg-text a { color: var(--acc) }

.tc-datei { margin-top: 8px; padding: 8px 10px; border-radius: 12px; background: #fff; border: 1px solid var(--bdr) }
.tc-datei.tc-datei-weg { opacity: .7 }
.tc-bild { display: block; max-width: 260px; max-height: 200px; border-radius: 8px; margin-bottom: 6px }
.tc-datei-zeile { display: flex; gap: 8px; align-items: baseline; font-size: 13px }
.tc-datei-name { font-weight: 500; word-break: break-all }
.tc-datei-groesse, .tc-datei-frist { font-size: 11px; color: var(--txt3) }
.tc-datei-knoepfe { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px }
.tc-knopf {
  border: 1.5px solid var(--bdr2); background: #fff; color: var(--txt2);
  border-radius: 14px; padding: 3px 10px; font-size: 12px; cursor: pointer; text-decoration: none;
}
.tc-knopf:hover { border-color: var(--acc); color: var(--acc) }
.tc-liegt { font-size: 11px; color: var(--grn); margin-top: 4px }

/* ── Eingabe ── */
.tc-eingabe { border-top: 1.5px solid var(--bdr); padding: 10px 24px 16px }
.tc-nurlesen, .tc-hinweis { font-size: 12px; color: var(--txt2); margin-bottom: 6px }
.tc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px }
.tc-chip {
  display: inline-flex; align-items: center; gap: 6px; background: var(--bg2);
  border: 1px solid var(--bdr); border-radius: 12px; padding: 2px 8px; font-size: 12px;
}
.tc-chip-x { border: none; background: none; cursor: pointer; color: var(--txt3) }
.tc-eingabe-zeile { display: flex; gap: 8px; align-items: flex-end }
.tc-clip { border: 1.5px solid var(--bdr2); background: #fff; border-radius: 12px; padding: 8px 10px; cursor: pointer }
.tc-feld {
  flex: 1; resize: none; min-height: 40px; max-height: 160px; padding: 9px 12px;
  border: 1.5px solid var(--bdr2); border-radius: 12px; font: inherit; font-size: 14px;
}
.tc-feld:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px rgba(37,99,235,.1) }
.tc-senden { white-space: nowrap }

/* ── Rueckfrage, Auswahl ── */
.tc-frage { z-index: 400 }
.tc-frage-satz { font-size: 14px; line-height: 1.55; color: var(--txt) }
.tc-frage-zusatz { font-size: 12px; color: var(--txt2); margin-top: 8px }
.tc-bib-liste { display: flex; flex-direction: column; gap: 8px; margin-top: 14px }
.tc-bib-wahl { text-align: left; border-radius: 12px }
.tc-bib-wahl:disabled { opacity: .55; cursor: default }

/* ── Seitenleiste ── */
#sb-teamchat-zahl {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--acc); color: #fff; font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ── BERTA-W5d 15.11.2026: Leiste oben bei Ungelesenem ── */
.tc-leiste {
  display: flex; align-items: center; gap: 10px; flex: 0 0 auto;
  padding: 8px 16px; background: var(--bg3); border-bottom: 1.5px solid var(--bdr2);
  font-size: 13px; color: var(--txt);
}
.tc-leiste-text { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.tc-leiste-an {
  border: none; background: var(--acc); color: #fff; border-radius: 14px;
  padding: 4px 12px; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.tc-leiste-weg { border: none; background: none; color: var(--txt3); cursor: pointer; font-size: 14px; padding: 0 2px }
.tc-leiste-weg:hover { color: var(--txt) }

/* ── Handy: erst die Liste, dann die Unterhaltung ── */
@media (max-width: 900px) {
  .tc-liste { width: 100%; flex: 1 1 auto; border-right: none }
  .tc-raum { display: none }
  .tc-wrap.tc-raum-offen .tc-liste { display: none }
  .tc-wrap.tc-raum-offen .tc-raum { display: flex }
  .tc-zurueck { display: inline-block }
  .tc-raum-kopf, .tc-verlauf, .tc-eingabe { padding-left: 14px; padding-right: 14px }
  .tc-blase { max-width: 86% }
}
