/* ================= ROOT ================= */
.wa-support-root{
  position:fixed;
  left:24px;
  bottom:24px;
  z-index:99999;
  font-family:system-ui,-apple-system,BlinkMacSystemFont,sans-serif;

  --wa-primary:#0a74bb;
  --wa-primary-dark:#075c94;
  --wa-bg:#ffffff;
  --wa-text:#1f2937;
  --wa-muted:#6b7280;
  --wa-whatsapp:#25D366;
}

/* ================= SUPPORT BUTTON ================= */
.wa-support-btn{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 18px;
  border-radius:999px;
  border:none;
  background:linear-gradient(135deg,var(--wa-primary),var(--wa-primary-dark));
  color:#fff;
  font-weight:600;
  font-size:14px;
  cursor:pointer;
  box-shadow:0 12px 30px rgba(0,0,0,.35);
  transition:.25s ease;
}

.wa-support-btn .wa-icon{
  width:22px;
  height:22px;
  background-image:var(--wa-icon);
  background-repeat:no-repeat;
  background-size:contain;
  background-position:center;
}

.wa-support-btn:hover{
  transform:translateY(-2px);
  box-shadow:0 18px 40px rgba(0,0,0,.45);
}

/* ================= PANEL ================= */
.wa-support-panel{
  position:absolute;
  left:0;
  bottom:74px;
  width:236px;
  background:var(--wa-bg);
  border-radius:16px;
  box-shadow:0 24px 60px rgba(0,0,0,.4);
  overflow:hidden;
  transform-origin:bottom left;
  transition:all .25s ease;
}

.wa-support-panel.is-hidden{
  opacity:0;
  transform:translateY(12px) scale(.96);
  pointer-events:none;
}

/* ================= HEADER ================= */
.wa-panel-header{
  background:linear-gradient(135deg,var(--wa-primary),var(--wa-primary-dark));
  color:#fff;
  padding:12px 14px;
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.wa-panel-header .left{
  display:flex;
  gap:10px;
  align-items:center;
}

.wa-panel-header .wa-icon.big{
  width:30px;
  height:30px;
  background-image:var(--wa-icon);
  background-repeat:no-repeat;
  background-size:contain;
  background-position:center;
}

.wa-panel-header .title{
  font-weight:700;
  font-size:14px;
}

.wa-panel-header .subtitle{
  font-size:11px;
  opacity:.9;
}

/* ================= CLOSE BUTTON (FIX FLATSOME) ================= */
.wa-support-root .wa-support-close{
  all:unset;
  width:28px;
  height:28px;
  border-radius:50%;
  background:rgba(255,255,255,.18);
  color:#fff;
  font-size:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  line-height:1;
  transition:.2s ease;
}

.wa-support-root .wa-support-close:hover{
  background:rgba(255,255,255,.32);
}

/* ================= BODY ================= */
.wa-panel-body{
  padding:6px;
}

/* ================= AGENT ================= */
.wa-agent{
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 10px;
  border-radius:12px;
  text-decoration:none;
  color:var(--wa-text);
  transition:.2s ease;
}

.wa-agent + .wa-agent{
  margin-top:4px;
}

.wa-agent:hover{
  background:#f1f5f9;
}

.wa-agent .avatar{
  width:36px;
  height:36px;
  border-radius:50%;
  background:#e5e7eb;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  font-size:14px;
  color:#374151;
  flex-shrink:0;
}

/* ================= NAME + STATUS ================= */
.wa-agent .name{
  font-weight:600;
  font-size:13px;
}

/* ẨN NOTE HOÀN TOÀN */
.wa-agent .note{
  display:none;
}

/* TẠO DÒNG TRẠNG THÁI ONLINE */
.wa-agent .name::after{
  content:"Online";
  display:block;
  font-size:11px;
  font-weight:400;
  color:var(--wa-muted);
  margin-top:2px;
}

/* ================= ONLINE DOT (PULSE) ================= */
.online-dot{
  position:relative;
  width:8px;
  height:8px;
  background:var(--wa-whatsapp);
  border-radius:50%;
  margin-left:auto;
}

.online-dot::after{
  content:'';
  position:absolute;
  inset:-4px;
  border-radius:50%;
  background:rgba(37,211,102,.35);
  animation:wa-pulse 1.6s infinite ease-out;
}

@keyframes wa-pulse{
  0%{ transform:scale(.5); opacity:.8; }
  100%{ transform:scale(1.6); opacity:0; }
}

/* ================= MOBILE ================= */
@media(max-width:480px){
  .wa-support-root{
    left:12px;
    bottom:12px;
  }

  .wa-support-panel{
    width:92vw;
  }
}
