/* 新风电脑维修 · AI 智能客服浮窗 */
.xc-launcher {
  position: relative;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #1a7bf0 0%, #0b4dab 100%);
  box-shadow: 0 10px 24px rgba(11, 77, 171, .35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s ease, box-shadow .2s ease;
}
.xc-launcher:hover { transform: translateY(-3px); box-shadow: 0 18px 36px rgba(11, 77, 171, .42); }
.xc-launcher svg { width: 24px; height: 24px; }
.xc-launcher::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(26, 123, 240, .5);
  animation: xcPulse 2.4s infinite;
  pointer-events: none;
}
@keyframes xcPulse {
  0% { box-shadow: 0 0 0 0 rgba(26, 123, 240, .45); }
  70% { box-shadow: 0 0 0 12px rgba(26, 123, 240, 0); }
  100% { box-shadow: 0 0 0 0 rgba(26, 123, 240, 0); }
}
.xc-launcher--floating { position: fixed; right: 20px; bottom: 110px; z-index: 9000; }
.xc-launcher__dot {
  position: absolute; top: -4px; right: -4px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #ff6b35; color: #fff; font-size: 11px; font-weight: 700;
  display: none; align-items: center; justify-content: center;
  border: 2px solid #fff;
}
.xc-launcher__dot.is-on { display: flex; }
.xc-launcher__label {
  position: absolute; right: 64px; top: 50%; transform: translateY(-50%);
  background: #0b1c33; color: #fff; font-size: 13px; white-space: nowrap;
  padding: 8px 12px; border-radius: 8px; opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
}
.xc-launcher:hover .xc-launcher__label { opacity: 1; }

.xc-panel {
  position: fixed;
  right: 84px;
  bottom: 110px;
  z-index: 9001;
  width: 380px;
  max-height: min(600px, calc(100vh - 150px));
  display: none;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 30px 70px rgba(4, 26, 60, .28), 0 4px 12px rgba(4, 26, 60, .1);
  border: 1px solid rgba(11, 77, 171, .12);
}
.xc-panel--floating { right: 22px; bottom: 176px; }
.xc-panel.is-open { display: flex; }

.xc-head {
  background: linear-gradient(135deg, #0b3f8f 0%, #0a2d68 100%);
  color: #fff;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.xc-head__avatar {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  background: rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center;
}
.xc-head__avatar svg { width: 22px; height: 22px; }
.xc-head__meta { flex: 1; min-width: 0; }
.xc-head__meta b { display: block; font-size: 15px; line-height: 1.3; }
.xc-head__meta span { font-size: 12px; color: #b9d6ff; display: flex; align-items: center; gap: 5px; }
.xc-head__meta i { width: 6px; height: 6px; border-radius: 50%; background: #67e6b1; display: inline-block; }
.xc-head__close {
  border: 0; background: rgba(255,255,255,.12); color: #fff;
  width: 30px; height: 30px; border-radius: 9px; cursor: pointer; font-size: 16px;
  line-height: 1;
}
.xc-head__close:hover { background: rgba(255,255,255,.22); }

.xc-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #f5f8fd;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}
.xc-body::-webkit-scrollbar { width: 6px; }
.xc-body::-webkit-scrollbar-thumb { background: #c8d8ee; border-radius: 3px; }

.xc-msg { display: flex; gap: 8px; align-items: flex-end; }
.xc-msg__avatar {
  width: 28px; height: 28px; border-radius: 9px; flex: none;
  background: linear-gradient(135deg,#1a7bf0,#0b4dab); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700;
}
.xc-bubble {
  max-width: 78%;
  padding: 10px 13px;
  border-radius: 14px 14px 14px 4px;
  background: #fff;
  color: #1b2b45;
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: 0 2px 8px rgba(11, 77, 171, .06);
}
.xc-msg--me { flex-direction: row-reverse; }
.xc-msg--me .xc-bubble {
  background: linear-gradient(135deg,#1a7bf0,#0b4dab);
  color: #fff;
  border-radius: 14px 14px 4px 14px;
  box-shadow: 0 6px 16px rgba(11, 77, 171, .22);
}
.xc-msg--me .xc-msg__avatar { display: none; }

.xc-typing .xc-bubble { display: flex; gap: 4px; padding: 14px; }
.xc-typing i {
  width: 6px; height: 6px; border-radius: 50%; background: #9db8dc;
  animation: xcBounce 1.2s infinite ease-in-out;
}
.xc-typing i:nth-child(2) { animation-delay: .15s; }
.xc-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes xcBounce { 0%,60%,100% { transform: translateY(0); opacity: .5 } 30% { transform: translateY(-4px); opacity: 1 } }

.xc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.xc-chip {
  border: 1px solid #cfe0f5; background: #fff; color: #0b4dab;
  font-size: 12.5px; padding: 7px 11px; border-radius: 999px; cursor: pointer;
  transition: all .15s ease;
}
.xc-chip:hover { background: #eaf3ff; border-color: #8dbcf5; }

.xc-form { display: grid; gap: 8px; background: #fff; border: 1px solid #dbe7f6; border-radius: 12px; padding: 12px; }
.xc-form p { margin: 0 0 2px; font-size: 12.5px; color: #64748b; }
.xc-form input, .xc-form textarea {
  width: 100%; border: 1px solid #d5e2f2; border-radius: 9px; padding: 9px 11px;
  font-size: 13.5px; color: #1b2b45; outline: none; font-family: inherit;
  background: #fbfdff;
}
.xc-form input:focus, .xc-form textarea:focus { border-color: #1a7bf0; background: #fff; }
.xc-form textarea { resize: vertical; min-height: 56px; }
.xc-form button {
  border: 0; border-radius: 9px; padding: 10px; cursor: pointer;
  background: linear-gradient(135deg,#ff8a3d,#ff6b1a); color: #fff;
  font-size: 14px; font-weight: 700;
}
.xc-form button:disabled { opacity: .6; cursor: default; }
.xc-form .xc-note { font-size: 11.5px; color: #8a9ab0; margin: 0; }

.xc-foot { border-top: 1px solid #e6eef8; background: #fff; padding: 10px 12px 12px; }
.xc-input-row { display: flex; gap: 8px; align-items: flex-end; }
.xc-input {
  flex: 1; resize: none; border: 1px solid #d5e2f2; border-radius: 12px;
  padding: 10px 12px; font-size: 14px; line-height: 1.5; max-height: 96px;
  outline: none; font-family: inherit; color: #1b2b45; background: #fbfdff;
}
.xc-input:focus { border-color: #1a7bf0; background: #fff; }
.xc-send {
  flex: none; width: 42px; height: 42px; border: 0; border-radius: 12px; cursor: pointer;
  background: linear-gradient(135deg,#1a7bf0,#0b4dab); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.xc-send:disabled { opacity: .5; cursor: default; }
.xc-send svg { width: 18px; height: 18px; }
.xc-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 7px; font-size: 11.5px; color: #94a3b8; }
.xc-meta a { color: #0b4dab; font-weight: 700; text-decoration: none; }
.xc-lead-btn {
  border: 0; background: none; color: #0b4dab; font-weight: 700;
  font-size: 11.5px; cursor: pointer; padding: 0;
}

@media (max-width: 640px) {
  .xc-launcher { width: 46px; height: 46px; border-radius: 14px; }
  .xc-launcher svg { width: 21px; height: 21px; }
  .xc-launcher--floating { right: 12px; bottom: 86px; }
  .xc-launcher__label { display: none; }
  .xc-panel {
    right: 0; left: 0; bottom: 0; width: auto; max-height: 86vh;
    border-radius: 18px 18px 0 0;
  }
  .xc-panel--floating { right: 0; bottom: 0; }
  .xc-bubble { max-width: 84%; }
}
