.iwc-voice-fab {
  position: fixed;
  right: 18px;
  bottom: 88px;
  z-index: 9998;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0a0b0f;
  background: linear-gradient(145deg, #c8f542, #a8d92a);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(200, 245, 66, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.iwc-voice-fab:hover { transform: scale(1.06); }
.iwc-has-voice-fab .wa-float { bottom: 18px; }

.iwc-voice-panel {
  position: fixed;
  right: 18px;
  bottom: 160px;
  z-index: 9999;
  width: min(380px, calc(100vw - 28px));
  max-height: min(560px, calc(100vh - 110px));
  display: flex;
  flex-direction: column;
  background: #0f1117;
  color: #f3f4f6;
  border: 1px solid rgba(200, 245, 66, 0.28);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
.iwc-voice-panel[hidden] { display: none !important; }
.iwc-voice-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px 10px;
  background: #0a0b0f;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.iwc-voice-head strong { display: block; font-size: 14px; }
.iwc-voice-sub { display: block; font-size: 12px; color: #c8f542; margin-top: 2px; }
.iwc-voice-close {
  background: transparent; border: none; color: #9ca3af;
  font-size: 16px; cursor: pointer; line-height: 1;
}
.iwc-voice-log {
  flex: 1; overflow: auto; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 8px; min-height: 180px;
}
.iwc-voice-bubble {
  max-width: 92%; padding: 10px 12px; border-radius: 14px;
  font-size: 13.5px; line-height: 1.45;
}
.iwc-voice-agent {
  align-self: flex-start; background: #1a1d27;
  border: 1px solid rgba(200, 245, 66, 0.15);
}
.iwc-voice-user {
  align-self: flex-end; background: #243018;
  border: 1px solid rgba(200, 245, 66, 0.25);
}
.iwc-voice-status {
  margin: 0; padding: 0 14px 8px; font-size: 12px; color: #9ca3af;
}
.iwc-state-listening .iwc-voice-status { color: #c8f542; }
.iwc-state-thinking .iwc-voice-status { color: #93c5fd; }
.iwc-state-speaking .iwc-voice-status { color: #fbbf24; }

.iwc-voice-actions { display: flex; gap: 8px; padding: 0 14px 14px; }
.iwc-voice-toggle {
  flex: 1; border: none; border-radius: 12px; padding: 12px 10px;
  font-weight: 700; font-size: 13px; cursor: pointer;
  color: #0a0b0f; background: #c8f542;
}
.iwc-state-listening .iwc-voice-toggle,
.iwc-state-thinking .iwc-voice-toggle,
.iwc-state-speaking .iwc-voice-toggle {
  background: #ff5c5c; color: #fff;
}
.iwc-voice-wa {
  display: flex; align-items: center; justify-content: center;
  padding: 0 12px; border-radius: 12px; text-decoration: none;
  font-size: 12px; font-weight: 600; color: #fff; background: #25d366;
}
/* pulse ring when listening */
.iwc-state-listening .iwc-voice-fab {
  box-shadow: 0 0 0 0 rgba(200, 245, 66, 0.55), 0 8px 28px rgba(0,0,0,0.28);
  animation: iwcFabPulse 1.6s infinite;
}
@keyframes iwcFabPulse {
  0% { box-shadow: 0 0 0 0 rgba(200,245,66,0.55), 0 8px 28px rgba(0,0,0,0.28); }
  70% { box-shadow: 0 0 0 14px rgba(200,245,66,0), 0 8px 28px rgba(0,0,0,0.28); }
  100% { box-shadow: 0 0 0 0 rgba(200,245,66,0), 0 8px 28px rgba(0,0,0,0.28); }
}
@media (max-width: 520px) {
  .iwc-voice-fab { right: 14px; bottom: 84px; }
  .iwc-voice-panel { right: 12px; left: 12px; width: auto; bottom: 150px; }
}

/* Type number/email fallback */
.iwc-voice-typebox {
  display: flex;
  gap: 6px;
  padding: 0 14px 10px;
  align-items: stretch;
}
.iwc-voice-typebox[hidden] { display: none !important; }
.iwc-voice-typebox input {
  flex: 1;
  min-width: 0;
  border-radius: 10px;
  border: 1px solid rgba(200, 245, 66, 0.35);
  background: #1a1d27;
  color: #f3f4f6;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
}
.iwc-voice-typebox input:focus {
  border-color: #c8f542;
  box-shadow: 0 0 0 2px rgba(200, 245, 66, 0.15);
}
.iwc-voice-typebox input::placeholder { color: #6b7280; font-size: 12px; }
.iwc-voice-sendtext {
  border: none;
  border-radius: 10px;
  padding: 0 14px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  color: #0a0b0f;
  background: #c8f542;
  white-space: nowrap;
}
