/* §NEWCHAT/§AVATAR-2026-09-18 — Kontaktliste im "Neuer Chat"-Sheet, runde
 * Avatare (Profil/Gruppe), Gruppenbild-Feld, Umbenennen-Sheet.
 * Regeln innerhalb der Mobile-Shell tragen #ec-mobile-shell vierfach
 * (mobile-overrides.css eskaliert mit dreifacher ID). */

/* ── Avatare ─────────────────────────────────────────────────────────────── */
.ec-av-has { position: relative !important; overflow: hidden !important; border-radius: 50% !important; }
img.ec-av-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  border-radius: 50%; display: block; z-index: 1; pointer-events: none; user-select: none;
}
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-av-has { position: relative; overflow: hidden; border-radius: 50%; }
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell img.ec-av-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; z-index: 1;
}
/* Präsenzpunkt der Chatliste bleibt über dem Bild sichtbar. */
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ecm-chat-avatar.ec-av-has > i { z-index: 2; }
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-av-slot { position: relative; }

/* ── "Neuer Chat": Kontakte ──────────────────────────────────────────────── */
.nc-contacts {
  margin-top: 6px; padding-top: 14px; border-top: 1px solid rgba(161, 161, 161, .18);
  display: flex; flex-direction: column; gap: 10px; min-height: 0;
}
.nc-contacts-head { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--text2, #979797); font-weight: 600; padding: 0 2px; }
.nc-contacts-search {
  width: 100%; box-sizing: border-box; min-height: 42px; border-radius: 12px; padding: 0 14px;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(161, 161, 161, .2); color: var(--text, #ececec);
  font: inherit; font-size: 15px;
}
.nc-contacts-search:focus { outline: none; border-color: rgba(175, 175, 175, .55); }
.nc-contacts-list {
  display: flex; flex-direction: column; gap: 6px; max-height: 38vh; overflow-y: auto;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
}
.nc-contact {
  display: grid; grid-template-columns: 42px minmax(0, 1fr) 16px; align-items: center; gap: 12px;
  min-height: 56px; padding: 6px 10px; border-radius: 12px; border: 1px solid rgba(161, 161, 161, .14);
  background: rgba(255, 255, 255, .03); color: var(--text, #ececec); font: inherit; text-align: left; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.nc-contact[hidden] { display: none; }
.nc-contact:active { background: rgba(175, 175, 175, .08); }
.nc-av {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 15px;
  background: linear-gradient(145deg, #373737, #131313); position: relative;
}
.nc-dot {
  position: absolute; right: 0; bottom: 0; width: 11px; height: 11px; border-radius: 50%;
  background: #535353; border: 2px solid var(--bg2, #121212); z-index: 2;
}
.nc-contact.is-online .nc-dot { background: #9b9b9b; }
.nc-copy { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.nc-copy strong, .nc-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nc-copy small { font-size: 12.5px; color: var(--text2, #979797); }
.nc-contact.is-online .nc-copy small { color: #b8b8b8; }
.nc-go { color: var(--text2, #979797); font-size: 20px; }
.nc-empty { margin: 0; padding: 14px 6px; font-size: 13px; color: var(--text2, #979797); text-align: center; }

/* ── Gruppe erstellen: Bildfeld ──────────────────────────────────────────── */
.ec-cg-image-row { display: flex; align-items: center; gap: 14px; }
.ec-cg-image-btn {
  flex: 0 0 auto; width: 64px; height: 64px; border-radius: 50%; padding: 0; cursor: pointer;
  border: 1px dashed rgba(175, 175, 175, .45); background: rgba(175, 175, 175, .06);
}
.ec-cg-image-preview { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; font-size: 24px; position: relative; overflow: hidden; }
.ec-cg-image-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ec-cg-image-copy strong { font-size: 14px; }
.ec-cg-image-copy small { font-size: 12px; color: var(--text2, #979797); line-height: 1.35; }

/* ── Gruppen-Info: Aktionen ──────────────────────────────────────────────── */
.gs-meta-actions { display: flex; gap: 8px; justify-content: center; margin-top: 8px; flex-wrap: wrap; }
.gs-meta-btn {
  min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(161, 161, 161, .25);
  background: rgba(255, 255, 255, .04); color: var(--text, #ececec); font: inherit; font-size: 13px; cursor: pointer;
}
#gs-avatar-btn.ec-av-has { font-size: 0; }

/* ── Umbenennen-Sheet ────────────────────────────────────────────────────── */
.ec-rename-sheet[hidden] { display: none !important; }
.ec-rename-sheet {
  position: fixed; inset: 0; z-index: 2147482700; background: rgba(6, 6, 6, .55);
  display: flex; align-items: flex-end; justify-content: center;
}
.ec-rename-card {
  width: 100%; max-width: 440px; box-sizing: border-box; background: var(--bg2, #121212); color: var(--text, #ececec);
  border: 1px solid rgba(161, 161, 161, .18); border-radius: 18px 18px 0 0; padding: 18px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 10px;
}
.ec-rename-card input {
  min-height: 46px; border-radius: 12px; padding: 0 14px; font: inherit; font-size: 16px;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(161, 161, 161, .25); color: inherit;
}
.ec-rename-card small { color: var(--text2, #979797); font-size: 12px; }
.ec-rename-actions { display: flex; gap: 10px; }
.ec-rename-actions .btn { flex: 1; }
@media (min-width: 900px) { .ec-rename-sheet { align-items: center; } .ec-rename-card { border-radius: 18px; } }
