/* ===== 可拖拽容器 ===== */
.wa-float-wrap{
  --wa-offset-x:22px;
  --wa-offset-y:22px;
  position:fixed;z-index:9999;
  transition:left .18s cubic-bezier(.2,.8,.2,1), top .18s cubic-bezier(.2,.8,.2,1);
}
.wa-pos--bottom-right{right:var(--wa-offset-x);bottom:var(--wa-offset-y)}
.wa-pos--bottom-left {left:var(--wa-offset-x);bottom:var(--wa-offset-y)}
.wa-pos--top-right   {right:var(--wa-offset-x);top:var(--wa-offset-y)}
.wa-pos--top-left    {left:var(--wa-offset-x);top:var(--wa-offset-y)}

/* 拖走之后由 JS 用 left/top 定位 */
.wa-float-wrap.wa-pos--free{right:auto !important;bottom:auto !important}
.wa-float-wrap.no-anim{transition:none}
.wa-float-wrap.is-dragging{transition:none;touch-action:none;user-select:none}

/* ===== 按钮本体（原型 .wafloat 同款）===== */
.wa-float{
  display:flex;align-items:center;gap:10px;
  background:linear-gradient(135deg,#16a34a,#22c55e);color:#fff;padding:12px 16px;border-radius:40px;
  box-shadow:0 8px 24px rgba(22,163,74,.4);
  font-weight:700;font-size:14px;text-decoration:none;font-family:inherit;
  white-space:nowrap;transition:background .15s,transform .15s,box-shadow .15s;
  -webkit-tap-highlight-color:transparent;
  animation:waGlow 2.6s ease-in-out infinite;
}
@keyframes waGlow{
  0%,100%{box-shadow:0 8px 24px rgba(22,163,74,.4)}
  50%{box-shadow:0 10px 34px rgba(22,163,74,.72)}
}
.wa-float:hover{background:linear-gradient(135deg,#15803d,#16a34a);color:#fff;animation:none}
.wa-float__ic{
  width:34px;height:34px;background:rgba(255,255,255,.2);border-radius:50%;
  display:flex;align-items:center;justify-content:center;font-size:18px;line-height:1;flex-shrink:0;
}
.wa-float__ic svg.ul-i{width:20px;height:20px;color:#fff;stroke:#fff;}
.wa-float-wrap.is-draggable .wa-float{cursor:grab}
.wa-float-wrap.is-dragging .wa-float{
  cursor:grabbing;transform:scale(1.05);
  box-shadow:0 16px 38px rgba(22,163,74,.5);
}
.wa-float-wrap.is-dragging .wa-float *{pointer-events:none}

/* ===== 拖拽手柄 ===== */
.wa-float__grip{
  position:absolute;top:-9px;right:-9px;
  width:24px;height:24px;padding:0;border-radius:50%;
  background:#0f1e3d;color:#fff;border:2px solid #fff;
  display:flex;align-items:center;justify-content:center;
  font-size:11px;line-height:1;cursor:grab;
  box-shadow:0 2px 8px rgba(15,30,61,.35);
  opacity:0;transform:scale(.75);transition:opacity .15s,transform .15s;
}
.wa-float-wrap:hover .wa-float__grip,
.wa-float-wrap.is-dragging .wa-float__grip,
.wa-float__grip:focus{opacity:1;transform:scale(1)}
.wa-float__grip:focus{outline:2px solid #2563eb;outline-offset:2px}
.wa-pos--bottom-left .wa-float__grip,
.wa-pos--top-left    .wa-float__grip{right:auto;left:-9px}

/* 触屏没有 hover，手柄常驻显示 */
@media (hover:none){
  .wa-float__grip{opacity:1;transform:scale(1)}
}

@media (max-width:640px){
  .wa-float__text{display:none}
  .wa-float{padding:10px;border-radius:50%}
}
