/* ==========================================================================
   AXIS LABS — Voice AI Assistant Widget (voice-bot.css)
   Futuristic Glassmorphism, Dual-Color Glow & Audio Waveform Controls
   ========================================================================== */

:root {
  --voice-emerald: #10b981;
  --voice-amber: #f59e0b;
  --voice-bg-glass: rgba(15, 23, 42, 0.88);
  --voice-border: rgba(255, 255, 255, 0.12);
  --voice-text: #f8fafc;
  --voice-muted: #94a3b8;
}

/* 1. FLOATING LAUNCH BUTTON */
.voice-widget-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px 10px 12px;
  background: var(--voice-bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 40px;
  color: var(--voice-text);
  font-family: var(--font-sans, 'Plus Jakarta Sans', sans-serif);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(16, 185, 129, 0.2);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.voice-widget-btn:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(245, 158, 11, 0.6);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 25px rgba(245, 158, 11, 0.3);
}

.voice-orb {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--voice-amber), var(--voice-emerald));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px var(--voice-emerald);
  animation: orbPulse 3s infinite ease-in-out;
}

@keyframes orbPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(16, 185, 129, 0.5), 0 0 20px rgba(245, 158, 11, 0.3); }
  50% { box-shadow: 0 0 20px rgba(16, 185, 129, 0.8), 0 0 35px rgba(245, 158, 11, 0.6); }
}

.voice-orb-icon {
  width: 16px;
  height: 16px;
  color: #0f172a;
}

.voice-badge-live {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--voice-emerald);
  box-shadow: 0 0 8px var(--voice-emerald);
  animation: livePing 1.5s infinite;
}

@keyframes livePing {
  0% { transform: scale(0.9); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.5; }
  100% { transform: scale(0.9); opacity: 1; }
}

/* 2. OVERLAY MODAL CONSOLE */
.voice-modal {
  position: fixed;
  bottom: 90px;
  right: 28px;
  z-index: 10000;
  width: 380px;
  max-width: calc(100vw - 36px);
  background: var(--voice-bg-glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--voice-border);
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 30px rgba(16, 185, 129, 0.15);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.96);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.voice-modal.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.voice-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.voice-modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--voice-emerald);
  letter-spacing: 1px;
}

.voice-modal-close {
  background: transparent;
  border: none;
  color: var(--voice-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.2s;
}

.voice-modal-close:hover {
  color: var(--voice-text);
  background: rgba(255, 255, 255, 0.1);
}

.voice-modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* AUDIO WAVEFORM CANVAS */
.voice-wave-container {
  position: relative;
  width: 100%;
  height: 90px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

canvas#voice-waveform-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.voice-status-tag {
  position: absolute;
  top: 10px;
  left: 12px;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.8px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--voice-emerald);
}

/* TRANSCRIPT BOX */
.voice-transcript-box {
  min-height: 80px;
  max-height: 140px;
  overflow-y: auto;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--voice-text);
}

.voice-transcript-box::-webkit-scrollbar {
  width: 4px;
}

.voice-transcript-box::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.voice-speaker-label {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.voice-speaker-user { color: var(--voice-amber); }
.voice-speaker-ai { color: var(--voice-emerald); }

/* CONTROLS */
.voice-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 4px;
}

.voice-mic-main-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--voice-emerald), #059669);
  border: none;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
  transition: all 0.3s ease;
}

.voice-mic-main-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.7);
}

.voice-mic-main-btn.listening {
  background: linear-gradient(135deg, var(--voice-amber), #d97706);
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.7);
  animation: micPulse 1.2s infinite;
}

@keyframes micPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

/* QUICK SUGGESTIONS */
.voice-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.voice-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 0.75rem;
  color: var(--voice-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.voice-chip:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--voice-emerald);
}

/* PHONE CALL TRIGGER TAB */
.voice-phone-tab {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.voice-phone-form {
  display: flex;
  gap: 8px;
}

.voice-phone-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.78rem;
  color: var(--voice-text);
  outline: none;
}

.voice-phone-input:focus {
  border-color: var(--voice-emerald);
}

.voice-phone-submit {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.5);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--voice-amber);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.voice-phone-submit:hover {
  background: var(--voice-amber);
  color: #0f172a;
}
