/* VoiceofTheAI Voice Co-Pilot Stylesheet (Production Grade) */

:root {
  --voi-primary: #3b82f6;
  --voi-primary-glow: rgba(59, 130, 246, 0.5);
  --voi-success: #10b981;
  --voi-success-glow: rgba(16, 185, 129, 0.6);
  --voi-amber: #f59e0b;
}

/* Floating Launcher Container */
.voi-copilot-container {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  box-sizing: border-box;
  user-select: none;
}

/* Modern Squircle Launcher Button */
.voi-copilot-btn {
  width: 66px;
  height: 66px;
  border-radius: 20px;
  background: rgba(17, 24, 39, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 2px solid rgba(255, 255, 255, 0.14);
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  outline: none;
  padding: 0;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.voi-copilot-btn:hover {
  transform: scale(1.08) translateY(-3px);
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 18px 36px -6px rgba(0, 0, 0, 0.7), 0 0 25px rgba(59, 130, 246, 0.4);
}

.voi-copilot-btn:active {
  transform: scale(0.96);
}

/* Avatar / Logo Container inside Button */
.voi-btn-avatar {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  position: relative;
  z-index: 2;
  transition: transform 0.3s ease;
}

.voi-copilot-btn:hover .voi-btn-avatar {
  transform: scale(1.02);
}

.voi-btn-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Status Indicator Dot */
.voi-btn-status-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2.5px solid #111827;
  background: #6b7280;
  z-index: 4;
  transition: all 0.3s ease;
}

/* Active State (Listening) */
.voi-copilot-btn.listening,
.voi-copilot-btn.active {
  border-color: rgba(59, 130, 246, 0.7);
  box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.6), 0 0 25px var(--voi-primary-glow);
}

.voi-copilot-btn.listening .voi-btn-status-dot,
.voi-copilot-btn.active .voi-btn-status-dot {
  background: var(--voi-primary);
  box-shadow: 0 0 10px var(--voi-primary);
  animation: voi-dot-blink 1.4s infinite ease-in-out;
}

/* Speaking State (Agent is talking) */
.voi-copilot-btn.speaking {
  border-color: rgba(16, 185, 129, 0.8);
  box-shadow: 0 14px 32px -6px rgba(0, 0, 0, 0.7), 0 0 35px var(--voi-success-glow);
}

.voi-copilot-btn.speaking .voi-btn-status-dot {
  background: var(--voi-success);
  box-shadow: 0 0 12px var(--voi-success);
  animation: voi-dot-pulse 0.8s infinite alternate ease-in-out;
}

/* Connecting State */
.voi-copilot-btn.connecting .voi-btn-status-dot {
  background: var(--voi-amber);
  box-shadow: 0 0 10px var(--voi-amber);
  animation: voi-dot-blink 0.6s infinite ease-in-out;
}

/* Concentric Soundwave Pulse Rings (Around the button) */
.voi-btn-rings {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 1;
}

.voi-ring {
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 24px;
  border: 2px solid transparent;
  opacity: 0;
}

/* Active Listening Breathing Wave */
.voi-copilot-btn.listening .voi-ring-1,
.voi-copilot-btn.active .voi-ring-1 {
  border-color: var(--voi-primary);
  animation: voi-ambient-breathe 2.4s infinite ease-out;
}

/* Speaking Radiant Waveforms */
.voi-copilot-btn.speaking .voi-ring-1 {
  border-color: var(--voi-success);
  animation: voi-wave-burst 1.8s infinite ease-out;
}

.voi-copilot-btn.speaking .voi-ring-2 {
  border-color: rgba(59, 130, 246, 0.8);
  animation: voi-wave-burst 1.8s infinite ease-out 0.5s;
}

.voi-copilot-btn.speaking .voi-ring-3 {
  border-color: rgba(168, 85, 247, 0.7);
  animation: voi-wave-burst 1.8s infinite ease-out 1s;
}

@keyframes voi-wave-burst {
  0% {
    transform: scale(0.96);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.65);
    opacity: 0;
  }
}

@keyframes voi-ambient-breathe {
  0% {
    transform: scale(0.98);
    opacity: 0.6;
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

@keyframes voi-dot-pulse {
  0% { transform: scale(0.9); }
  100% { transform: scale(1.3); }
}

@keyframes voi-dot-blink {
  50% { opacity: 0.4; }
}

/* UI Spotlight and Element Highlighting (Glow border on screen) */
.voi-highlighted-element {
  outline: 3px solid #3b82f6 !important;
  outline-offset: 4px !important;
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.85) !important;
  transition: all 0.4s ease !important;
  position: relative !important;
  z-index: 99999 !important;
  animation: voi-glow 1.5s infinite alternate ease-in-out !important;
}

@keyframes voi-glow {
  0% {
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
    outline-color: #3b82f6;
  }
  100% {
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.95);
    outline-color: #60a5fa;
  }
}
