.wl-ai-assistant {
  position: fixed;
  inset: 0;
  z-index: 1350;
  pointer-events: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.wl-ai-assistant[hidden],
.wl-ai-assistant__bubble[hidden],
.wl-ai-assistant__label[hidden],
.wl-ai-assistant__welcome[hidden] { display: none !important; }

.wl-ai-assistant *,
.wl-ai-assistant *::before,
.wl-ai-assistant *::after { box-sizing: border-box; }

.wl-ai-assistant__bubble {
  position: fixed;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  padding: 2px;
  border: 3px solid #bc49c5;
  border-radius: 50%;
  background: linear-gradient(145deg, #f5dcff, #ffe3f4);
  box-shadow: 0 0 0 2px rgba(240, 113, 190, .25), 0 4px 14px rgba(154, 51, 147, .25);
  cursor: grab;
  touch-action: none;
  user-select: none;
  pointer-events: auto;
}

.wl-ai-assistant__bubble:active { cursor: grabbing; }
.wl-ai-assistant__bubble:focus-visible {
  outline: 3px solid #8943b2;
  outline-offset: 3px;
}
.wl-ai-assistant__bubble img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.wl-ai-assistant[data-mode="listening"] .wl-ai-assistant__bubble {
  border-color: #ef623a;
  box-shadow: 0 0 0 3px rgba(239, 98, 58, .22), 0 4px 14px rgba(134, 45, 27, .2);
  animation: wl-ai-breathe 1.8s ease-in-out infinite;
}
.wl-ai-assistant[data-mode="thinking"] .wl-ai-assistant__bubble {
  border-color: #e0ac24;
  box-shadow: 0 0 0 3px rgba(224, 172, 36, .23), 0 4px 14px rgba(113, 82, 19, .2);
  animation: wl-ai-breathe 2.2s ease-in-out infinite;
}
.wl-ai-assistant[data-mode="speaking"] .wl-ai-assistant__bubble {
  border-color: #2bb878;
  box-shadow: 0 0 0 3px rgba(43, 184, 120, .23), 0 4px 14px rgba(23, 102, 68, .2);
}
.wl-ai-assistant[data-mode="speaking"] .wl-ai-assistant__bubble::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 2px solid rgba(43, 184, 120, .65);
  border-radius: 50%;
  animation: wl-ai-wave 1.8s ease-out infinite;
}

.wl-ai-assistant__label {
  position: fixed;
  width: max-content;
  max-width: 150px;
  padding: 5px 9px;
  border-radius: 11px;
  color: #48265d;
  background: #fff;
  border: 1px solid #e5d0ed;
  box-shadow: 0 2px 9px rgba(50, 28, 69, .15);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
  white-space: nowrap;
  pointer-events: none;
}

.wl-ai-assistant__name {
  position: fixed;
  width: max-content;
  padding: 2px 5px;
  border-radius: 7px;
  color: #672778;
  background: rgba(255, 255, 255, .96);
  font-size: 11px;
  font-weight: 700;
  line-height: 16px;
  white-space: nowrap;
  pointer-events: none;
}

.wl-ai-assistant__welcome {
  position: fixed;
  width: max-content;
  max-width: min(270px, calc(100vw - 16px));
  padding: 7px 10px;
  border: 1px solid #e9c8ef;
  border-radius: 13px;
  color: #642678;
  background: #fff;
  box-shadow: 0 3px 12px rgba(80, 34, 94, .16);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  pointer-events: none;
  animation: wl-ai-welcome-out 4s ease-in forwards;
}

@keyframes wl-ai-welcome-out {
  0%, 78% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes wl-ai-breathe {
  50% { transform: scale(1.045); }
}
@keyframes wl-ai-wave {
  0% { transform: scale(.94); opacity: .65; }
  100% { transform: scale(1.2); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .wl-ai-assistant__bubble,
  .wl-ai-assistant__bubble::after,
  .wl-ai-assistant__welcome { animation: none !important; }
}
