/* 本地客服挂件 —— 覆盖原站 Lara 悬浮入口，换成“联系在线客服” */
.lara_float,
.lara_mobile_btn,
.lara_mobile_close,
.help-bubble.bottom-right-text {
  display: none !important;
}

#tl-chat-root {
  --tl-purple: #5a54e8;
  --tl-purple-dark: #4a45d4;
  --tl-ink: #1b1f2a;
  --tl-muted: #6b7280;
  --tl-line: #e8eaf1;
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 2147483000;
  font-family: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--tl-ink);
}

#tl-chat-root *,
#tl-chat-root *::before,
#tl-chat-root *::after {
  box-sizing: border-box;
}

.tl-launcher {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 22px 0 14px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #6c63ff, var(--tl-purple));
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.2px;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(90, 84, 232, 0.36), 0 2px 6px rgba(20, 20, 40, 0.12);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.tl-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(90, 84, 232, 0.44), 0 3px 8px rgba(20, 20, 40, 0.14);
}

.tl-launcher:active {
  transform: translateY(0);
}

.tl-launcher-ico {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.tl-launcher-ico svg {
  width: 18px;
  height: 18px;
}

.tl-dot {
  position: absolute;
  top: 6px;
  right: 10px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px #fff;
  opacity: 0;
  transition: opacity 0.2s;
}

.tl-dot.on {
  opacity: 1;
}

.tl-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 0 0 3px #fff;
  display: none;
}

.tl-badge.on {
  display: block;
}

.tl-panel {
  position: absolute;
  right: 0;
  bottom: 68px;
  width: 366px;
  max-width: calc(100vw - 32px);
  height: 520px;
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(18, 22, 45, 0.28), 0 2px 10px rgba(18, 22, 45, 0.08);
  transform-origin: bottom right;
  animation: tl-pop 0.18s ease;
  display: none;
}

.tl-panel.open {
  display: flex;
}

@keyframes tl-pop {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.tl-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  color: #fff;
  background: linear-gradient(135deg, #6c63ff, #4a45d4);
}

.tl-head-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  font-size: 16px;
  font-weight: 700;
}

.tl-head-main {
  flex: 1;
  min-width: 0;
}

.tl-head-title {
  font-size: 15px;
  font-weight: 600;
}

.tl-head-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  opacity: 0.86;
}

.tl-head-sub i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
}

.tl-head-sub.offline i {
  background: #fca5a5;
}

.tl-head-close {
  border: 0;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.tl-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px 8px;
  background: #f7f8fc;
  scroll-behavior: smooth;
}

.tl-intro {
  margin: 0 auto 14px;
  max-width: 280px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--tl-line);
  color: var(--tl-muted);
  font-size: 13px;
  text-align: center;
}

.tl-row {
  display: flex;
  margin-bottom: 12px;
}

.tl-row.me {
  justify-content: flex-end;
}

.tl-bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--tl-line);
  box-shadow: 0 1px 2px rgba(20, 22, 40, 0.04);
  word-break: break-word;
  white-space: pre-wrap;
}

.tl-row.me .tl-bubble {
  background: var(--tl-purple);
  border-color: var(--tl-purple);
  color: #fff;
}

.tl-time {
  margin-top: 4px;
  font-size: 11px;
  color: #9aa1b1;
}

.tl-row.me .tl-time {
  text-align: right;
  color: #a5a1f0;
}

.tl-sys {
  margin: 10px auto;
  max-width: 260px;
  color: #9aa1b1;
  font-size: 12px;
  text-align: center;
}

.tl-typing {
  display: none;
  padding: 0 4px 10px;
  color: var(--tl-muted);
  font-size: 12px;
}

.tl-typing.on {
  display: block;
}

.tl-foot {
  padding: 12px 14px 14px;
  border-top: 1px solid var(--tl-line);
  background: #fff;
}

.tl-input-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.tl-input {
  flex: 1;
  min-height: 42px;
  max-height: 110px;
  padding: 10px 12px;
  border: 1px solid var(--tl-line);
  border-radius: 12px;
  outline: none;
  resize: none;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  color: var(--tl-ink);
  background: #fbfbfe;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.tl-input:focus {
  border-color: var(--tl-purple);
  box-shadow: 0 0 0 3px rgba(90, 84, 232, 0.12);
}

.tl-send {
  height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: var(--tl-purple);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.tl-send:hover {
  background: var(--tl-purple-dark);
}

.tl-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.tl-hint {
  margin-top: 8px;
  color: #9aa1b1;
  font-size: 11px;
  text-align: center;
}
