/**
 * Einheitliche App-Kopfzeile (Instagram/TikTok-Muster): Zurück | Titel | Aktionen.
 * Untere Tab-Navigation bleibt unverändert.
 */

#app-huelle.app-shell-v2 #app-sitzung-kopf {
  display: none !important;
}

#app-huelle.app-shell-v2 #ansicht-chat > .chat-kopf-eine-zeile {
  display: none !important;
}

#app-huelle.app-shell-v2 #home-kopf-menue,
#app-huelle.app-shell-v2 #home-kopf-nutzer-leiste {
  display: none !important;
}

#app-huelle.app-shell-v2 #app-globale-profil-knopf {
  display: none !important;
}

#app-huelle.app-shell-v2 .entdecken-kopf {
  display: none !important;
}

#app-huelle.app-shell-v2 #ansicht-entdecken {
  padding: 0;
  background: var(--seite-hintergrund, #ffffff);
}

#app-huelle.app-shell-v2 .entdecken-online-huelle {
  border-radius: 0;
  background: var(--seite-hintergrund, #ffffff);
}

#app-huelle.app-shell-v2 .gruppenchat-online-kopfzeile {
  display: none !important;
}

#app-huelle.app-shell-v2.nur-videochat #app-kopfzeile,
#app-huelle.app-wartet-auf-anmeldung #app-kopfzeile {
  display: none !important;
}

.app-kopfzeile {
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 48;
  /**
   * 1fr | auto | 1fr — Titel geometrisch mittig wie Instagram/WhatsApp,
   * unabhängig von breiter rechter Aktionsleiste (Profil, Match-Icons).
   */
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 8px;
  min-height: 52px;
  padding: max(6px, env(safe-area-inset-top)) 12px 8px;
  padding-left: max(12px, env(safe-area-inset-left));
  padding-right: max(12px, env(safe-area-inset-right));
  background: var(--glas-chrome-leiste-staerker, rgba(255, 255, 255, 0.98));
  backdrop-filter: var(--glas-chrome-unschaerfe-stark, blur(14px));
  -webkit-backdrop-filter: var(--glas-chrome-unschaerfe-stark, blur(14px));
  border-bottom: 1px solid var(--linie, #dbdbdb);
  box-shadow: var(--glas-chrome-schatten);
}

.app-kopfzeile[hidden] {
  display: none !important;
}

.app-kopfzeile-spalte {
  display: flex;
  align-items: center;
  min-width: 0;
}

.app-kopfzeile-links {
  grid-column: 1;
  justify-self: start;
  gap: 4px;
}

.app-kopfzeile-mitte {
  grid-column: 2;
  justify-self: center;
  justify-content: center;
  min-width: 0;
}

.app-kopfzeile-rechts {
  grid-column: 3;
  justify-self: end;
  justify-content: flex-end;
  gap: 8px;
}

.app-kopfzeile-titel {
  margin: 0;
  padding: 0 4px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text, #f4f4f6);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(52vw, 240px);
}

.app-kopfzeile-iconknopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text, #f4f4f6);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.app-kopfzeile-iconknopf:active {
  background: rgba(255, 255, 255, 0.08);
}

.app-kopfzeile-iconknopf svg {
  display: block;
}

.app-kopfzeile-anmelden {
  min-height: 36px;
  padding: 0 14px;
  border: none;
  border-radius: 999px;
  background: var(--akzent, #ff4d7a);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  font-family: system-ui, sans-serif;
  cursor: pointer;
}

.app-kopfzeile-anmelden:active {
  opacity: 0.88;
}

.app-kopfzeile-profil-knopf {
  position: relative;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.app-kopfzeile-profil-bild {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.app-kopfzeile-profil-punkt {
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--live, #34d399);
  box-shadow: 0 0 0 2px var(--hintergrund, #ffffff);
  pointer-events: none;
}

.app-kopfzeile-profil-knopf.app-kopfzeile-profil-knopf--getrennt .app-kopfzeile-profil-punkt {
  background: rgba(120, 120, 120, 0.9);
}

.app-kopfzeile-match-aktionen {
  display: flex;
  align-items: center;
  gap: 4px;
}

.app-kopfzeile-match-aktionen[hidden] {
  display: none !important;
}

.app-kopfzeile-match-aktionen .app-kopfzeile-iconknopf {
  color: #b794ff;
}

.app-kopfzeile-nutzer-name {
  max-width: min(36vw, 160px);
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 600;
  color: var(--text, #f4f4f6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
