/* =========================
  Simple WA Widget - MINI UI
========================= */
.sww-root, .sww-root *{
  box-sizing:border-box;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* Floating button (mini) */
/* ===== FLOATING WHATSAPP BUTTON (CLEAN & MODERN) ===== */
.sww-btn{
  bottom: 16px;
  padding: 8px 14px;
  border-radius: 999px;
  gap: 6px;

  font-size: 12px;
  font-weight: 700;
  letter-spacing: .3px;

  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  transition: all .2s ease;
}

.sww-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(0,0,0,.32);
}

.sww-icon{
  width: 16px;
  height: 16px;
}

.sww-label{
  font-size: 12px;
}

/* Overlay */
.sww-overlay{
  position: fixed; inset: 0;
  background: rgba(17,24,39,.42);
  display:none;
  z-index: 2147483001;
  backdrop-filter: blur(2px);
}

/* Modal - compact */
.sww-modal{
  position: fixed;
  bottom: 70px;
  width: 308px;                    /* nhỏ gọn */
  max-width: calc(100vw - 30px);
  border-radius: 16px;
  overflow: hidden;
  background:#fff;
  display:none;
  z-index: 2147483002;

  box-shadow: 0 20px 55px rgba(0,0,0,.26);
  transform-origin: bottom right;
  animation: swwWaOpen .22s cubic-bezier(.2,.9,.2,1);
}
@keyframes swwWaOpen{
  from{ opacity:0; transform: translateY(10px) scale(.96); }
  to  { opacity:1; transform: translateY(0) scale(1); }
}

/* Header - clean */
.sww-header{
  background: #0f766e;
  padding: 12px 12px;
  color:#fff;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
}
.sww-title{ font-weight: 800; font-size: 13px; line-height: 1.1; }
.sww-sub{ opacity:.85; font-size: 11px; margin-top:3px; }

/* Online/offline line (you appended via JS) */
.sww-status{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:11px;
  margin-top:6px;
  opacity:.9;
}
.sww-dot{ width:7px; height:7px; border-radius:50%; background:#22c55e; }
.sww-offline .sww-dot{ background:#9ca3af; }

.sww-close{
  width: 30px; height: 30px;
  border: none;
  border-radius: 10px;
  cursor:pointer;
  background: rgba(255,255,255,.16);
  color:#fff;
  font-size:16px;
  line-height: 1;
  transition: background .15s ease;
}
.sww-close:hover{ background: rgba(255,255,255,.22); }

/* Body */
.sww-body{
  padding: 12px;
  background: #f6f7f9;
}

/* Greeting bubble - subtle */
.sww-bubble{
  background:#fff;
  border-radius: 14px 14px 14px 6px;
  padding: 8px 10px;
  display:inline-block;
  max-width: 90%;
  box-shadow: 0 8px 18px rgba(0,0,0,.06);
  margin-bottom: 10px;
}
.sww-hello{ font-size: 12.5px; color:#111827; }

/* Inputs compact */
.sww-select, .sww-input{
  width: 100%;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  outline:none;
  font-size: 12.5px;
  background:#fff;
  margin-bottom: 8px;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.sww-select:focus, .sww-input:focus{
  border-color: rgba(34,197,94,.45);
  box-shadow: 0 0 0 3px rgba(34,197,94,.14);
}

/* CTA - smaller + centered + nice */
.sww-cta{
  border:none;
  cursor:pointer;
  border-radius: 999px;
  padding: 10px 14px;
  color:#fff;
  font-weight: 800;
  font-size: 12.5px;
  letter-spacing: .4px;

  width: 100%;
  max-width: 220px;   /* nhỏ gọn */
  margin: 6px auto 2px;

  box-shadow: 0 10px 22px rgba(0,0,0,.16);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.sww-cta:hover{ transform: translateY(-1px); filter: brightness(1.02); box-shadow: 0 14px 28px rgba(0,0,0,.2); }
.sww-cta:active{ transform: translateY(0); }

/* QR block compact */
.sww-qrwrap{
  background:#fff;
  border-radius: 14px;
  padding: 10px;
  margin-top: 10px;
}
.sww-qrlabel{
  font-size: 11px;
  color:#374151;
  margin-bottom: 8px;
}
.sww-qr{
  display:flex;
  justify-content:center;
}

/* Make QR smaller if library outputs big */
.sww-qr canvas, .sww-qr img{
  width: 160px !important;
  height: 160px !important;
  border-radius: 10px;
}

/* Footer very subtle */
.sww-footer{
  padding: 8px 12px;
  font-size: 10px;
  color:#6b7280;
  background:#fff;
  border-top: 1px solid #f3f4f6;
  text-align:center;
  opacity:.75;
}
/* ===== CHAT BUTTON: SMALL, CENTER, RADIUS 5PX ===== */
.sww-cta{
  border-radius: 5px !important;   /* bo góc 5px */
  padding: 8px 14px !important;    /* nhỏ gọn */
  font-size: 12px !important;      /* chữ nhỏ hơn */
  font-weight: 700;
  letter-spacing: .4px;

  width: auto !important;
  min-width: 160px;                /* vừa tay */
  max-width: 200px;

  margin: 6px auto 4px !important; /* cân giữa */
  display: block;

  box-shadow: 0 6px 14px rgba(0,0,0,.14);
}

.sww-cta:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0,0,0,.18);
}
/* ===== FIX: FLOATING BUTTON MUST BE FIXED ===== */
.sww-btn{
  position: fixed !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;

  bottom: 16px !important;
  padding: 8px 14px !important;

  border: none !important;
  cursor: pointer !important;
  color: #fff !important;

  z-index: 2147483000 !important;
}
/* ===== FLOATING BUTTON PULSE (SOFT & PRO) ===== */
.sww-btn{
  animation: swwPulse 2.2s ease-in-out infinite;
}

@keyframes swwPulse{
  0%{
    box-shadow: 0 0 0 0 rgba(34,197,94,.45);
  }
  70%{
    box-shadow: 0 0 0 14px rgba(34,197,94,0);
  }
  100%{
    box-shadow: 0 0 0 0 rgba(34,197,94,0);
  }
}
