/* 广坊姬浮动聊天挂件 — 独立 CSS（不依赖 React/Tailwind） */
.gxw-chat-root {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif;
}
.gxw-chat-avatar {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.2s;
}
.gxw-chat-avatar:active { cursor: grabbing; transform: scale(1.05); }
.gxw-chat-avatar > * { pointer-events: none; }
.gxw-chat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* 在线指示点 */
.gxw-chat-online {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  background: #4ade80;
  border-radius: 50%;
  border: 2px solid #fff;
}
/* 未读红点 */
.gxw-chat-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 2px 8px rgba(239,68,68,0.5);
}
/* 聊天面板 */
.gxw-chat-panel {
  width: 288px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 320px;
}
/* 消息列表 */
.gxw-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  max-height: 210px;
}
.gxw-chat-empty {
  text-align: center;
  color: #9ca3af;
  font-size: 12px;
  padding: 32px 0;
}
/* 单条消息 */
.gxw-chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 100%;
}
.gxw-chat-msg.avatar { align-items: flex-start; }
.gxw-chat-msg.user { align-items: flex-end; }
.gxw-chat-msg-time {
  font-size: 9px;
  color: #9ca3af;
  margin-bottom: 2px;
  padding: 0 4px;
}
.gxw-chat-msg-bubble {
  max-width: 85%;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.5;
  border-radius: 16px;
  word-break: break-word;
}
.gxw-chat-msg.avatar .gxw-chat-msg-bubble {
  background: rgba(251, 207, 232, 0.7);
  color: #9d174d;
  border-bottom-left-radius: 4px;
}
.gxw-chat-msg.user .gxw-chat-msg-bubble {
  background: rgba(191, 219, 254, 0.7);
  color: #1e3a5f;
  border-bottom-right-radius: 4px;
}
/* 输入区 */
.gxw-chat-input-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
  border-top: 1px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.3);
}
.gxw-chat-input {
  flex: 1;
  padding: 6px 12px;
  font-size: 12px;
  background: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 20px;
  outline: none;
}
.gxw-chat-input:focus { border-color: #fcd34d; }
.gxw-chat-input::placeholder { color: #9ca3af; }
.gxw-chat-send {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(251, 191, 36, 0.8);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}
.gxw-chat-send:hover { background: #fbbf24; }
.gxw-chat-send:disabled { opacity: 0.3; cursor: not-allowed; }
.gxw-chat-close {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: #9ca3af;
  font-size: 20px;
  cursor: pointer;
  flex-shrink: 0;
}
.gxw-chat-close:hover { color: #4b5563; }
/* 跳动动画 */
@keyframes gxw-bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
.gxw-chat-avatar.bouncing {
  animation: gxw-bounce 0.6s ease-in-out;
}
@keyframes gxw-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.gxw-chat-avatar.idle {
  animation: gxw-float 3s ease-in-out infinite;
}
