/* ═══ Rudra AI Voice Calling Showcase — cinematic voice demo ═══ */

.voice-showcase {
  position: fixed;
  inset: 0;
  z-index: 99985;
  background: #030208;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
  overflow: hidden;
  font-family: 'Inter', system-ui, sans-serif;
}
.voice-showcase.is-open { opacity: 1; pointer-events: auto; }
.voice-showcase[hidden] { display: none !important; }

.voice-showcase-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 45% at 50% 0%, rgba(34, 197, 94, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 20% 90%, rgba(212, 175, 55, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 40% 35% at 85% 70%, rgba(244, 114, 182, 0.06) 0%, transparent 55%),
    #040608;
}
.voice-showcase-grid {
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(139, 92, 246, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 45%, black 10%, transparent 75%);
  pointer-events: none;
}

.voice-show-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 18px 14px;
  box-sizing: border-box;
}

.voice-show-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-bottom: 12px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid rgba(139, 92, 246, 0.22);
  background: rgba(255, 255, 255, 0.02);
}
.voice-show-back {
  padding: 8px 14px;
  border-radius: 9px;
  border: 1px solid rgba(212, 175, 55, 0.28);
  background: transparent;
  color: rgba(240, 215, 140, 0.9);
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
}
.voice-show-brand {
  flex: 1;
  text-align: center;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #e9d5ff;
  text-transform: uppercase;
}
.voice-show-live {
  font-size: 0.54rem;
  font-weight: 700;
  color: #ef4444;
  letter-spacing: 0.1em;
  padding: 5px 10px 5px 16px;
  border-radius: 999px;
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.08);
  position: relative;
  flex-shrink: 0;
}
.voice-show-live::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ef4444;
  animation: voiceRecBlink 1s ease-in-out infinite;
}
@keyframes voiceRecBlink {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; box-shadow: 0 0 8px #ef4444; }
}

.voice-show-layout {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(300px, 420px) 1fr;
  gap: 18px;
  min-height: 0;
  overflow: hidden;
}

/* ── Call phone zone ── */
.voice-call-col { display: flex; flex-direction: column; min-height: 0; }
.voice-device-frame {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-radius: 28px;
  border: 2px solid rgba(34, 197, 94, 0.18);
  background: linear-gradient(165deg, rgba(8, 18, 12, 0.96), rgba(4, 6, 8, 0.98));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 30px rgba(34, 197, 94, 0.06);
  overflow: hidden;
}
.voice-call-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 14px;
}

.voice-call-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  margin-bottom: 10px;
  font-size: 0.58rem;
  color: rgba(255, 255, 255, 0.5);
}
.voice-call-state {
  color: #4ade80;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.voice-call-timer {
  font-variant-numeric: tabular-nums;
  color: #d4af37;
  font-weight: 700;
}

/* Dual human avatars — active speaker glows */
.voice-dual-avatars {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
  padding: 8px 4px 4px;
  flex-shrink: 0;
}
.voice-avatar-card {
  flex: 1;
  max-width: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 8px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s, opacity 0.3s;
  opacity: 0.55;
}
.voice-avatar-card.is-speaking {
  opacity: 1;
  transform: scale(1.04);
}
.voice-avatar-card--ai.is-speaking {
  border-color: rgba(244, 114, 182, 0.45);
  box-shadow: 0 0 28px rgba(244, 114, 182, 0.18);
}
.voice-avatar-card--client.is-speaking {
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 28px rgba(56, 189, 248, 0.18);
}
.voice-avatar-photo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  font-family: 'Cormorant Garamond', Georgia, serif;
  border: 2px solid rgba(255, 255, 255, 0.15);
}
.voice-avatar-photo--ai {
  background: linear-gradient(145deg, #be185d, #f472b6);
  color: #fff;
}
.voice-avatar-photo--client {
  background: linear-gradient(145deg, #0369a1, #38bdf8);
  color: #fff;
}
.voice-avatar-meta {
  text-align: center;
  line-height: 1.3;
}
.voice-avatar-meta strong {
  display: block;
  font-size: 0.72rem;
  color: #f0d78c;
}
.voice-avatar-meta em {
  font-style: normal;
  font-size: 0.48rem;
  color: rgba(255, 255, 255, 0.42);
}
.voice-avatar-status {
  font-size: 0.46rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.35);
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}
.voice-avatar-card.is-speaking .voice-avatar-status {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.1);
}
.voice-call-bridge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 2px;
  flex-shrink: 0;
}
.voice-bridge-line {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.12);
}
.voice-bridge-icon {
  font-size: 0.85rem;
  opacity: 0.6;
}
.voice-orb.is-hidden { display: none !important; }

.voice-avatar-zone {
  position: relative;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0 8px;
}
.voice-orb {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: radial-gradient(circle at 35% 30%, rgba(139, 92, 246, 0.5), rgba(30, 15, 60, 0.9));
  border: 2px solid rgba(167, 139, 250, 0.4);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.25);
  transition: box-shadow 0.3s, transform 0.3s;
  z-index: 2;
}
.voice-orb.is-speaking.is-ai {
  box-shadow: 0 0 50px rgba(212, 175, 55, 0.45);
  transform: scale(1.06);
  border-color: rgba(212, 175, 55, 0.5);
}
.voice-orb.is-speaking.is-client {
  box-shadow: 0 0 50px rgba(6, 182, 212, 0.45);
  transform: scale(1.04);
  border-color: rgba(6, 182, 212, 0.5);
}
.voice-orb-ring {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 1px solid rgba(139, 92, 246, 0.2);
  animation: voiceRingPulse 2.5s ease-in-out infinite;
  pointer-events: none;
}
.voice-orb-ring--2 {
  width: 150px;
  height: 150px;
  animation-delay: -0.8s;
  border-color: rgba(6, 182, 212, 0.15);
}
@keyframes voiceRingPulse {
  0%, 100% { transform: scale(0.92); opacity: 0.3; }
  50% { transform: scale(1.08); opacity: 0.7; }
}

.voice-caller-info {
  text-align: center;
  margin-top: 8px;
}
.voice-caller-info strong {
  display: block;
  font-size: 0.82rem;
  color: #f0d78c;
  margin-bottom: 2px;
}
.voice-caller-info em {
  font-style: normal;
  font-size: 0.58rem;
  color: rgba(255, 255, 255, 0.45);
}

.voice-wave-dual {
  display: flex;
  gap: 16px;
  width: 100%;
  max-width: 280px;
  margin: 10px auto 6px;
  flex-shrink: 0;
}
.voice-wave-channel {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  height: 36px;
  opacity: 0.35;
  transition: opacity 0.25s;
}
.voice-wave-channel.is-active { opacity: 1; }
.voice-wave-channel span {
  width: 4px;
  height: 30%;
  border-radius: 999px;
  transition: height 0.08s ease;
}
.voice-wave-channel--ai span {
  background: linear-gradient(to top, #9a7b2f, #d4af37);
}
.voice-wave-channel--client span {
  background: linear-gradient(to top, #0891b2, #22d3ee);
}
.voice-wave-label {
  font-size: 0.46rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  margin-top: 2px;
}
.voice-wave-label--ai { color: rgba(212, 175, 55, 0.65); }
.voice-wave-label--client { color: rgba(34, 211, 238, 0.65); }

.voice-live-caption {
  flex-shrink: 0;
  font-size: 0.62rem;
  color: rgba(233, 213, 255, 0.85);
  text-align: center;
  padding: 8px 10px;
  margin: 4px 0;
  border-radius: 10px;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.15);
  line-height: 1.45;
  min-height: 2.8em;
}

.voice-transcript {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 2px;
  scrollbar-width: thin;
}
.voice-bubble-row { display: flex; flex-direction: column; gap: 2px; animation: voiceBubbleIn 0.35s ease; }
.voice-bubble-row--ai { align-items: flex-start; }
.voice-bubble-row--client { align-items: flex-end; }
.voice-bubble-label {
  font-size: 0.46rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  padding: 0 4px;
}
.voice-bubble {
  max-width: 92%;
  padding: 8px 11px;
  border-radius: 14px;
  font-size: 0.72rem;
  line-height: 1.5;
}
.voice-bubble--ai {
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-left: 2px solid #d4af37;
  color: #fcf9f2;
  border-radius: 4px 14px 14px 14px;
}
.voice-bubble--client {
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.2);
  color: rgba(240, 253, 255, 0.92);
  border-radius: 14px 4px 14px 14px;
}
@keyframes voiceBubbleIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Summary + WhatsApp toast */
.voice-summary-card {
  display: none;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(212, 175, 55, 0.25);
  background: rgba(212, 175, 55, 0.06);
  flex-shrink: 0;
  animation: voiceBubbleIn 0.4s ease;
}
.voice-summary-card.is-visible { display: block; }
.voice-summary-card strong {
  display: block;
  font-size: 0.58rem;
  color: #d4af37;
  margin-bottom: 4px;
  letter-spacing: 0.06em;
}
.voice-summary-card p {
  margin: 0;
  font-size: 0.64rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.45;
}
.voice-wa-toast {
  display: none;
  margin-top: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 600;
  color: #25d366;
  border: 1px solid rgba(37, 211, 102, 0.3);
  background: rgba(37, 211, 102, 0.08);
  text-align: center;
  flex-shrink: 0;
  animation: voiceBubbleIn 0.4s ease;
}
.voice-wa-toast.is-visible { display: block; }

/* ── Side panel ── */
.voice-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  overflow-y: auto;
}
.voice-side-panel {
  border-radius: 18px;
  border: 1px solid rgba(139, 92, 246, 0.18);
  background: rgba(255, 255, 255, 0.02);
  padding: 14px;
}
.voice-side-tag {
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(167, 139, 250, 0.8);
  margin-bottom: 6px;
}
.voice-side-panel h2 {
  margin: 0 0 8px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.35rem;
  color: #f0d78c;
}
.voice-info-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.voice-info-row {
  display: flex;
  gap: 8px;
  font-size: 0.64rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.45;
}
.voice-info-row b { color: #d4af37; }

.voice-voice-pick { margin-bottom: 4px; }
.voice-pick-label {
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(212, 175, 55, 0.55);
  margin: 0 0 6px;
}
.voice-pick-label + .voice-preset-grid { margin-bottom: 12px; }
.voice-preset-grid {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.voice-pair-btn {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.62rem;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  line-height: 1.4;
  width: 100%;
  transition: border-color 0.2s, background 0.2s;
}
.voice-pair-btn.is-active {
  border-color: rgba(212, 175, 55, 0.45);
  background: rgba(212, 175, 55, 0.1);
  color: #f0d78c;
}
.voice-pair-ico { font-size: 1.1rem; flex-shrink: 0; }
.voice-pair-grid { gap: 6px; }
.voice-quality-badge {
  margin: 8px 0 0;
  font-size: 0.54rem;
  font-weight: 600;
  color: rgba(74, 222, 128, 0.9);
  text-align: center;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(74, 222, 128, 0.22);
  background: rgba(74, 222, 128, 0.06);
}

.voice-neural-viz {
  border-radius: 14px;
  border: 1px solid rgba(6, 182, 212, 0.15);
  background: rgba(6, 182, 212, 0.04);
  padding: 10px 12px;
}
.voice-neural-viz-head {
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(34, 211, 238, 0.7);
  margin-bottom: 6px;
}
.voice-neural-log {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 100px;
  overflow-y: auto;
}
.voice-log-line {
  font-size: 0.56rem;
  color: rgba(255, 255, 255, 0.5);
  font-family: 'Consolas', monospace;
}

.voice-intent-box {
  margin-top: 4px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(139, 92, 246, 0.2);
  background: rgba(139, 92, 246, 0.06);
}
.voice-intent-box span {
  font-size: 0.48rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(167, 139, 250, 0.7);
  text-transform: uppercase;
}
.voice-intent-box strong {
  display: block;
  font-size: 0.72rem;
  color: #e9d5ff;
  margin-top: 4px;
}

.voice-mute-btn {
  width: 100%;
  margin-top: 8px;
  padding: 9px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.64rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.voice-mute-btn.is-muted { border-color: rgba(239, 68, 68, 0.3); color: #fca5a5; }

/* Sector picker + footer */
.voice-sector-wrap {
  flex-shrink: 0;
  margin-top: 10px;
}
.voice-sector-label {
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(167, 139, 250, 0.55);
  margin: 0 0 6px;
  text-align: center;
}
.voice-sector-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
  max-height: 72px;
  overflow-y: auto;
  padding-bottom: 2px;
}
.voice-sector-chip {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(139, 92, 246, 0.2);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(233, 213, 255, 0.8);
  font-size: 0.58rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.voice-sector-chip.is-active {
  border-color: rgba(212, 175, 55, 0.45);
  background: rgba(212, 175, 55, 0.1);
  color: #f0d78c;
}

.voice-show-footer {
  flex-shrink: 0;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.voice-tour-strip {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.voice-tour-progress {
  display: flex;
  align-items: center;
  gap: 10px;
}
.voice-tour-track {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.voice-tour-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #7c3aed, #d4af37);
  transition: width 0.4s ease;
}
.voice-tour-num { font-size: 0.54rem; font-weight: 700; color: #d4af37; white-space: nowrap; }
.voice-tour-caption {
  margin: 0;
  font-size: 0.6rem;
  color: rgba(233, 213, 255, 0.8);
  text-align: center;
}
.voice-tour-controls {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.voice-tour-btn {
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid rgba(139, 92, 246, 0.25);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(233, 213, 255, 0.85);
  font-size: 0.6rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.voice-show-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(139, 92, 246, 0.12));
  color: #f0d78c;
  font-size: 0.68rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.04em;
  cursor: pointer;
  font-family: inherit;
  transition: box-shadow 0.2s;
}
.voice-show-cta:hover { box-shadow: 0 6px 28px rgba(212, 175, 55, 0.2); }

body.voice-showcase-open,
html.voice-showcase-open { overflow: hidden !important; }

/* ── Mobile ── */
@media (max-width: 768px) {
  .voice-showcase,
  .voice-showcase * { box-sizing: border-box; }
  .voice-show-inner {
    padding: max(4px, env(safe-area-inset-top)) 10px max(6px, env(safe-area-inset-bottom));
    height: 100%;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }
  .voice-show-header {
    margin-bottom: 6px;
    padding: 6px 10px;
  }
  .voice-show-brand { font-size: 0.72rem; }
  .voice-show-layout {
    grid-template-columns: 1fr;
    gap: 0;
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }
  .voice-side { display: none; }
  .voice-device-frame {
    border-radius: 16px;
    border-width: 1px;
  }
  .voice-call-screen { padding: 10px; }
  .voice-dual-avatars { gap: 4px; padding: 4px 0; }
  .voice-avatar-card { max-width: none; padding: 8px 6px; }
  .voice-avatar-photo { width: 42px; height: 42px; font-size: 1rem; }
  .voice-avatar-meta strong { font-size: 0.62rem; }
  .voice-bridge-icon { font-size: 0.7rem; }
  .voice-wave-dual { max-width: 100%; gap: 10px; }
  .voice-transcript { min-height: 80px; }
  .voice-sector-wrap { margin-top: 6px; }
  .voice-sector-picker { max-height: 56px; }
  .voice-show-footer { margin-top: 4px; }
  .voice-mobile-voice {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 4px 0;
    scrollbar-width: none;
  }
  .voice-mobile-voice::-webkit-scrollbar { display: none; }
  .voice-mobile-voice .voice-pair-btn {
    flex-shrink: 0;
    width: auto;
    min-width: 140px;
    padding: 8px 10px;
    font-size: 0.52rem;
  }
}

.voice-mobile-voice-row { display: none; }
@media (max-width: 768px) {
  .voice-mobile-voice-row { display: block; flex-shrink: 0; }
  .voice-mobile-voice-label {
    font-size: 0.46rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: rgba(212, 175, 55, 0.5);
    margin: 0 0 3px;
    text-transform: uppercase;
  }
}

@media (min-width: 769px) {
  .voice-mobile-voice-row { display: none !important; }
}
