/* ===== 在线客服悬浮组件（科技风） ===== */
.chat-fab {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: none;
  cursor: pointer;
  background: transparent;
  font-family: inherit;
}
.chat-fab .fab-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 26px;
  color: #fff;
  background: linear-gradient(135deg, #00e6c3 0%, #2f8fd6 55%, #6a5cff 100%);
  box-shadow: 0 10px 30px rgba(0, 200, 200, 0.35), 0 0 0 6px rgba(0, 230, 195, 0.10);
  position: relative;
  transition: transform .25s ease, box-shadow .25s ease;
}
.chat-fab:hover .fab-icon { transform: translateY(-3px) scale(1.04); box-shadow: 0 14px 38px rgba(0, 200, 200, 0.5), 0 0 0 8px rgba(0, 230, 195, 0.14); }
.chat-fab .fab-icon::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(0, 230, 195, 0.5);
  animation: fabPulse 2.4s ease-out infinite;
}
@keyframes fabPulse {
  0% { transform: scale(1); opacity: .7; }
  100% { transform: scale(1.35); opacity: 0; }
}
.chat-fab .fab-label {
  background: rgba(10, 22, 40, 0.82);
  color: #eaf6ff;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid rgba(0, 230, 195, 0.35);
  backdrop-filter: blur(8px);
}
.chat-fab .fab-dot {
  position: absolute;
  top: 2px; right: 2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #23d18b;
  border: 2px solid #0a1628;
}
.chat-fab.offline .fab-dot { background: #ff8a4c; }

/* 面板 */
.chat-panel {
  position: fixed;
  right: 26px;
  bottom: 100px;
  z-index: 9998;
  width: 360px;
  max-width: calc(100vw - 36px);
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(13, 27, 48, 0.96), rgba(8, 18, 36, 0.98));
  border: 1px solid rgba(0, 230, 195, 0.28);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.03) inset;
  backdrop-filter: blur(14px);
  transform: translateY(16px) scale(.98);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  font-family: inherit;
  color: #e8f3ff;
}
.chat-panel.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

.chat-head {
  position: relative;
  padding: 18px 18px 16px;
  background:
    radial-gradient(420px 120px at 90% -40%, rgba(0, 230, 195, 0.25), transparent 60%),
    linear-gradient(135deg, #0d2a4a, #0a1c34);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.chat-head h3 { margin: 0; font-size: 16px; font-weight: 700; color: #fff; display: flex; align-items: center; gap: 8px; }
.chat-head .status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; margin-top: 6px; font-weight: 600; }
.chat-head .status .s-dot { width: 8px; height: 8px; border-radius: 50%; background: #23d18b; box-shadow: 0 0 8px #23d18b; }
.chat-panel.offline .chat-head .status .s-dot { background: #ff8a4c; box-shadow: 0 0 8px #ff8a4c; }
.chat-head .status.on { color: #9ff5cf; }
.chat-head .status.off { color: #ffc3a3; }
.chat-head .close {
  position: absolute; top: 14px; right: 14px;
  width: 30px; height: 30px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04); color: #cfe6ff;
  cursor: pointer; font-size: 16px; line-height: 1;
}
.chat-head .close:hover { background: rgba(255,255,255,0.1); }

.chat-body { padding: 16px 18px 18px; max-height: 62vh; overflow-y: auto; }
.chat-greet { font-size: 13.5px; line-height: 1.7; color: #c9dcf2; margin: 0 0 14px; }
.chat-greet b { color: #7ff0d6; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip {
  font-size: 12.5px; padding: 7px 12px; border-radius: 999px;
  border: 1px solid rgba(0, 230, 195, 0.3); color: #aef3e4;
  background: rgba(0, 230, 195, 0.06); cursor: pointer; transition: .2s;
}
.chip:hover { background: rgba(0, 230, 195, 0.16); color: #eafff9; }

.chat-contact { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.chat-line {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 12px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06);
  font-size: 13px;
}
.chat-line .ci { font-size: 16px; }
.chat-line .ct { color: #9fb6d4; }
.chat-line .cv { color: #eaf6ff; font-weight: 700; margin-left: auto; }
.chat-line a.cv { text-decoration: none; }
.chat-line .copy {
  margin-left: 8px; font-size: 11px; color: #7ff0d6; cursor: pointer;
  border: 1px solid rgba(0,230,195,0.3); border-radius: 6px; padding: 2px 6px;
  background: rgba(0,230,195,0.06);
}

.chat-form { display: flex; flex-direction: column; gap: 10px; }
.chat-form .fld { display: flex; flex-direction: column; gap: 5px; }
.chat-form label { font-size: 12px; color: #9fb6d4; }
.chat-form input, .chat-form textarea {
  width: 100%; box-sizing: border-box;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px; color: #eaf6ff; padding: 10px 12px; font-size: 13px;
  font-family: inherit; resize: vertical;
}
.chat-form input:focus, .chat-form textarea:focus { outline: none; border-color: rgba(0,230,195,0.6); box-shadow: 0 0 0 3px rgba(0,230,195,0.12); }
.chat-form textarea { min-height: 64px; }

.chat-actions { display: flex; gap: 8px; margin-top: 4px; }
.btn-send, .btn-sms, .btn-mail {
  flex: 1; border: none; cursor: pointer; border-radius: 10px;
  padding: 11px 10px; font-size: 13px; font-weight: 700; color: #04141a;
  font-family: inherit; transition: .2s; text-align: center; text-decoration: none;
}
.btn-send { background: linear-gradient(135deg, #00e6c3, #2f8fd6); }
.btn-send:hover { filter: brightness(1.08); }
.btn-sms { background: linear-gradient(135deg, #ffd27f, #ff9a4c); }
.btn-sms:hover { filter: brightness(1.06); }
.btn-mail { background: linear-gradient(135deg, #8db8ff, #6a5cff); color: #fff; }
.btn-mail:hover { filter: brightness(1.06); }
.btn-submit { background: linear-gradient(135deg, #2bd9ff, #4f8cff); color: #03121f; }
.btn-submit:hover { filter: brightness(1.08); }
.btn-submit:disabled { opacity: .6; cursor: default; filter: none; }

.chat-hint { font-size: 11.5px; color: #8aa0bd; line-height: 1.6; margin-top: 10px; }
.chat-hint b { color: #ffc3a3; }

.chat-success {
  display: none; padding: 14px; border-radius: 12px; margin-bottom: 12px;
  background: rgba(35, 209, 139, 0.12); border: 1px solid rgba(35,209,139,0.35);
  color: #aeffd8; font-size: 13px; line-height: 1.6;
}
.chat-success.show { display: block; }

@media (max-width: 480px) {
  .chat-fab { right: 16px; bottom: 16px; }
  .chat-fab .fab-label { display: none; }
  .chat-panel { right: 12px; left: 12px; width: auto; bottom: 92px; }
}
