/* ===== styles-chat.cssJ)Da / :J) / J~ / K / 9 / X	
    styles.css6b	}z, 5 M ===== */

/* 通讯录占位 + 资料卡 + 内容区聊天 */
.contact-placeholder { padding: 80px 20px; text-align: center; }
.contact-placeholder-icon { font-size: 48px; margin-bottom: 12px; }
.contact-placeholder-title { font-size: 16px; color: #374151; margin-bottom: 6px; }
.profile-card { display: flex; flex-direction: column; }
.profile-head { display: flex; align-items: center; gap: 16px; padding: 18px; border-bottom: 1px solid #e5e7eb; }
.profile-av { flex: 0 0 64px; width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: #e5e7eb; }
.profile-title { flex: 1 1 auto; }
.profile-title h2 { margin: 0 0 4px; font-size: 20px; }
.profile-body { padding: 16px 18px; }
.profile-row { display: flex; align-items: center; padding: 10px 0; border-bottom: 1px solid #f3f4f6; }
.profile-label { flex: 0 0 80px; color: #6b7280; font-size: 13px; }
.profile-value { flex: 1 1 auto; color: #111827; font-size: 14px; word-break: break-all; }
.chat-content-card { display: flex; flex-direction: column; height: calc(100vh - 92px); }
.chat-content-head { flex: 0 0 auto; }
.chat-content-list { flex: 1 1 auto; overflow-y: auto; padding: 14px; background: #f8fafc; }
.chat-content-inputbar { flex: 0 0 auto; display: flex; gap: 10px; padding: 12px; border-top: 1px solid #e5e7eb; background: #fff; }
.chat-content-inputbar .form-input { flex: 1 1 auto; }
.chat-content-inputbar .btn-primary { white-space: nowrap; flex-shrink: 0; min-width: fit-content; padding: 7px 18px; }
.sub-contact { cursor: pointer; user-select: none; }

/* 群聊查找聊天记录：高亮与命中项 */
mark.kw-hit { background: #fde68a; color: inherit; border-radius: 2px; padding: 0 1px; }
.gs-hit { padding: 8px 6px; border-bottom: 1px solid #e5e7eb; cursor: pointer; border-radius: 4px; }
.gs-hit:hover { background: #eef2ff; }
.gs-hit-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.gs-hit-name { font-size: 12px; color: #374151; font-weight: 600; }
.gs-hit-time { font-size: 11px; color: #9ca3af; flex-shrink: 0; }
.gs-hit-content { margin-top: 2px; font-size: 13px; color: #1f2937; word-break: break-all; }
#gs_search_result .muted { padding: 10px 4px; }
/* 跳转到消息时高亮闪烁 */
.chat-row-flash { animation: chatRowFlash 1.6s ease; }
@keyframes chatRowFlash {
  0% { background: #fde68a; box-shadow: 0 0 0 2px #f59e0b inset; }
  100% { background: transparent; box-shadow: none; }
}

/* 麦克风 / 通话按钮 */
.icon-btn { border: 1px solid #e5e7eb; background: #fff; color: #374151; border-radius: 6px; padding: 6px 10px; font-size: 15px; cursor: pointer; line-height: 1; transition: background .15s, border-color .15s; }
.icon-btn:hover { background: #f1f5f9; }
.mic-btn { flex: 0 0 auto; }
.mic-btn.recording { background: #fee2e2; border-color: #dc2626; color: #dc2626; animation: micPulse 1s infinite; }
@keyframes micPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(220,38,38,.5); } 50% { box-shadow: 0 0 0 5px rgba(220,38,38,0); } }

/* 通话弹窗 */
.call-overlay { position: fixed; inset: 0; z-index: 9999; display: none; align-items: center; justify-content: center; background: rgba(15,23,42,.82); backdrop-filter: blur(4px); }
.call-box { width: min(440px, 92vw); background: #0f172a; color: #fff; border-radius: 16px; padding: 26px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.call-box.call-video { width: min(760px, 94vw); }
.call-avatar { width: 84px; height: 84px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 6px auto 14px; font-size: 30px; color: #fff; font-weight: 700; }
.call-name { font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.call-status { font-size: 14px; color: #cbd5e1; min-height: 20px; margin: 10px 0 18px; }
.call-actions { display: flex; gap: 14px; align-items: center; justify-content: center; }
.call-ctrl { width: 52px; height: 52px; border-radius: 50%; font-size: 20px; background: #334155; color: #fff; border: none; cursor: pointer; }
.call-ctrl:hover { background: #475569; }
.call-ctrl.off { background: #7f1d1d; }
.call-hang { background: #dc2626; color: #fff; border: none; border-radius: 26px; padding: 12px 30px; font-size: 15px; cursor: pointer; }
.call-hang:hover { background: #b91c1c; }
.call-stage { position: relative; width: 100%; aspect-ratio: 4 / 3; background: #000; border-radius: 12px; overflow: hidden; margin-bottom: 8px; }
.call-remote { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.call-local { position: absolute; right: 10px; bottom: 10px; width: 28%; max-width: 160px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 8px; border: 2px solid rgba(255,255,255,.6); background: #1e293b; }
.call-audio-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.call-audio-overlay .call-avatar { width: 120px; height: 120px; font-size: 44px; margin: 0; }
/* 群聊：发送者名 + 群成员/建群弹窗 */
.chat-sender { font-size: 11px; color: #6b7280; margin-bottom: 2px; }
.chat-row.me .chat-sender { text-align: right; }
.chat-row.me .chat-sender, .chat-row.me .chat-time { color: rgba(255,255,255,.8); }
.grp-members { max-height: 280px; overflow-y: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 4px 2px; }
.grp-member { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #374151; cursor: pointer; }
.grp-member input { width: auto; }
.grp-mem-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 18px 10px; padding: 8px 4px; max-height: 420px; overflow-y: auto; }
.grp-mem-card { display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; }
.grp-mem-name { margin-top: 6px; font-size: 12px; color: #111827; font-weight: 500; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp-mem-dept { font-size: 11px; color: #9ca3af; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp-mem-tag { display: inline-block; margin-left: 2px; padding: 0 3px; background: #f59e0b; color: #fff; border-radius: 3px; font-size: 10px; transform: scale(0.85); transform-origin: left center; vertical-align: middle; }
.grp-mem-remove { position: absolute; top: -4px; right: calc(50% - 26px); width: 18px; height: 18px; line-height: 16px; text-align: center; border-radius: 50%; background: #ef4444; color: #fff; border: none; font-size: 14px; cursor: pointer; opacity: 0; transition: opacity .15s; }
.grp-mem-card:hover .grp-mem-remove { opacity: 1; }
.grp-mem-remove:hover { background: #dc2626; }
.grp-mem-add { cursor: pointer; }
.grp-mem-add-av { width: 56px; height: 56px; line-height: 54px; text-align: center; border-radius: 50%; border: 1px dashed #cbd5e1; color: #64748b; font-size: 28px; background: #f8fafc; }
.grp-mem-add:hover .grp-mem-add-av { border-color: #2563eb; color: #2563eb; background: #eff6ff; }

