/**
 * Chats-/Posteingangsliste — Farben aus oberflaechen-farben.css.
 * Kompakte Dichte (mobile Inbox): enge Abstände, keine übergroßen Titel oder Avatare.
 */

.posteingang-vorlage-rahmen {
  width: 100%;
  max-width: none;
  flex: 1;
  min-height: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at top, rgb(34, 30, 45) 0%, var(--seite-verlauf-aussen) 60%);
  overflow: hidden;
  position: relative;
  padding-top: max(8px, env(safe-area-inset-top));
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
}

.posteingang-vorlage-kopfbereich {
  flex-shrink: 0;
  padding: 11px 14px 9px;
}

.posteingang-vorlage-titelzeile {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.posteingang-vorlage-ueberschrift {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.06em;
  color: var(--text);
}

.posteingang-vorlage-kopfaktionen {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.posteingang-vorlage-iconknopf {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--linie);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  font-size: 1.05rem;
  padding: 0;
}

.posteingang-vorlage-iconknopf:focus-visible {
  outline: 2px solid var(--kontur-fokus-akzent);
  outline-offset: 2px;
}

.messenger-kopf-bereichsaktionen .messenger-kopf-bereichs-knopf.iconpanel-knopf {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  margin: 0;
  border-radius: 13px;
  border: 1px solid var(--linie);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  color: var(--textLeise, rgba(255, 255, 255, 0.55));
}

.messenger-kopf-bereichsaktionen .messenger-kopf-bereichs-knopf.iconpanel-knopf:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text, #fff);
}

.messenger-kopf-bereichsaktionen .messenger-kopf-bereichs-knopf.iconpanel-knopf--aktiv {
  background: var(--akzentWeich, rgba(99, 102, 241, 0.22));
  color: var(--akzent, #818cf8);
}

.messenger-kopf-bereichsaktionen .iconpanel-knopf-symbol {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.messenger-kopf-bereichsaktionen .iconpanel-knopf-symbol svg {
  display: block;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.posteingang-vorlage-registerleiste {
  display: flex;
  gap: 8px;
  margin-bottom: 11px;
  flex-wrap: wrap;
}

.posteingang-vorlage-registerkarte {
  padding: 8px 12px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--textLeise);
  font-size: 13px;
  font-weight: 600;
  position: relative;
  cursor: pointer;
  border: none;
  font-family: inherit;
  line-height: 1.2;
}

.posteingang-vorlage-registerkarte.aktiv {
  background: linear-gradient(135deg, var(--navigation-fab-start), var(--navigation-fab-ende));
  color: var(--weiss);
  box-shadow: 0 0 16px rgba(255, 60, 130, 0.28);
}

.posteingang-vorlage-registerkarte--mit-abzeichen {
  padding-right: clamp(18px, 5vmin, 26px);
}

.posteingang-vorlage-register-abzeichen {
  position: absolute;
  top: -4px;
  right: 2px;
  min-width: clamp(16px, 4.5vmin, 22px);
  height: clamp(16px, 4.5vmin, 22px);
  padding: 0 4px;
  box-sizing: border-box;
  border-radius: 999px;
  background: var(--navigation-touch-kreis);
  color: #fff;
  font-size: clamp(8px, 2.4vmin, 11px);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--navigation-badge-rand, rgba(255, 255, 255, 0.35));
  pointer-events: none;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

.posteingang-vorlage-register-abzeichen[hidden] {
  display: none !important;
}

#gruppenchat-haupt-inhalt.posteingang-register-inhalt:not([hidden]) {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.posteingang-vorlage-hinweiszahl {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 50%;
  background: var(--akzent);
  color: var(--weiss);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-variant-numeric: tabular-nums;
}

.posteingang-vorlage-suchfeld {
  width: 100%;
  height: 42px;
  border-radius: 14px;
  background: var(--eingabe);
  border: 1px solid var(--linie);
  display: flex;
  align-items: center;
  padding: 0 12px;
  margin-bottom: 10px;
}

.posteingang-vorlage-suchfeld-symbol {
  flex-shrink: 0;
  opacity: 0.6;
  font-size: 0.95rem;
}

.posteingang-vorlage-sucheingabe {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  width: 100%;
  font-size: 14px;
  margin-left: 8px;
  font-family: inherit;
}

.posteingang-vorlage-sucheingabe::placeholder {
  color: var(--textLeise);
}

.posteingang-vorlage-schnellblicke-streifen {
  display: flex;
  flex-wrap: nowrap;
  gap: 9px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 7px;
  margin-bottom: 5px;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  scroll-snap-type: x proximity;
}

.posteingang-vorlage-schnellblicke-streifen::-webkit-scrollbar {
  display: none;
}

.posteingang-vorlage-schnellblick-eintrag,
.posteingang-vorlage-schnellblick-knopf {
  flex: 0 0 auto;
  min-width: 56px;
  text-align: center;
  scroll-snap-align: start;
}

.posteingang-vorlage-schnellblick-knopf {
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.posteingang-vorlage-schnellblick-knopf:active {
  opacity: 0.88;
}

.posteingang-vorlage-schnellblick-ring {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, var(--navigation-fab-start), var(--treffer-swipe-violett));
  position: relative;
  margin: 0 auto;
}

.posteingang-vorlage-schnellblick-ring img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--seite-verlauf-aussen);
  display: block;
}

.posteingang-vorlage-praesenzpunkt {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--live);
  position: absolute;
  bottom: 2px;
  right: 2px;
  border: 2px solid var(--seite-verlauf-aussen);
}

.posteingang-vorlage-schnellblick-name {
  margin-top: 4px;
  font-size: 11px;
  color: var(--textLeise);
  line-height: 1.2;
  max-width: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-left: auto;
  margin-right: auto;
}

.posteingang-vorlage-unterhaltungsliste {
  padding: 0 10px 88px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.posteingang-vorlage-unterhaltungsliste::-webkit-scrollbar {
  width: 3px;
}

.posteingang-vorlage-unterhaltungsliste::-webkit-scrollbar-thumb {
  background: #2a2a32;
  border-radius: 50px;
}

.posteingang-vorlage-unterhaltungszeile {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 16px;
  transition: background 0.2s;
  position: relative;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
}

@media (hover: hover) and (pointer: fine) {
  .posteingang-vorlage-unterhaltungszeile:hover {
    background: rgba(255, 255, 255, 0.04);
  }
}

.posteingang-vorlage-unterhaltungszeile:active {
  background: rgba(255, 255, 255, 0.06);
}

.posteingang-vorlage-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 10px;
  flex-shrink: 0;
}

.posteingang-vorlage-zeileninhalt {
  flex: 1;
  min-width: 0;
}

.posteingang-vorlage-zeileninhalt-kopf {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 3px;
}

.posteingang-vorlage-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.posteingang-vorlage-zeit {
  font-size: 11px;
  color: var(--textLeise);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.posteingang-vorlage-vorschautext {
  color: var(--textLeise);
  font-size: 13px;
  line-height: 1.28;
  width: 100%;
  max-width: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.posteingang-vorlage-ungelesen-mal {
  min-width: 21px;
  height: 21px;
  padding: 0 5px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navigation-fab-start), var(--treffer-swipe-violett));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  margin-left: 8px;
  flex-shrink: 0;
  color: var(--weiss);
  box-shadow: 0 0 10px rgba(255, 60, 130, 0.35);
  font-variant-numeric: tabular-nums;
}

.posteingang-vorlage-schwebe-erstellen {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--navigation-fab-start), var(--navigation-fab-ende));
  position: absolute;
  bottom: calc(20px + env(safe-area-inset-bottom));
  right: calc(14px + env(safe-area-inset-right));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  line-height: 1;
  color: var(--weiss);
  box-shadow: 0 0 24px rgba(255, 60, 130, 0.42);
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.posteingang-vorlage-schwebe-erstellen:focus-visible {
  outline: 2px solid var(--kontur-fokus-akzent);
  outline-offset: 2px;
}

.posteingang-vorlage-haupthorizont {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

html.posteingang-vorlage-wurzel,
body.posteingang-vorlage-wurzel {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body.posteingang-vorlage-wurzel {
  background: var(--hintergrund);
  font-family: Inter, system-ui, sans-serif;
  color: var(--text);
  overflow: hidden;
}

body.posteingang-vorlage-wurzel * {
  box-sizing: border-box;
}

/* Eingebettet (#ansicht-nachrichten) + Kopf mit Zurück */
.posteingang-vorlage-titelblock {
  flex: 1;
  min-width: 0;
}

.posteingang-vorlage-kopf-zaehler {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--textLeise);
  margin-top: 2px;
  line-height: 1.3;
}

.posteingang-vorlage-kopf-zaehler[hidden] {
  display: none !important;
}

.posteingang-vorlage-titelzeile-mit-zurueck {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin-bottom: 11px;
}

.posteingang-vorlage-titelblock--suche {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.posteingang-vorlage-suchfeld--kopfzeile {
  flex: 1 1 auto;
  min-width: 0;
  margin-bottom: 0;
}

.posteingang-vorlage-titelzeile-mit-zurueck > .posteingang-vorlage-titelblock .posteingang-vorlage-ueberschrift {
  margin: 0;
  line-height: 1.05;
}

.posteingang-vorlage-leer-hinweis {
  margin: 0;
  flex-shrink: 0;
  padding: 16px 14px;
  text-align: center;
  font-size: 13px;
  color: var(--textLeise);
  line-height: 1.4;
}

.posteingang-vorlage-leer-hinweis[hidden] {
  display: none !important;
}

.posteingang-vorlage-unterhaltungszeile-von-mir {
  border: 1px solid var(--akzent-umriss-zart);
  background: rgba(255, 77, 122, 0.04);
}

@media (hover: hover) and (pointer: fine) {
  .posteingang-vorlage-unterhaltungszeile-von-mir:hover {
    background: rgba(255, 77, 122, 0.07);
  }
}

.posteingang-vorlage-schliessen-svg {
  display: flex;
}

.posteingang-vorlage-schliessen-svg svg {
  width: 18px;
  height: 18px;
}

#ansicht-chat #seiteMessenger.seite-messenger {
  flex: 1 1 0%;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

#seiteMessenger .seite-messenger-inhalt {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

#seiteMessenger .gruppenchat-zwei-spalten {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#seiteMessenger #gruppenchat-panel-online {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#ansicht-nachrichten .posteingang-vorlage-haupthorizont {
  flex: 1;
  min-height: 0;
  height: auto;
  max-height: 100%;
}

#ansicht-nachrichten .posteingang-vorlage-rahmen {
  margin: 0;
  width: 100%;
  max-width: none;
  padding-top: max(4px, env(safe-area-inset-top));
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
}

#ansicht-nachrichten .posteingang-vorlage-ueberschrift {
  font-size: clamp(19px, 4.9vw, 24px);
  letter-spacing: -0.05em;
}

#ansicht-nachrichten .posteingang-vorlage-unterhaltungsliste {
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
}

#ansicht-nachrichten .posteingang-vorlage-schwebe-erstellen {
  bottom: calc(68px + env(safe-area-inset-bottom));
  right: calc(12px + env(safe-area-inset-right));
}

#ansicht-nachrichten .posteingang-vorlage-iconknopf:disabled,
#ansicht-nachrichten .posteingang-vorlage-schwebe-erstellen:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

body.posteingang-vorlage-wurzel .posteingang-vorlage-unterhaltungsliste {
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
}
