/* ==========================================================================
   信易达 在线客服悬浮聊天组件（仿 Crisp 风格）
   ========================================================================== */
.w-wrap { position: fixed; right: 24px; bottom: 24px; z-index: 900; font-family: "Plus Jakarta Sans", "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif; }
.w-wrap.w-hidden { display: none !important; }
.cookie-bar.show ~ .w-wrap { display: none; }
.w-launcher {
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(135deg, #2943d1, #5b6bff);
  color: #fff; border: 0; cursor: pointer; position: relative;
  box-shadow: 0 10px 26px rgba(41, 67, 209, 0.45);
  display: flex; align-items: center; justify-content: center; font-size: 24px;
  transition: transform .2s ease;
}
.w-launcher:hover { transform: scale(1.06); }
.w-launcher .w-dot {
  position: absolute; top: 2px; right: 2px; width: 14px; height: 14px; border-radius: 50%;
  background: #22c55e; border: 2px solid #fff;
}
.w-launcher .w-badge {
  position: absolute; top: -4px; right: -6px; background: #ef4444; color: #fff;
  font-size: 10px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.w-launcher .w-tip {
  position: absolute; right: 70px; top: 50%; transform: translateY(-50%);
  background: #fff; color: #17225c; font-size: 12.5px; font-weight: 600; white-space: nowrap;
  padding: 7px 12px; border-radius: 10px; box-shadow: 0 6px 18px rgba(16, 23, 43, .12);
  opacity: 0; pointer-events: none; transition: opacity .25s ease .1s;
}
.w-launcher:hover .w-tip { opacity: 1; }
.w-wrap.w-open .w-launcher { display: none; }

/* 对话框 */
.w-window {
  position: fixed; right: 24px; bottom: 24px; width: 360px; height: min(560px, calc(100vh - 48px));
  background: #fff; border-radius: 18px; box-shadow: 0 30px 80px rgba(10, 20, 37, .3);
  display: none; flex-direction: column; overflow: hidden;
}
.w-wrap.w-open .w-window { display: flex; animation: wPop .25s ease; }
@keyframes wPop { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }

/* 头部 */
.w-head {
  position: relative; flex: none; background: linear-gradient(135deg, #2943d1 0%, #1e32a8 60%, #4b2bb8 100%);
  color: #fff; padding: 14px 16px 12px;
}
.w-head .w-avatars { display: flex; gap: -8px; margin-bottom: 8px; }
.w-head .w-avatars span {
  width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .85);
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700;
}
.w-av1 { background: linear-gradient(135deg, #ffb35c, #ff7a59); }
.w-av2 { background: linear-gradient(135deg, #38d39f, #22c55e); }
.w-head h3 { margin: 0 0 2px; font-size: 16px; font-weight: 700; color: #fff; }
.w-head .w-state { font-size: 11.5px; opacity: .92; display: flex; align-items: center; gap: 6px; }
.w-head .w-state i { font-size: 8px; color: #6ee7b7; }
.w-head .w-close {
  position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; border: 0; border-radius: 8px;
  background: rgba(255, 255, 255, .16); color: #fff; font-size: 13px; cursor: pointer;
}
.w-head .w-close:hover { background: rgba(255, 255, 255, .3); }

/* 消息区 */
.w-body { flex: 1; overflow-y: auto; background: #f7f8fd; padding: 12px 12px 4px; }
.w-day { text-align: center; font-size: 11px; color: #9aa3b8; margin: 4px 0 10px; }
.w-msg { display: flex; gap: 8px; margin-bottom: 10px; }
.w-msg .w-av {
  width: 28px; height: 28px; flex: none; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff; margin-top: 4px;
}
.w-msg .w-bub {
  max-width: 78%; padding: 9px 12px; border-radius: 4px 14px 14px 14px;
  background: #fff; border: 1px solid #eaecf5; font-size: 13px; line-height: 1.6; color: #37405c;
  box-shadow: 0 2px 6px rgba(16, 23, 43, .04);
}
.w-msg .w-bub b { display: block; font-size: 12px; color: #2943d1; margin-bottom: 2px; }
.w-msg.me { flex-direction: row-reverse; }
.w-msg.me .w-bub { background: linear-gradient(135deg, #2943d1, #5b6bff); color: #fff; border: 0; border-radius: 14px 4px 14px 14px; }
.w-msg .w-time { font-size: 10px; color: #aab1c3; align-self: flex-end; }

/* 快捷提问 */
.w-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 12px 8px; background: #fff; border-top: 1px solid #f0f1f7; }
.w-chip {
  border: 1px solid #d9defc; background: #f4f5ff; color: #2943d1; font-size: 12px;
  border-radius: 99px; padding: 5px 11px; cursor: pointer; transition: all .15s;
}
.w-chip:hover { background: #2943d1; color: #fff; }

/* 输入区 */
.w-input { display: flex; align-items: center; gap: 8px; padding: 8px 10px 10px; background: #fff; }
.w-input textarea {
  flex: 1; resize: none; border: 1px solid #e2e6f2; border-radius: 10px; padding: 9px 12px;
  font-size: 13px; font-family: inherit; outline: none; height: 40px; line-height: 1.4; color: #1c2745;
}
.w-input textarea:focus { border-color: #2943d1; box-shadow: 0 0 0 3px rgba(41, 67, 209, .12); }
.w-send {
  width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%;
  background: linear-gradient(135deg, #2943d1, #5b6bff); color: #fff; font-size: 15px; cursor: pointer;
}
.w-send:disabled { opacity: .5; cursor: default; }

.w-foot { padding: 6px 12px 9px; font-size: 10.5px; color: #aab1c3; text-align: center; background: #fff; }
.w-typing { display: inline-flex; gap: 4px; padding: 4px 2px; }
.w-typing i { width: 6px; height: 6px; border-radius: 50%; background: #b9c2ff; animation: wBlink 1s infinite; }
.w-typing i:nth-child(2) { animation-delay: .18s; }
.w-typing i:nth-child(3) { animation-delay: .36s; }
@keyframes wBlink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
