/* ================================================================
   君泰科技 — 企业微信在线客服 前台样式（商务版）
   数据由后台「在线客服」面板生成 assets/kefu.js
   ================================================================ */

.jtkf {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9000;
  font-family: var(--font, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif);
  -webkit-tap-highlight-color: transparent;
}

/* ---------- 悬浮入口：企业微信商务卡片 ---------- */
.jtkf__btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  height: 58px;
  padding: 0 14px 0 9px;
  border: 1px solid rgba(93, 151, 255, .30);
  border-radius: 15px;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(30, 44, 78, .98) 0%, rgba(13, 21, 40, .98) 100%);
  box-shadow:
    0 20px 44px -16px rgba(0, 0, 0, .92),
    0 0 0 1px rgba(255, 255, 255, .035) inset,
    0 1px 0 rgba(255, 255, 255, .07) inset;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform .22s cubic-bezier(.3, .9, .4, 1.2), box-shadow .22s, border-color .22s;
}
.jtkf__btn:hover {
  transform: translateY(-2px);
  border-color: rgba(93, 151, 255, .58);
  box-shadow:
    0 26px 54px -18px rgba(47, 107, 255, .55),
    0 0 0 1px rgba(255, 255, 255, .05) inset;
}
.jtkf__btn:active { transform: translateY(0) scale(.985); }

/* 徽标（企业微信 logo） */
.jtkf__badge {
  position: relative;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(140deg, rgba(93, 151, 255, .22), rgba(43, 169, 255, .10));
  border: 1px solid rgba(93, 151, 255, .26);
  box-shadow: 0 5px 16px -7px rgba(47, 107, 255, .85);
}
.jtkf__badge .jtkf__wc { width: 27px; height: 27px; display: block; }

/* 在线状态点 */
.jtkf__live {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #22c55e;
  border: 2.5px solid #0d1526;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, .18);
  animation: jtkf-beat 2.4s ease-in-out infinite;
}
.jtkf__live.is-off { background: #7d8aa3; box-shadow: none; animation: none; }
@keyframes jtkf-beat {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.16); }
}

/* 文案 */
.jtkf__cta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
  padding-right: 2px;
}
.jtkf__cta b {
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.15;
  color: #eef3ff;
  letter-spacing: .01em;
  white-space: nowrap;
}
.jtkf__cta span {
  font-size: 11.5px;
  line-height: 1.2;
  color: #93a4c6;
  white-space: nowrap;
}
.jtkf__chev {
  flex: none;
  width: 15px;
  height: 15px;
  color: #6b7b9c;
  transition: transform .2s, color .2s;
}
.jtkf__btn:hover .jtkf__chev { color: #5d97ff; transform: translateX(2px); }

/* 自动邀请时的呼吸高亮 */
.jtkf.is-invite .jtkf__btn { animation: jtkf-invite 2.6s ease-in-out 2; }
@keyframes jtkf-invite {
  0%, 100% {
    box-shadow: 0 20px 44px -16px rgba(0, 0, 0, .92),
                0 0 0 0 rgba(93, 151, 255, 0),
                0 0 0 1px rgba(255, 255, 255, .035) inset;
  }
  50% {
    box-shadow: 0 24px 52px -14px rgba(47, 107, 255, .80),
                0 0 0 7px rgba(93, 151, 255, .12),
                0 0 0 1px rgba(255, 255, 255, .06) inset;
  }
}

/* ---------- 面板 ---------- */
.jtkf__panel {
  position: absolute;
  right: 0;
  bottom: 78px;
  width: 336px;
  max-height: min(74vh, 580px);
  overflow: hidden auto;
  border-radius: 18px;
  background: linear-gradient(180deg, #101a30 0%, #0a1122 100%);
  border: 1px solid rgba(93, 151, 255, .20);
  box-shadow: 0 34px 80px -26px rgba(0, 0, 0, .95), 0 0 0 1px rgba(0, 0, 0, .35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(.96);
  transform-origin: bottom right;
  transition: opacity .24s, transform .24s cubic-bezier(.2, .9, .3, 1.15), visibility .24s;
  -webkit-overflow-scrolling: touch;
}
.jtkf.is-open .jtkf__panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.jtkf.is-invite .jtkf__panel { animation: jtkf-glow 1.7s ease-out 2; }
@keyframes jtkf-glow {
  0%   { box-shadow: 0 34px 80px -26px rgba(0, 0, 0, .95), 0 0 0 0 rgba(93, 151, 255, .45); }
  100% { box-shadow: 0 34px 80px -26px rgba(0, 0, 0, .95), 0 0 0 15px rgba(93, 151, 255, 0); }
}
.jtkf__panel::-webkit-scrollbar { width: 6px; }
.jtkf__panel::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .16); border-radius: 3px; }

/* 面板头部 */
.jtkf__head {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 16px 52px 15px 16px;
  background:
    linear-gradient(135deg, rgba(47, 107, 255, .22) 0%, rgba(43, 169, 255, .09) 55%, rgba(47, 107, 255, 0) 100%);
  border-bottom: 1px solid rgba(93, 151, 255, .16);
  position: relative;
}
.jtkf__headlogo {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(140deg, rgba(93, 151, 255, .24), rgba(43, 169, 255, .10));
  border: 1px solid rgba(93, 151, 255, .30);
  box-shadow: 0 5px 16px -8px rgba(47, 107, 255, .9);
}
.jtkf__headlogo .jtkf__wc { width: 22px; height: 22px; display: block; }
.jtkf__head h4 {
  margin: 0 0 5px;
  font-size: 16px;
  font-weight: 800;
  color: #eef3ff;
  letter-spacing: -.01em;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.jtkf__tag {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.5;
  padding: 1px 6px;
  border-radius: 5px;
  color: #8fbcff;
  background: rgba(93, 151, 255, .14);
  border: 1px solid rgba(93, 151, 255, .26);
  letter-spacing: .02em;
}
.jtkf__head p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: #9aabc9;
}
.jtkf__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, .06);
  color: #93a4c6;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .18s, color .18s;
}
.jtkf__close:hover { background: rgba(255, 255, 255, .14); color: #fff; }

/* 客服列表 */
.jtkf__list { padding: 10px; }
.jtkf__item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: rgba(255, 255, 255, .035);
  margin-bottom: 8px;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  color: inherit;
  font: inherit;
  transition: background .18s, border-color .18s, transform .18s;
}
.jtkf__item:last-child { margin-bottom: 0; }
.jtkf__item:hover {
  background: rgba(93, 151, 255, .10);
  border-color: rgba(93, 151, 255, .42);
  transform: translateX(2px);
}

/* 头像 */
.jtkf__ava {
  position: relative;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(140deg, #2f6bff, #2ba9ff);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 0 0 1.5px rgba(93, 151, 255, .28);
}
.jtkf__ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jtkf__ava i {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #101a30;
  background: #8a93a8;
}
.jtkf__ava.is-online i { background: #22c55e; }

/* 文字 */
.jtkf__meta { flex: 1; min-width: 0; }
.jtkf__name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14.5px;
  font-weight: 700;
  color: #eef3ff;
  margin-bottom: 3px;
}
.jtkf__name em {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1.5px 6px;
  border-radius: 5px;
  background: rgba(34, 197, 94, .16);
  color: #4ade80;
  letter-spacing: .02em;
}
.jtkf__name em.off { background: rgba(255, 255, 255, .08); color: #8a93a8; }
.jtkf__role {
  font-size: 12.5px;
  line-height: 1.5;
  color: #9aabc9;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.jtkf__arrow {
  flex: none;
  width: 16px;
  height: 16px;
  color: #74819c;
  transition: color .18s, transform .18s;
}
.jtkf__item:hover .jtkf__arrow { color: #5d97ff; transform: translateX(2px); }

/* 面板底部 */
.jtkf__foot {
  padding: 11px 16px 13px;
  border-top: 1px solid rgba(93, 151, 255, .13);
  font-size: 11.5px;
  line-height: 1.6;
  color: #74819c;
  text-align: center;
}
.jtkf__foot a { color: #9aabc9; text-decoration: none; }
.jtkf__foot a:hover { color: #5d97ff; }

/* 页面内联入口（联系区块用） */
.jtkf-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: left;
}
.jtkf-inline svg { width: 15px; height: 15px; color: #5d97ff; flex: none; }
.jtkf-inline:hover { color: #22d3ee; }

/* 页面内客服入口：默认隐藏，前台数据就绪后由 kefu-ui.js 显示 */
.jtkf-hide { display: none !important; }

/* ---------- 移动端 ---------- */
@media (max-width: 640px) {
  .jtkf { right: 14px; bottom: 14px; }
  .jtkf__btn {
    width: 56px;
    height: 56px;
    padding: 0;
    justify-content: center;
    border-radius: 16px;
  }
  .jtkf__cta, .jtkf__chev { display: none; }
  .jtkf__badge { width: 38px; height: 38px; border: 0; background: none; box-shadow: none; }
  .jtkf__badge .jtkf__wc { width: 34px; height: 34px; }
  .jtkf__live { right: 1px; bottom: 1px; }
  .jtkf__panel {
    right: -6px;
    bottom: 70px;
    width: calc(100vw - 28px);
    max-width: 340px;
    max-height: 68vh;
  }
}

/* 打印时不显示 */
@media print {
  .jtkf { display: none !important; }
}
