/* 右侧悬浮客服栏 · 快快云风格竖条 */
.ac-cs-rail {
  position: fixed;
  right: 14px;
  top: 50%;
  transform: translateY(-42%);
  z-index: 92;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
  pointer-events: none;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
.ac-cs-rail *,
.ac-left-rail * { box-sizing: border-box; }
.ac-cs-rail .ac-cs-stack,
.ac-cs-rail .ac-cs-coupon,
.ac-left-rail .ac-cs-stack {
  pointer-events: auto;
}

.ac-cs-coupon {
  position: absolute;
  right: 52px;
  top: 18px;
  text-decoration: none;
  z-index: 1;
}
.ac-cs-coupon-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 28px;
  padding: 0 8px;
  border-radius: 8px 0 0 8px;
  background: linear-gradient(180deg, #ffe566, #ffc107);
  color: #7a3e00;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 6px 14px rgba(255, 193, 7, 0.35);
}

.ac-cs-stack {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.ac-cs-item { position: relative; }

.ac-cs-badge {
  position: absolute;
  left: -6px;
  top: 8px;
  z-index: 2;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 30%, #f9a8d4, #db2777);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(219, 39, 119, 0.35);
}

.ac-cs-pill,
.ac-cs-log {
  border: 0;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  text-decoration: none;
  color: #0f172a;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.ac-cs-pill:hover,
.ac-cs-log:hover {
  transform: translateX(-3px);
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.18);
}
.ac-left-rail .ac-cs-pill:hover {
  transform: translateX(3px);
}

.ac-cs-pill {
  width: 52px;
  padding: 10px 0 12px;
  border-radius: 999px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.ac-cs-pill-presales {
  background: linear-gradient(180deg, rgba(224, 242, 254, 0.98), rgba(186, 230, 253, 0.95));
  color: #0369a1;
}
.ac-cs-pill-hotline {
  color: #334155;
  padding-top: 14px;
  padding-bottom: 14px;
}
.ac-cs-pill-hotline .ac-cs-ico {
  width: 22px;
  height: 22px;
  color: #64748b;
  display: inline-flex;
}
.ac-cs-pill-hotline .ac-cs-ico svg {
  width: 22px;
  height: 22px;
}

.ac-cs-mascot {
  width: 44px;
  height: 50px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.ac-cs-mascot-svg {
  width: 44px;
  height: 50px;
  display: block;
}

.ac-cs-vtext {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 0.18em;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  user-select: none;
}
.ac-cs-vtext-on {
  color: #fff;
  letter-spacing: 0.22em;
}

.ac-cs-pill-ai {
  background: linear-gradient(180deg, #38bdf8 0%, #2563eb 55%, #1d4ed8 100%);
  color: #fff;
  padding-top: 12px;
  padding-bottom: 14px;
}
.ac-cs-ai-face {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.ac-cs-ai-face svg {
  width: 20px;
  height: 20px;
}

.ac-cs-log {
  width: 52px;
  min-height: 72px;
  border-radius: 16px;
  background: linear-gradient(180deg, #3b82f6, #1d4ed8);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 6px 12px;
}
.ac-cs-log-ico {
  width: 22px;
  height: 22px;
  color: #fff;
  display: inline-flex;
}
.ac-cs-log-ico svg {
  width: 22px;
  height: 22px;
}
.ac-cs-log-text {
  writing-mode: horizontal-tb;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  letter-spacing: 0.02em;
}

.ac-cs-panel {
  position: absolute;
  right: calc(100% + 12px);
  top: 0;
  width: 220px;
  padding: 14px 14px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  color: #0f172a;
  z-index: 3;
}
/* 统一咨询：面板加大 */
#acCsPanelConsult {
  width: 340px;
  padding: 18px 18px 16px;
  border-radius: 18px;
}
#acCsPanelConsult .ac-cs-panel-title {
  font-size: 16px;
  margin-bottom: 8px;
}
#acCsPanelConsult .ac-cs-panel-tip {
  font-size: 13px;
  margin-bottom: 12px;
}
#acCsPanelConsult .ac-cs-qr-row {
  gap: 14px;
  margin-bottom: 12px;
}
#acCsPanelConsult .ac-cs-qr {
  width: 148px;
  height: 148px;
  margin-bottom: 0;
  border-radius: 14px;
}
#acCsPanelConsult .ac-cs-qr-row figcaption {
  margin-top: 6px;
  font-size: 12px;
}
#acCsPanelConsult .ac-cs-meta {
  font-size: 13px;
  line-height: 1.85;
}
#acCsPanelConsult .ac-cs-panel-link {
  margin-top: 12px;
  font-size: 13px;
}
.ac-cs-panel-title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 800;
}
.ac-cs-panel-tip {
  margin: 0 0 8px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
}
.ac-cs-qr-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 8px;
}
.ac-cs-qr-row figure {
  margin: 0;
  text-align: center;
}
.ac-cs-qr-row figcaption {
  margin-top: 4px;
  font-size: 11px;
  color: #64748b;
  font-weight: 700;
}
.ac-cs-qr {
  display: block;
  width: 112px;
  height: 112px;
  margin: 0 auto 8px;
  border-radius: 12px;
  background: #f8fafc;
  object-fit: contain;
}
.ac-cs-qr-row .ac-cs-qr { margin-bottom: 0; }
.ac-cs-meta {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  color: #475569;
  line-height: 1.7;
}
.ac-cs-phone {
  display: inline-block;
  margin: 4px 0 8px;
  font-size: 18px;
  font-weight: 800;
  color: #2563eb;
  text-decoration: none;
}
.ac-cs-panel-link {
  display: inline-flex;
  margin-top: 8px;
  border: 0;
  background: transparent;
  color: #2563eb;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  padding: 0;
}

/* —— 左侧：社交媒体 / 投诉建议 —— */
.ac-left-rail {
  position: fixed;
  left: 14px;
  top: 50%;
  transform: translateY(-40%);
  z-index: 92;
  pointer-events: none;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
.ac-left-rail .ac-cs-panel {
  left: calc(100% + 12px);
  right: auto;
}
.ac-cs-pill-social {
  background: linear-gradient(180deg, rgba(241, 245, 249, 0.98), rgba(226, 232, 240, 0.96));
  color: #0f172a;
  padding-top: 12px;
  padding-bottom: 14px;
}
.ac-cs-pill-feedback {
  background: linear-gradient(180deg, #0f172a, #1e293b);
  color: #fff;
  padding-top: 12px;
  padding-bottom: 14px;
}
.ac-cs-pill-feedback .ac-cs-vtext { color: #fff; }
.ac-left-ico {
  background: rgba(15, 23, 42, 0.08);
  color: #0f172a;
}
.ac-left-ico-fb {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}
.ac-left-social-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  max-height: 280px;
  overflow: auto;
}
.ac-left-social-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #f8fafc;
  color: #0f172a;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid #e2e8f0;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.ac-left-social-item:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}
.ac-left-social-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #334155;
  flex-shrink: 0;
}
.ac-left-social-icon svg,
.ac-left-social-icon img {
  width: 18px;
  height: 18px;
  display: block;
}
.ac-left-share {
  padding-bottom: 8px;
  border-bottom: 1px dashed #e2e8f0;
}

/* 启用左侧栏后：隐藏旧右侧社交/分享/投诉浮动入口 */
html.ac-has-left-rail .ac-social-side,
html.ac-has-left-rail .ac-share-side,
html.ac-has-left-rail .ac-fb-launch {
  display: none !important;
}

body.page-chat .ac-cs-rail,
body.page-chat .ac-left-rail {
  display: none !important;
}

/* 管理员左侧投诉坞存在时，客服左栏略下移避开 */
body:has(.ac-fb-admin-dock) .ac-left-rail {
  top: 64%;
  left: 18px;
}

@media (max-width: 960px) {
  .ac-cs-rail,
  .ac-left-rail {
    display: none;
  }
  html.ac-has-left-rail .ac-fb-launch {
    display: inline-flex !important;
    right: 18px;
  }
}
