/* 右下角悬浮的客服按钮：点击（电脑上悬停也可以）弹出企业微信客服卡片
   逻辑沿用旧版官网，样式按新官网的深蓝配色重做 */
.kf { position:fixed; right:24px; bottom:24px; z-index:25; font-family:"Microsoft YaHei","PingFang SC",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }

.kf-button { position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; width:58px; height:58px; padding:0; border:0; border-radius:50%; background:#142d58; color:#fff; cursor:pointer; box-shadow:0 10px 28px #142d5840; transition:transform .2s ease,box-shadow .2s ease,background .2s ease; }
.kf-button:hover { background:#1e4277; transform:translateY(-2px); box-shadow:0 14px 34px #142d5852; }
.kf-button:focus-visible { outline:3px solid #80b4ff; outline-offset:4px; }
.kf-button svg { display:block; width:25px; height:25px; }
.kf-button-label { font-size:11px; font-weight:600; line-height:1; letter-spacing:.5px; }
.kf-button::before { content:""; position:absolute; inset:0; border-radius:50%; background:#1767e8; opacity:0; pointer-events:none; }

.kf-popup { position:absolute; right:calc(100% + 18px); bottom:-4px; width:236px; padding:20px 18px 18px; border:1px solid #e3ebf5; border-radius:20px; background:#fff; color:#14191f; box-shadow:0 20px 56px #18335724,0 2px 10px #1833570d; opacity:0; visibility:hidden; pointer-events:none; transform:translateX(10px) scale(.96); transform-origin:right bottom; transition:opacity .24s ease,transform .24s cubic-bezier(.22,1,.36,1),visibility .24s; }
.kf.is-open .kf-popup { opacity:1; visibility:visible; pointer-events:auto; transform:none; }
.kf-popup::after { content:""; position:absolute; right:-7px; bottom:26px; width:13px; height:13px; border-top:1px solid #e3ebf5; border-right:1px solid #e3ebf5; background:#fff; transform:rotate(45deg); }

.kf-close { display:none; position:absolute; top:8px; right:10px; width:32px; height:32px; padding:0; border:0; border-radius:50%; background:none; color:#8593a6; font-size:22px; line-height:1; cursor:pointer; }
.kf-header { display:flex; align-items:center; gap:10px; padding-bottom:13px; border-bottom:1px solid #edf2f8; }
.kf-header-icon { display:flex; align-items:center; justify-content:center; flex:none; width:38px; height:38px; border-radius:11px; background:#142d58; color:#fff; }
.kf-header-icon svg { width:20px; height:20px; }
.kf-title { font-size:15px; font-weight:700; line-height:1.35; }
.kf-status { display:flex; align-items:center; gap:5px; margin-top:2px; color:#12a15a; font-size:12px; line-height:1.4; }
.kf-status i { width:6px; height:6px; border-radius:50%; background:#12a15a; }

.kf-qr { --qr-size:160px; position:relative; width:var(--qr-size); height:var(--qr-size); margin:14px auto 0; overflow:hidden; border:1px solid #edf2f8; border-radius:10px; background:#fff; }
.kf-qr img { position:absolute; left:calc(var(--qr-size) * -.277778); top:calc(var(--qr-size) * -.451111); width:calc(var(--qr-size) * 1.555556); height:auto; max-width:none; }
.kf-tip { margin:9px 0 0; color:#6b7a8d; font-size:12px; line-height:1.5; text-align:center; }
.kf-link { display:flex; align-items:center; justify-content:center; gap:7px; min-height:42px; margin-top:13px; border-radius:999px; background:#142d58; color:#fff; font-size:14px; font-weight:600; text-decoration:none; transition:background .2s ease,transform .15s ease; }
.kf-link:hover { background:#1e4277; transform:translateY(-1px); }
.kf-link:focus-visible { outline:3px solid #80b4ff; outline-offset:3px; }
.kf-link svg { width:17px; height:17px; flex:none; }

/* 电脑上鼠标移上去也会弹出，和旧版一致 */
@media (hover:hover) and (min-width:769px) {
  .kf:hover .kf-popup { opacity:1; visibility:visible; pointer-events:auto; transform:none; }
}
@media (prefers-reduced-motion:no-preference) {
  .kf-button::before { animation:kf-pulse 2.8s ease-out infinite; }
  .kf-status i { animation:kf-blink 1.8s ease-in-out infinite; }
}
@keyframes kf-pulse { 0% { transform:scale(1); opacity:.32; } 70%,100% { transform:scale(1.55); opacity:0; } }
@keyframes kf-blink { 0%,100% { opacity:1; } 50% { opacity:.35; } }

@media (max-width:768px) {
  .kf { right:16px; bottom:16px; }
  .kf-button { width:54px; height:54px; }
  .kf-popup { right:0; bottom:calc(100% + 14px); transform:translateY(10px) scale(.96); }
  .kf-popup::after { display:none; }
  .kf-close { display:block; }
}
@media print { .kf { display:none; } }
