/* ===== 群聊样式：列表 / 聊天气泡补充 / 管理弹层 ===== */
/* 顶部主 tab（好友/群聊）：在子 tab 之上，间距略收 */
.main-tabs { margin-bottom: 8px; }

/* ＋ 建群按钮：全宽描边样式 */
.btn-create-group { width: 100%; padding: 10px; margin-bottom: 10px; background: white; color: #5a67d8; border: 1px dashed #5a67d8; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 600; }
.btn-create-group:hover { background: #f0f4ff; }

/* 群头像圆标：复用 friend-avatar 尺寸，换个背景色区分 */
.group-avatar { width: 40px; height: 40px; border-radius: 50%; background: #38a169; color: white; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; flex-shrink: 0; }

/* 群聊头部 ⚙ 管理按钮 */
.btn-group-manage { background: none; border: none; font-size: 20px; cursor: pointer; padding: 0 4px; color: #718096; }
.btn-group-manage:hover { color: #2d3748; }

/* 群消息：别人消息上方的发送者昵称 */
.group-sender-name { font-size: 12px; color: #a0aec0; margin-bottom: 2px; }
.chat-msg .group-msg-body { display: flex; flex-direction: column; max-width: 65%; }
.chat-msg .group-msg-body .chat-msg-bubble { max-width: 100%; }

/* ===== 群管理弹层 ===== */
.group-modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 100; display: flex; align-items: center; justify-content: center; }
.group-modal { background: white; border-radius: 12px; width: 420px; max-width: 92vw; max-height: 80vh; display: flex; flex-direction: column; overflow: hidden; }
.group-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid #e2e8f0; font-weight: 700; font-size: 16px; color: #2d3748; }
.group-modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: #a0aec0; line-height: 1; }
.group-modal-close:hover { color: #2d3748; }
.group-modal-body { padding: 12px 16px; overflow-y: auto; }
.group-manage-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; font-size: 14px; color: #4a5568; }
.group-manage-row select { flex: 1; padding: 6px 8px; border: 1px solid #e2e8f0; border-radius: 6px; font-size: 14px; }
.btn-mini { padding: 5px 12px; background: #5a67d8; color: white; border: none; border-radius: 6px; cursor: pointer; font-size: 13px; white-space: nowrap; }
.btn-mini:disabled { background: #cbd5e0; cursor: not-allowed; }

/* 成员列表 */
.group-member-list { border-top: 1px solid #edf2f7; padding-top: 8px; }
.group-member-item { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid #f7fafc; }
.group-member-avatar { width: 32px; height: 32px; border-radius: 50%; background: #5a67d8; color: white; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; flex-shrink: 0; overflow: hidden; }
.group-member-avatar img { width: 100%; height: 100%; object-fit: cover; }
.group-member-name { flex: 1; font-size: 14px; color: #2d3748; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.role-badge { font-size: 11px; padding: 1px 6px; border-radius: 6px; margin-left: 4px; }
.role-badge.owner { background: #fefcbf; color: #975a16; }
.role-badge.admin { background: #c6f6d5; color: #276749; }
.group-member-item .btn-mini { background: #e0e7ff; color: #4c51bf; }
.group-member-item .btn-mini.btn-kick { background: #fed7d7; color: #c53030; }

/* 弹层底部按钮 */
.group-modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.btn-danger { padding: 8px 16px; background: #fc8181; color: white; border: none; border-radius: 8px; cursor: pointer; font-size: 14px; }
.btn-danger:hover { background: #f56565; }

@media (max-width: 768px) {
    .group-modal { width: 94vw; }
    .group-manage-row select { font-size: 16px; min-height: 40px; }
    .btn-mini { padding: 8px 12px; min-height: 36px; }
}
