/* ===========================================================
   内置客服弹窗（悬浮球 + 展开面板）
   2026-11-16 新增：纯前端实现，无第三方依赖
   全站 html{zoom:.8} 时用 zoom:1.25 抵消，保证物理尺寸一致
   =========================================================== */
.lq-service {
  position: fixed;
  right: 24px;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  z-index: 1030;
  font-family: OPPOSans, "OPPO Sans", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
}
@media (min-width: 992px) {
  .lq-service { zoom: 1.25; }
}

/* ---------- 悬浮球 ---------- */
.lq-svc-fab {
  position: relative;
  width: 60px;
  height: 60px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #3f9bff, #1666e8);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 26px rgba(22, 102, 232, .34);
  transition: transform .25s ease, box-shadow .25s ease;
}
.lq-svc-fab:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 14px 32px rgba(22, 102, 232, .42);
}
.lq-svc-fab:focus-visible {
  outline: 3px solid rgba(31, 123, 255, .45);
  outline-offset: 3px;
}
.lq-svc-fab svg { width: 27px; height: 27px; }
/* 在线小绿点 */
.lq-svc-fab::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid #fff;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, .55);
  animation: lqSvcPulse 2.4s ease-out infinite;
}
@keyframes lqSvcPulse {
  0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, .5); }
  70%  { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* ---------- 展开面板 ---------- */
.lq-svc-panel {
  position: absolute;
  right: 76px;
  top: 50%;
  bottom: auto;
  width: 322px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 20px 52px rgba(16, 42, 90, .20);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-50%) translateX(12px) scale(.96);
  transform-origin: 100% 50%;
  transition: opacity .26s ease, transform .26s cubic-bezier(.2, .8, .3, 1), visibility .26s;
}
.lq-svc-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%);
}

/* 头部 */
.lq-svc-head {
  position: relative;
  padding: 18px 20px 20px;
  background: linear-gradient(120deg, #2f8bff, #1666e8);
  color: #fff;
  overflow: hidden;
}
.lq-svc-head::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -46px;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  pointer-events: none;
}
.lq-svc-head .t {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1.3;
}
.lq-svc-head .s {
  margin-top: 5px;
  font-size: 12px;
  opacity: .85;
  letter-spacing: .01em;
}
.lq-svc-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease;
  z-index: 2;
}
.lq-svc-close:hover { background: rgba(255, 255, 255, .32); }

/* 主体 */
.lq-svc-body {
  padding: 18px 20px 20px;
  background: #fff;
}
/* 双二维码区 */
.lq-svc-qr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.lq-svc-qr {
  text-align: center;
  min-width: 0;
}
.lq-svc-qr img,
.lq-svc-qr .ph {
  width: 100%;
  max-width: 132px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(16, 42, 90, .10);
}
/* 名片二维码未上传时的占位卡 */
.lq-svc-qr .ph {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #a8b3c5;
  font-size: 11.5px;
  line-height: 1.5;
}
.lq-svc-qr .ph svg { width: 34px; height: 34px; opacity: .55; }
.lq-svc-qr .cap {
  margin-top: 9px;
  font-size: 12.5px;
  color: #6e7a90;
  letter-spacing: .01em;
  line-height: 1.5;
}
.lq-svc-qr .cap b {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #1b2c51;
}

/* 联系方式行 */
.lq-svc-rows { margin-top: 6px; }
.lq-svc-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 0;
  border-top: 1px dashed #eaeff7;
  text-decoration: none;
  color: inherit;
}
.lq-svc-row:first-child { border-top: 0; }
a.lq-svc-row:hover .val { color: #1666e8; }
.lq-svc-row .ico {
  flex: 0 0 30px;
  height: 30px;
  border-radius: 9px;
  background: #eef5ff;
  color: #1f7bff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lq-svc-row .ico svg { width: 16px; height: 16px; }
.lq-svc-row .txt { min-width: 0; }
.lq-svc-row .lab {
  display: block;
  font-size: 11.5px;
  color: #93a0b4;
  line-height: 1.4;
}
.lq-svc-row .val {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #1b2c51;
  line-height: 1.5;
  transition: color .2s ease;
  word-break: break-all;
}
.lq-svc-row .val .dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  margin-right: 6px;
  vertical-align: 1px;
}

/* 底部提示 */
.lq-svc-tip {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px dashed #eaeff7;
  font-size: 11.5px;
  color: #9aa6b8;
  line-height: 1.6;
}

/* ---------- 小屏 ---------- */
@media (max-width: 575.98px) {
  .lq-service {
    right: 14px;
  }
  .lq-svc-fab { width: 52px; height: 52px; }
  .lq-svc-fab svg { width: 23px; height: 23px; }
  .lq-svc-panel {
    right: 66px;
    width: min(280px, calc(100vw - 84px));
  }
  .lq-svc-qr img,
  .lq-svc-qr .ph { max-width: 116px; }
}

@media (prefers-reduced-motion: reduce) {
  .lq-svc-fab, .lq-svc-panel { transition: none; }
  .lq-svc-fab::after { animation: none; }
}
