.webuu-wa{
  position: fixed;
  bottom: 18px;
  z-index: 999999;
  font-family: var(--webuu-font, system-ui, -apple-system, Segoe UI, Roboto, sans-serif);
}
.webuu-wa.right{ right: 18px; }
.webuu-wa.left{ left: 18px; }

.webuu-wa__dock{
  position: relative;
  display: grid;
  gap: 10px;
  justify-items: end;
}
.webuu-wa.left .webuu-wa__dock{ justify-items: start; }

/* BURBUJA SUPERIOR (video/avatar) */
.webuu-wa__profile{
  position: relative;
  width: var(--webuu-profile, 64px);
  height: var(--webuu-profile, 64px);
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.webuu-wa__profileRing{
  width: var(--webuu-profile, 64px);
  height: var(--webuu-profile, 64px);
  border-radius: 999px;
  overflow: hidden;
  border: 4px solid var(--webuu-stroke, #b8ff00);
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
  background: #111;
  display: grid;
  place-items: center;
}
.webuu-wa__profileVideo,
.webuu-wa__profileImg{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display:block;
}
.webuu-wa__profileFallback{
  font-size: 18px;
  color: #fff;
  font-weight: 900;
}

.webuu-wa__badge{
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #25D366;
  color: #0b1b12;
  font-weight: 900;
  font-size: 12px;
  line-height: 22px;
  text-align: center;
  border: 2px solid #fff;
  display: none;
}

/* TEASER */
.webuu-wa__teaser{
  max-width: 220px;
  background: #25D366;
  color: #0b1b12;
  font-weight: 800;
  font-size: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0,0,0,.14);
  display: none;
}
.webuu-wa.right .webuu-wa__teaser{ justify-self: end; }
.webuu-wa.left .webuu-wa__teaser{ justify-self: start; }

/* BOTÓN WHATSAPP */
.webuu-wa__fab{
  width: var(--webuu-fab, 62px);
  height: var(--webuu-fab, 62px);
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  background: #25D366;
  box-shadow: 0 12px 36px rgba(0,0,0,.16);
  display: grid;
  place-items: center;
  transition: transform .18s ease;
}
.webuu-wa__fab:hover{ transform: translateY(-2px); }

.webuu-wa__waIcon{ width: calc(var(--webuu-fab, 62px) * 0.55); height: calc(var(--webuu-fab, 62px) * 0.55); fill: #fff; }
.webuu-wa__waIconImg{
  width: calc(var(--webuu-fab, 62px) * 0.58);
  height: calc(var(--webuu-fab, 62px) * 0.58);
  object-fit: contain;
  display:block;
}

.webuu-wa__fab.is-pulse{ animation: webuuPulse 2.2s ease-in-out infinite; }
@keyframes webuuPulse{
  0%,100%{ transform: scale(1); }
  50%{ transform: scale(1.06); }
}

/* PANEL */
.webuu-wa__panel{
  position: absolute;
  bottom: calc(var(--webuu-fab, 62px) + 16px);
  width: 340px;
  border-radius: 18px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 18px 70px rgba(0,0,0,.22);
  overflow: hidden;
  transform: translateY(10px);
  opacity: 0;
  pointer-events: none;
  transition: all .18s ease;
}
.webuu-wa.right .webuu-wa__panel{ right: 0; }
.webuu-wa.left .webuu-wa__panel{ left: 0; }

.webuu-wa.is-open .webuu-wa__panel{
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.webuu-wa__header{
  padding: 12px 12px;
  background: var(--webuu-header, #5b3df5);
  color: #fff;
  display:flex;
  justify-content: space-between;
  align-items: center;
}
.webuu-wa__headerLeft{
  display:flex;
  gap: 10px;
  align-items: center;
}
.webuu-wa__headerAvatar{
  width: 36px; height:36px;
  border-radius: 999px;
  overflow:hidden;
  border: 2px solid rgba(255,255,255,.22);
  display:grid;
  place-items:center;
}
.webuu-wa__headerAvatar img{ width:100%; height:100%; object-fit:cover; display:block; }
.webuu-wa__headerAvatarFallback{
  width:100%; height:100%;
  background: rgba(255,255,255,.14);
  display:grid; place-items:center;
  font-weight: 900;
}
.webuu-wa__title{ font-weight: 900; font-size: 14px; line-height: 1.1; }
.webuu-wa__cta{ font-size: 12px; opacity: .92; margin-top: 2px; }
.webuu-wa__close{
  border: 0;
  background: transparent;
  color:#fff;
  font-size: 20px;
  cursor: pointer;
  opacity: .9;
}

.webuu-wa__body{ padding: 12px; background: #f3f4f6; }

/* burbujas agente único */
.webuu-wa__bubbles{ display:flex; flex-direction:column; gap: 8px; }
.webuu-bubble{
  align-self: flex-start;
  max-width: 85%;
  background: #fff;
  border-radius: 14px 14px 14px 4px;
  padding: 8px 10px;
  font-size: 13px;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
  opacity: 0;
  transform: translateY(6px);
  animation: bubbleIn .25s ease forwards;
}
@keyframes bubbleIn{ to{ opacity:1; transform: translateY(0); } }

/* multiagente */
.webuu-wa__agents{ display:grid; gap:10px; }
.webuu-wa__agentsTop{
  background:#fff; border-radius:14px; padding:10px 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
}
.webuu-wa__agentsTitle{ font-weight:900; font-size:13px; color:#111827; }
.webuu-wa__agentsSub{ font-size:12px; color:#4b5563; margin-top:2px; }
.webuu-wa__agentsList{ display:flex; flex-direction:column; gap:8px; }

.webuu-agent{
  background:#fff; border-radius:14px; padding:10px 12px;
  display:flex; gap:10px; align-items:center;
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
  cursor:pointer; transition: transform .12s ease;
}
.webuu-agent:hover{ transform: translateY(-1px); }

.webuu-agent__avatar{
  width:40px; height:40px; border-radius:999px; overflow:hidden; position:relative; flex:0 0 auto;
}
.webuu-agent__avatar img{ width:100%; height:100%; object-fit:cover; display:block; }
.webuu-agent__online{
  position:absolute; bottom:-2px; right:-2px;
  width:12px; height:12px; border-radius:999px;
  background:#22c55e; border:2px solid #fff; display:none;
}
.webuu-agent__meta{ min-width:0; }
.webuu-agent__note{ font-size:11px; color:#6b7280; margin-bottom:2px; }
.webuu-agent__name{ font-weight:900; font-size:13px; color:#111827; }
.webuu-agent__role{ font-size:12px; color:#6b7280; margin-top:2px; }
.webuu-agent__selected{ outline:2px solid var(--webuu-stroke, #b8ff00); }

/* footer */
.webuu-wa__footer{ padding:10px 12px; background:#fff; }
.webuu-wa__go{
  width:100%; border:0;
  background:#25D366; color:#0b1b12;
  font-weight:900; padding:11px 12px;
  border-radius:12px; cursor:pointer;
}