/* ==========================================================================
   LUXE MOTORS — AI 智能客服窗口（悬浮球 + 聊天面板）
   与站点设计系统同源：墨黑底 + 香槟金 + 玻璃拟态
   ========================================================================== */
.lx-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 900;
  width: 58px; height: 58px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(140deg, var(--gold-2), var(--gold) 45%, var(--gold-3));
  color: #1a1408; font-family: var(--serif); font-size: 22px; font-weight: 700;
  box-shadow: 0 12px 30px rgba(216, 181, 106, .28), 0 2px 8px rgba(0, 0, 0, .5);
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s ease, box-shadow .25s ease;
}
.lx-fab:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 16px 38px rgba(216, 181, 106, .38), 0 2px 10px rgba(0, 0, 0, .55); }
.lx-fab:active { transform: scale(.96); }
.lx-fab::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1px solid rgba(216, 181, 106, .35); animation: lx-pulse 2.6s ease-out infinite;
}
@keyframes lx-pulse { 0% { transform: scale(.92); opacity: .8; } 70% { transform: scale(1.18); opacity: 0; } 100% { opacity: 0; } }
.lx-fab .lx-fab-dot {
  position: absolute; top: 2px; right: 2px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--danger); border: 2px solid var(--bg); display: none;
}
.lx-fab.has-news .lx-fab-dot { display: block; }

.lx-panel {
  position: fixed; right: 22px; bottom: 92px; z-index: 901;
  width: 384px; max-width: calc(100vw - 32px); height: 620px; max-height: calc(100vh - 130px);
  background: linear-gradient(180deg, rgba(17, 20, 27, .98), rgba(12, 14, 19, .99));
  border: 1px solid var(--line-2); border-radius: 18px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; overflow: hidden;
  transform-origin: bottom right;
  opacity: 0; transform: translateY(14px) scale(.97); pointer-events: none;
  transition: opacity .22s ease, transform .24s cubic-bezier(.2, .9, .3, 1.1);
}
.lx-panel.open { opacity: 1; transform: none; pointer-events: auto; }

.lx-head {
  display: flex; align-items: center; gap: 11px; padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(120deg, rgba(216, 181, 106, .10), transparent 62%);
}
.lx-ava {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  background: linear-gradient(140deg, var(--gold-2), var(--gold-3)); color: #1a1408;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 700; font-size: 17px;
}
.lx-head-txt { flex: 1; min-width: 0; }
.lx-head-txt b { font-family: var(--serif); font-size: 14.5px; letter-spacing: .02em; display: block; }
.lx-head-txt span { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.lx-online { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.lx-x {
  flex: none; width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line);
  background: transparent; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1;
}
.lx-x:hover { color: var(--text); border-color: var(--line-2); }

.lx-msgs { flex: 1; overflow-y: auto; padding: 14px 14px 6px; display: flex; flex-direction: column; gap: 11px; }
.lx-msgs::-webkit-scrollbar { width: 6px; }
.lx-msgs::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 3px; }

.lx-msg { max-width: 86%; font-size: 13.5px; line-height: 1.72; }
.lx-msg .lx-bubble { padding: 9px 12px; border-radius: 13px; word-break: break-word; }
.lx-msg.ai { align-self: flex-start; }
.lx-msg.ai .lx-bubble { background: var(--panel-2); border: 1px solid var(--line); border-top-left-radius: 5px; color: var(--text-2); }
.lx-msg.user { align-self: flex-end; }
.lx-msg.user .lx-bubble {
  background: linear-gradient(140deg, rgba(216, 181, 106, .22), rgba(216, 181, 106, .12));
  border: 1px solid rgba(216, 181, 106, .38); border-top-right-radius: 5px; color: var(--text);
}
.lx-msg b { color: var(--gold-2); font-weight: 600; }

.lx-typing { display: inline-flex; gap: 4px; align-items: center; padding: 4px 2px; }
.lx-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: lx-blink 1.2s infinite; }
.lx-typing i:nth-child(2) { animation-delay: .18s; }
.lx-typing i:nth-child(3) { animation-delay: .36s; }
@keyframes lx-blink { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-2px); } }

/* 车型卡片 */
.lx-cars { display: grid; gap: 7px; margin-top: 8px; }
.lx-car {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  transition: border-color .18s, background .18s;
}
.lx-car:hover { border-color: rgba(216, 181, 106, .5); background: var(--panel-2); }
.lx-car-bar { width: 3px; height: 30px; border-radius: 2px; flex: none; background: var(--gold); }
.lx-car-txt { flex: 1; min-width: 0; }
.lx-car-txt b { display: block; font-family: var(--serif); font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lx-car-txt span { font-size: 11.5px; color: var(--muted); }
.lx-car-go { flex: none; font-size: 11px; color: var(--gold); border: 1px solid rgba(216, 181, 106, .4); border-radius: 6px; padding: 3px 8px; }

/* 快捷问题 */
.lx-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 14px 10px; }
.lx-chip {
  font-size: 12px; padding: 5px 10px; border-radius: 14px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line); color: var(--text-2);
  transition: all .16s;
}
.lx-chip:hover { border-color: rgba(216, 181, 106, .5); color: var(--gold-2); background: rgba(216, 181, 106, .08); }

.lx-foot { border-top: 1px solid var(--line); padding: 10px 12px; display: flex; gap: 8px; align-items: flex-end; }
.lx-input {
  flex: 1; resize: none; max-height: 88px; min-height: 22px; padding: 8px 11px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 11px;
  color: var(--text); font-size: 13.5px; line-height: 1.5; outline: none;
}
.lx-input:focus { border-color: rgba(216, 181, 106, .55); }
.lx-send {
  flex: none; width: 38px; height: 38px; border-radius: 11px; border: none; cursor: pointer;
  background: linear-gradient(140deg, var(--gold-2), var(--gold-3)); color: #1a1408;
  font-size: 15px; display: flex; align-items: center; justify-content: center;
}
.lx-send:disabled { opacity: .45; cursor: not-allowed; }
.lx-note { padding: 0 14px 10px; font-size: 10.5px; color: #6a7180; }

@media (max-width: 640px) {
  .lx-fab { right: 14px; bottom: 14px; width: 52px; height: 52px; font-size: 20px; }
  .lx-panel {
    right: 0; left: 0; bottom: 0; width: 100%; max-width: 100%;
    height: 78vh; max-height: 78vh; border-radius: 18px 18px 0 0;
  }
}
