@charset "utf-8";
/* ==========================================================================
   玩具巴巴 · 平台跟随客服（QQ / 微信）+ 回到顶部
   2026-10-29  |  只挂平台前端页；商品详情页与二级企业站不挂
   依赖：/wx-qr.png（微信个人码，1bit 600px，扫描友好）
   ========================================================================== */

.tbs {
  position: fixed;
  right: 16px;
  bottom: 38px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-tap-highlight-color: transparent;
}
.tbs *,
.tbs *::before,
.tbs *::after { box-sizing: border-box; }

/* ------------------------------------------------------------------ 圆钮 */
.tbs-b {
  position: relative;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid #E7ECF3;
  border-radius: 50%;
  background: #fff;
  color: var(--orange, #E66300);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(20, 32, 48, .10);
  transition: transform .2s, box-shadow .2s, border-color .2s, opacity .22s;
}
.tbs-b:hover {
  transform: translateY(-2px);
  border-color: #FFD6B8;
  box-shadow: 0 8px 20px rgba(230, 99, 0, .18);
}
.tbs-b:active { transform: translateY(0); }
.tbs-b svg { width: 22px; height: 22px; display: block; }
.tbs-b.is-on { border-color: #FFC49B; box-shadow: 0 8px 20px rgba(230, 99, 0, .2); }

/* 悬停提示（按钮左侧气泡） */
.tbs-tip {
  position: absolute;
  right: 56px;
  top: 50%;
  transform: translateY(-50%) translateX(4px);
  padding: 5px 10px;
  border: 1px solid #EDF1F6;
  border-radius: 8px;
  background: #fff;
  color: #4E5C6B;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  box-shadow: 0 4px 14px rgba(20, 32, 48, .10);
  transition: opacity .18s, transform .18s, visibility .18s;
}
.tbs-b:hover .tbs-tip { opacity: 1; visibility: visible; transform: translateY(-50%) translateX(0); }

/* 回到顶部：滚过一屏才出现 */
.tbs-top { opacity: 0; visibility: hidden; transform: translateY(8px); }
.tbs-top.on { opacity: 1; visibility: visible; transform: none; }
.tbs-top:hover { transform: translateY(-2px); }

/* ------------------------------------------------------------------ 弹层 */
.tbs-pop {
  position: absolute;
  right: 57px;
  bottom: 0;
  width: 224px;
  padding-bottom: 12px;
  border: 1px solid #EFF2F6;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 40px rgba(18, 28, 44, .16), 0 2px 6px rgba(18, 28, 44, .06);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: scale(.95) translateX(6px);
  transform-origin: right bottom;
  transition: opacity .2s, transform .2s, visibility .2s;
}
.tbs-pop.on { opacity: 1; visibility: visible; transform: none; }
/* 指向圆钮的小三角 */
.tbs-pop::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: 17px;
  width: 9px;
  height: 9px;
  background: #fff;
  border-right: 1px solid #EFF2F6;
  border-bottom: 1px solid #EFF2F6;
  transform: rotate(-45deg);
}

.tbs-hd {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 10px 14px 9px;
  background: linear-gradient(135deg, #FF8A3D, #E66300);
  color: #fff;
}
.tbs-hd b { font-size: 14px; font-weight: 600; letter-spacing: .2px; }
.tbs-hd span { font-size: 11.5px; color: rgba(255, 255, 255, .82); }

/* 微信二维码 */
.tbs-qr { margin: 12px 12px 0; padding: 7px; border: 1px solid #F1E5DA; border-radius: 12px; background: #fff; }
.tbs-qr img { width: 100%; height: auto; display: block; border-radius: 6px; }
.tbs-note { margin: 9px 12px 0; font-size: 12px; line-height: 1.55; color: #6E7E8F; text-align: center; }
.tbs-note em { font-style: normal; color: #C95200; }
.tbs-time { margin: 3px 12px 0; font-size: 11.5px; color: #93A0AE; text-align: center; }

/* QQ 号码块 */
.tbs-qq { margin: 12px 12px 0; padding: 9px 12px; border-radius: 10px; background: #F7F9FC; display: flex; align-items: center; gap: 9px; }
.tbs-qq i {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  background: #EAF6FD; color: #2A9FD6; font-style: normal; font-size: 11px;
  font-weight: 700; letter-spacing: .2px; display: flex; align-items: center; justify-content: center;
}
.tbs-qq b { font-family: Fredoka, "Noto Sans SC", sans-serif; font-size: 17px; font-weight: 600; color: #1F2A36; letter-spacing: .6px; }

/* 操作按钮 */
.tbs-act { margin: 10px 12px 0; display: flex; gap: 8px; }
.tbs-act a,
.tbs-act button {
  flex: 1 1 0; height: 32px; border-radius: 8px; font-size: 12.5px; line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  text-decoration: none; transition: .18s; font-family: inherit;
}
.tbs-act .pri { background: linear-gradient(135deg, #FF8A3D, #E66300); color: #fff; border: 1px solid transparent; }
.tbs-act .pri:hover { box-shadow: 0 6px 14px rgba(230, 99, 0, .28); }
.tbs-act .gho { background: #fff; color: #C95200; border: 1px solid #FFD9BE; }
.tbs-act .gho:hover { background: #FFF4EC; border-color: #FF8A3D; }

/* ------------------------------------------------------------------ 移动端 */
@media (max-width: 768px) {
  .tbs { right: 10px; bottom: 64px; gap: 8px; }
  .tbs-b { width: 42px; height: 42px; }
  .tbs-b svg { width: 20px; height: 20px; }
  .tbs-tip { display: none; }
  .tbs-pop { right: 51px; width: 208px; }
}
@media (max-width: 600px) {
  /* 窄屏：弹层改到按钮正上方，避免贴边被裁 */
  .tbs-pop { right: 0; bottom: calc(100% + 10px); transform-origin: right bottom; }
  .tbs-pop::after { right: 16px; bottom: -5px; transform: rotate(45deg); }
}

/* QQ 圆钮里的字母标（比企鹅图标更清楚，46px 下也认得出来） */
.tbs-qqtxt { font-family: Fredoka, "Noto Sans SC", sans-serif; font-size: 15px; font-weight: 700;
  letter-spacing: .5px; color: #2A9FD6; line-height: 1; }
.tbs-act .gho.ok { background: #FFF4EC; border-color: #FF8A3D; color: #C95200; }
