/* ==========================================================================
   宜宇 · 群聊（/room）  +  消息中心群列表（/msg?tab=group）
   ========================================================================== */

.rm-wrap {
  padding-bottom: 4px;
}

/* ---- 顶部「回活动详情」线索条 ---- */
.rm-ref {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  margin: 0 0 8px;
  background: var(--bg-card, #fff);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .05);
  color: var(--text-primary, #1b1f2a);
  text-decoration: none;
}
.rm-ref__i { display: inline-flex; color: var(--brand, #18a058); }
.rm-ref__i svg { width: 17px; height: 17px; }
.rm-ref__t { flex: 1; font-size: 13.5px; font-weight: 600; }
.rm-ref__ar { color: var(--text-third, #9aa3af); }

/* ---- 群头部：标题 + 成员头像墙 ----
   20260923rmt1：改为 sticky，翻消息时群名常驻（原来会被顶走）。
   停在站点顶栏 .yq-hd 下方 —— 该顶栏自身是 sticky top:0，高度 --hd-h + --safe-top。
   ⚠️ 两个变量都必须带兜底值：calc() 里任何一个变量未定义都会让整条 top 失效，
      sticky 会退化成贴滚动容器顶，正好被顶栏盖住。 */
.rm-top {
  position: sticky;
  top: calc(var(--hd-h, 52px) + var(--safe-top, 0px));
  z-index: 5;
  padding: 12px 14px 14px;
  margin-bottom: 8px;
  background: var(--bg-card, #fff);
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .05), 0 4px 12px rgba(15, 23, 42, .05);
}
.rm-top__row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}
.rm-top__t {
  flex: 1;
  min-width: 0;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary, #1b1f2a);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rm-top__n {
  flex: none;
  font-size: 12px;
  color: var(--text-third, #9aa3af);
}
.rm-top__ava {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.rm-top__more {
  font-size: 12px;
  color: var(--text-third, #9aa3af);
  padding-left: 2px;
}

/* 成员肤色 xs 头像（项目里只有 sm/md，群墙需要更小一号） */
.yq-ava--xs {
  width: 26px;
  height: 26px;
  font-size: 11px;
  border-radius: 50%;
}

/* ---- 消息：别人带昵称，自己不带 ---- */
.rm-list { padding-top: 2px; }

/* 20260924rm2：群聊消息排版**完全对齐私聊** —— 唯一差别只是多一行昵称。
   ★ 以前 .rm-col 没写 align-items，默认 stretch → 气泡被拉宽到「昵称那一行的宽度」，
     短消息也变成一整条横幅，跟私聊的紧凑气泡完全不像；
     .rm-msg 还自带 margin-bottom:12px，叠在 .ct-list 的 gap 上，行距比私聊大一倍。 */
.rm-msg {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2, 8px);
  /* 行距统一交给 .ct-list 的 gap（与私聊同一条规则） */
  margin-bottom: 0;
}
.rm-msg.is-mine {
  flex-direction: row-reverse;
}
.rm-col {
  display: flex;
  flex-direction: column;
  /* ★ 昵称与气泡都按自身内容宽度收缩，不再拉伸成整条横幅 */
  align-items: flex-start;
  gap: 3px;
  min-width: 0;
  /* 总宽由 .ct-msg 的 max-width:82% 统一控制 —— 与私聊同口径，不再额外收窄到 72% */
  max-width: 100%;
}
.rm-msg.is-mine .rm-col { align-items: flex-end; }

.rm-nm {
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--text-third, #9aa3af);
  margin: 0 2px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 乐观回显（还没拿到服务端 id）时压一压透明度，失败也看得出来 */
.rm-msg[data-local="1"] .ct-bubble { opacity: .72; }

/* ---- 系统提示条（进群 / 系统消息）---- */
.rm-sys {
  text-align: center;
  margin: 6px 0 14px;
}
.rm-sys span {
  display: inline-block;
  max-width: 80%;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--bg-soft, rgba(15, 23, 42, .05));
  color: var(--text-third, #9aa3af);
  font-size: 11.5px;
  line-height: 1.6;
}

/* ---- 消息中心：群会话 ---- */
.ms-th--group .ms-th__ava {
  position: relative;
}
.ms-th--group .ms-th__gico {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--brand, #18a058);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-card, #fff);
}
.ms-th--group .ms-th__gico svg { width: 9px; height: 9px; }
.ms-th__badge {
  flex: none;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--brand, #18a058);
  background: rgba(24, 160, 88, .1);
}

/* 组群入口浮动条：消息页右下角一个 +
   不做悬浮圆按钮（会遮内容），塞在 tab 行尾更稳 */
.ms-tabs__add {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand, #18a058);
  background: rgba(24, 160, 88, .1);
  text-decoration: none;
}
.ms-tabs__add svg { width: 13px; height: 13px; }
