/* PC 主站新消息气泡提醒 —— 视觉与 ④ 聊天部件（im-chat.js）统一：
   同源字体、配色(text1/text2/text3、primary、green、red、border)、圆角与阴影层级。
   位置在 JS 中动态计算，避开右下角 IM 启动条(#im-bar) 与 AI 卡片(ai-launcher)。 */
@keyframes jynBubbleSlideIn {
  from { opacity: 0; transform: translateX(60px) scale(0.9); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes jynBubbleSlideOut {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to   { opacity: 0; transform: translateX(60px) scale(0.9); }
}

.msg-bubble-notification{
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 320px;
  max-width: calc(100vw - 40px);
  box-sizing: border-box;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12), 0 2px 6px rgba(0,0,0,.06);
  z-index: 99999;
  cursor: pointer;
  overflow: hidden;
  font-family: -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;
  -webkit-font-smoothing: antialiased;
  animation: jynBubbleSlideIn .38s cubic-bezier(.34,1.56,.64,1);
  transition: transform .15s ease, box-shadow .15s ease;
}
.msg-bubble-notification:hover{ transform: translateY(-2px); box-shadow: 0 12px 32px rgba(0,0,0,.16), 0 4px 10px rgba(0,0,0,.08); }
.msg-bubble-notification:active{ transform: translateY(0); }
.msg-bubble-notification.closing{ animation: jynBubbleSlideOut .25s ease-in forwards; }

.msg-bubble-header{ display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding-right: 18px; }

/* 头像：与 .im-conv-av 一致的圆形 + 背景图铺满 + 字母兜底 */
.msg-bubble-av{
  width: 40px; height: 40px; border-radius: 50%;
  background-color: #1a73e8; background-size: cover; background-position: center;
  flex-shrink: 0; position: relative;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px; font-weight: 500;
}
.msg-bubble-av .on-dot{
  position: absolute; right: 0; bottom: 0;
  width: 10px; height: 10px; border-radius: 50%;
  background: #34a853; border: 2px solid #fff; box-sizing: content-box;
}
.msg-bubble-av .u-badge{
  position: absolute; right: -4px; top: -4px;
  min-width: 16px; height: 16px; padding: 0 4px; box-sizing: content-box;
  background: #ea4335; color: #fff; border: 2px solid #fff; border-radius: 8px;
  font-size: 10px; font-weight: bold; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}

.msg-bubble-info{ flex: 1; min-width: 0; }
.msg-bubble-name{
  font-size: 14px; font-weight: 600; color: #202124; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.msg-bubble-time{ font-size: 11px; color: #9aa0a6; margin-top: 2px; }

.msg-bubble-content{
  font-size: 13px; color: #5f6368; line-height: 1.5; word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.msg-bubble-close{
  position: absolute; top: 8px; right: 8px;
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #9aa0a6; font-size: 16px; line-height: 1; cursor: pointer;
  transition: background .15s, color .15s;
}
.msg-bubble-close:hover{ background: #f5f6fa; color: #5f6368; }
