
.wfa-widget-root{
  position: fixed;
  bottom: 18px;
  z-index: 999999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
.wfa-widget-root[data-inline="1"]{ position: relative; bottom:auto; }
.wfa-widget-root.wfa-left{ left: 18px; }
.wfa-widget-root.wfa-right{ right: 18px; }

.wfa-bubble{
  display:flex;
  align-items:center;
  gap:10px;
  cursor:pointer;
  user-select:none;
  padding:12px 14px;
  border-radius:999px;
  background: var(--wfa-primary);
  color:#fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.16);
}
.wfa-bubble-dot{
  width:10px;height:10px;border-radius:50%;
  background: var(--wfa-accent);
  box-shadow:0 0 0 3px rgba(255,255,255,.18);
}
.wfa-bubble-text{ font-weight:700; font-size:14px; }

.wfa-panel{
  width: 340px;
  max-width: calc(100vw - 36px);
  height: 480px;
  max-height: calc(100vh - 110px);
  background:#fff;
  border-radius:18px;
  overflow:hidden;
  box-shadow: 0 18px 50px rgba(0,0,0,.20);
  position:absolute;
  bottom: 58px;
  display:none;
}
.wfa-left .wfa-panel{ left:0; }
.wfa-right .wfa-panel{ right:0; }

.wfa-header{
  background: var(--wfa-primary);
  color:#fff;
  padding:12px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.wfa-title{ display:flex; align-items:center; gap:10px; }
.wfa-avatar{
  width:34px;height:34px;border-radius:12px;
  background: rgba(255,255,255,.18);
  position:relative;
  background-size:cover;
  background-position:center;
}
.wfa-avatar:after{
  content:"";
  position:absolute; inset:8px;
  border-radius:10px;
  background: rgba(255,255,255,.20);
}
.wfa-avatar.has-img:after{ display:none; }
.wfa-name{ font-weight:800; }
.wfa-sub{ font-size:12px; opacity:.9; }

.wfa-close{
  background: rgba(255,255,255,.18);
  border:0;
  color:#fff;
  width:34px;height:34px;border-radius:12px;
  cursor:pointer;
  font-size:20px;
}

.wfa-body{ display:flex; flex-direction:column; height:calc(100% - 58px); }
.wfa-messages{
  padding:12px;
  overflow:auto;
  flex:1;
  background:#fbfbfc;
}
.wfa-msg{ display:flex; margin:10px 0; }
.wfa-msg.wfa-user{ justify-content:flex-end; }
.wfa-bubble-msg{
  max-width: 82%;
  padding:10px 12px;
  border-radius:14px;
  font-size:14px;
  line-height:1.3;
  box-shadow:0 1px 2px rgba(0,0,0,.06);
}
.wfa-user .wfa-bubble-msg{
  background: var(--wfa-primary);
  color:#fff;
  border-bottom-right-radius:6px;
}
.wfa-bot .wfa-bubble-msg{
  background:#fff;
  border:1px solid #e5e7eb;
  color:#111827;
  border-bottom-left-radius:6px;
}
.wfa-actions{
  margin-top:8px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.wfa-action{
  display:inline-flex;
  padding:8px 10px;
  border-radius:999px;
  background: var(--wfa-accent);
  color:#111;
  font-weight:700;
  font-size:12px;
  text-decoration:none;
}

.wfa-quick-actions{
  padding:0 12px 10px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.wfa-qbtn{
  border:1px solid #e5e7eb;
  background:#fff;
  border-radius:999px;
  padding:8px 10px;
  font-size:12px;
  cursor:pointer;
}

.wfa-input{
  padding:10px;
  display:flex;
  gap:8px;
  border-top:1px solid #e5e7eb;
  background:#fff;
}
.wfa-text{
  flex:1;
  border:1px solid #e5e7eb;
  border-radius:12px;
  padding:10px 10px;
  font-size:14px;
  outline:none;
}
.wfa-send{
  border:0;
  border-radius:12px;
  padding:0 14px;
  background: var(--wfa-primary);
  color:#fff;
  cursor:pointer;
  font-weight:900;
}
.wfa-footer{
  padding:8px 12px;
  background:#fff;
  border-top:1px dashed #e5e7eb;
}
.wfa-mini{ font-size:11px; color:#6b7280; }

/* Typing indicator */
.wfa-typing{display:inline-flex;gap:4px;vertical-align:middle;margin-right:6px}
.wfa-typing span{width:6px;height:6px;border-radius:999px;background:rgba(17,24,39,.35);display:inline-block;animation:wfa-bounce 1.1s infinite ease-in-out}
.wfa-typing span:nth-child(2){animation-delay:.15s}
.wfa-typing span:nth-child(3){animation-delay:.3s}
@keyframes wfa-bounce{0%,80%,100%{transform:scale(0.6);opacity:.6}40%{transform:scale(1);opacity:1}}

/* Search bar shortcode */
.wfa-searchbar{display:flex;gap:10px;align-items:center;max-width:720px}
.wfa-search-input{flex:1;min-width:220px;border:1px solid #e5e7eb;border-radius:14px;padding:12px 14px;font-size:15px;outline:none}
.wfa-search-input:focus{border-color:var(--wfa-primary);box-shadow:0 0 0 3px rgba(0,84,169,0.12)}
.wfa-search-btn{border:0;border-radius:14px;padding:12px 16px;background:var(--wfa-primary);color:#fff;font-weight:800;cursor:pointer}
.wfa-search-btn:hover{opacity:.92}
