/**
 * Home-page Vapi chat + voice widgets.
 */

#pps-voice-btn {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border: none;
  border-radius: 999px;
  background: #173b64;
  color: #ffffff;
  font: 600 15px/1 var(--pps-font-body, system-ui, sans-serif);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

#pps-voice-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

#pps-voice-btn.live {
  background: #b3261e;
}

#pps-voice-btn.speaking .pps-voice-dot {
  animation: pps-voice-pulse 0.9s infinite;
}

.pps-voice-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  flex-shrink: 0;
}

@keyframes pps-voice-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.6);
    opacity: 0.5;
  }
}

#pps-voice-status {
  position: fixed;
  left: 20px;
  bottom: 76px;
  z-index: 9999;
  max-width: 260px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #fff;
  color: #333;
  font: 13px/1.3 var(--pps-font-body, system-ui, sans-serif);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  display: none;
}

/* Keep back-to-top clear of the chat launcher on the home page. */
body.pps-front-page .pps-back-top {
  right: 1.25rem;
  bottom: 5.75rem;
}

@media (max-width: 575.98px) {
  #pps-voice-btn {
    left: 12px;
    bottom: 12px;
    padding: 12px 16px;
    font-size: 14px;
  }

  #pps-voice-status {
    left: 12px;
    bottom: 64px;
    max-width: calc(100vw - 24px);
  }

  body.pps-front-page .pps-back-top {
    bottom: 5.25rem;
  }
}
