/* ============================================
   Voice Demo Modal Styles
   ============================================ */

/* ============================================
   Try Demo Section
   ============================================ */
.section-label-green {
  background: var(--green-100);
  color: var(--green-700);
}

.try-demo-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}

.try-demo-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 48px;
  text-align: center;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-100);
}

.try-demo-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--accent-500) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.try-demo-icon svg {
  width: 40px;
  height: 40px;
  color: var(--white);
}

.try-demo-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 12px;
}

.try-demo-description {
  font-size: 16px;
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: 32px;
}

.try-demo-note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--gray-500);
}

/* Voice Demo Interface (Modal) */
.voice-demo-interface {
  padding: 24px;
  text-align: center;
}

.voice-avatars {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 48px;
  margin-bottom: 24px;
}

.voice-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  transition: all 0.3s ease;
}

.voice-avatar-agent {
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-700) 100%);
  color: var(--white);
}

.voice-avatar-user {
  background: var(--gray-100);
  color: var(--gray-500);
  border: 2px solid var(--gray-200);
}

.voice-avatar-user svg {
  width: 32px;
  height: 32px;
}

.voice-avatar.speaking {
  box-shadow: 0 0 0 4px var(--primary-200), 0 0 0 8px var(--primary-100);
  animation: speaking-pulse 1s ease infinite;
}

.voice-controls {
  margin-top: 24px;
}

.voice-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.voice-btn .icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.btn-danger {
  background: var(--red-500);
  color: var(--white);
}

.btn-danger:hover {
  background: var(--red-600);
}

/* Demo waveform bars */
.demo-wave-bar {
  width: 3px;
  height: 20px;
  background: var(--gray-300);
  border-radius: 2px;
  transition: background 0.3s ease;
}

.demo-waveform.active .demo-wave-bar {
  background: var(--primary-500);
  animation: wave 1s ease-in-out infinite;
}

.demo-wave-bar:nth-child(1) { animation-delay: 0s; }
.demo-wave-bar:nth-child(2) { animation-delay: 0.1s; }
.demo-wave-bar:nth-child(3) { animation-delay: 0.2s; }
.demo-wave-bar:nth-child(4) { animation-delay: 0.3s; }
.demo-wave-bar:nth-child(5) { animation-delay: 0.4s; }
.demo-wave-bar:nth-child(6) { animation-delay: 0.5s; }
.demo-wave-bar:nth-child(7) { animation-delay: 0.6s; }
.demo-wave-bar:nth-child(8) { animation-delay: 0.7s; }
.demo-wave-bar:nth-child(9) { animation-delay: 0.8s; }
.demo-wave-bar:nth-child(10) { animation-delay: 0.9s; }
.demo-wave-bar:nth-child(11) { animation-delay: 1s; }
.demo-wave-bar:nth-child(12) { animation-delay: 1.1s; }

@keyframes wave {
  0%, 100% { height: 20px; }
  50% { height: 40px; }
}

/* Modal header updated */
.voice-modal-header {
  padding: 24px;
  text-align: center;
  border-bottom: 1px solid var(--gray-100);
}

.voice-modal-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.voice-modal-header p {
  font-size: 14px;
  color: var(--gray-500);
}

.voice-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--gray-100);
  color: var(--gray-600);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.voice-modal-close:hover {
  background: var(--gray-200);
  color: var(--gray-900);
}

.voice-modal-close svg {
  width: 18px;
  height: 18px;
}

.voice-modal-content {
  position: relative;
}

.voice-modal-footer {
  padding: 16px 24px;
  text-align: center;
  border-top: 1px solid var(--gray-100);
  background: var(--gray-50);
}

.voice-modal-footer p {
  font-size: 12px;
  color: var(--gray-500);
}

/* Demo limit notice */
.demo-limit-notice {
  background: #7f1d1d;
  color: #fecaca;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  text-align: center;
}

/* Demo Section - Updated */
.demo-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-demo {
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--accent-500) 100%);
  color: var(--white);
  font-size: 18px;
  padding: 16px 32px;
  position: relative;
  overflow: hidden;
}

.btn-demo::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  100% { left: 100%; }
}

.btn-demo:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 40px rgba(217, 70, 239, 0.3);
}

.demo-note {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--gray-500);
}

.demo-note strong {
  color: var(--gray-700);
}

/* Modal Overlay */
.voice-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.voice-modal.active {
  opacity: 1;
  visibility: visible;
}

/* Modal Content */
.voice-modal-content {
  background: var(--white);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: var(--shadow-2xl);
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s ease;
}

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

/* Modal Header */
.voice-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-100);
}

.voice-modal-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: 8px;
}

.voice-modal-title .live-badge {
  background: var(--green-500);
  color: var(--white);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.voice-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--gray-100);
  color: var(--gray-600);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.voice-modal-close:hover {
  background: var(--gray-200);
  color: var(--gray-900);
}

.voice-modal-close .icon {
  width: 18px;
  height: 18px;
}

/* Modal Body */
.voice-modal-body {
  padding: 24px;
}

/* Call Interface */
.call-interface {
  text-align: center;
}

/* Avatars */
.call-avatars {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  margin-bottom: 24px;
}

.call-avatar {
  position: relative;
}

.call-avatar-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  transition: all 0.3s ease;
}

.call-avatar-circle.agent {
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-700) 100%);
  color: var(--white);
}

.call-avatar-circle.user {
  background: var(--gray-100);
  color: var(--gray-600);
  border: 2px solid var(--gray-200);
}

.call-avatar.speaking .call-avatar-circle {
  box-shadow: 0 0 0 4px var(--primary-200), 0 0 0 8px var(--primary-100);
  animation: speaking-pulse 1s ease infinite;
}

@keyframes speaking-pulse {
  0%, 100% { box-shadow: 0 0 0 4px var(--primary-200), 0 0 0 8px var(--primary-100); }
  50% { box-shadow: 0 0 0 6px var(--primary-300), 0 0 0 12px var(--primary-100); }
}

.call-avatar-label {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-500);
}

.call-connector {
  width: 60px;
  height: 2px;
  background: var(--gray-200);
  position: relative;
}

.call-connector::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary-400), var(--accent-400));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

.status-connected .call-connector::before {
  transform: scaleX(1);
}

/* Call Status */
.call-status {
  margin-bottom: 24px;
}

.call-status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 500;
  background: var(--gray-100);
  color: var(--gray-600);
}

.call-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gray-400);
}

.status-connecting .call-status-indicator {
  background: var(--primary-50);
  color: var(--primary-700);
}

.status-connecting .call-status-dot {
  background: var(--primary-500);
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.status-connected .call-status-indicator {
  background: var(--green-100);
  color: var(--green-700);
}

.status-connected .call-status-dot {
  background: var(--green-500);
}

.status-ended .call-status-indicator {
  background: var(--gray-100);
  color: var(--gray-600);
}

.status-error .call-status-indicator {
  background: var(--red-50);
  color: var(--red-600);
}

.status-error .call-status-dot {
  background: var(--red-500);
}

.call-duration {
  margin-top: 8px;
  font-size: 24px;
  font-weight: 600;
  color: var(--gray-900);
  font-variant-numeric: tabular-nums;
}

/* Waveform */
.demo-waveform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 48px;
  margin-bottom: 24px;
}

.demo-waveform .wave-bar {
  width: 3px;
  height: 20px;
  background: var(--gray-300);
  border-radius: 2px;
  transition: background 0.3s ease;
}

.demo-waveform.active .wave-bar {
  background: var(--primary-500);
  animation: wave 1s ease-in-out infinite;
}

.demo-waveform .wave-bar:nth-child(1) { animation-delay: 0s; }
.demo-waveform .wave-bar:nth-child(2) { animation-delay: 0.1s; }
.demo-waveform .wave-bar:nth-child(3) { animation-delay: 0.2s; }
.demo-waveform .wave-bar:nth-child(4) { animation-delay: 0.3s; }
.demo-waveform .wave-bar:nth-child(5) { animation-delay: 0.4s; }
.demo-waveform .wave-bar:nth-child(6) { animation-delay: 0.5s; }
.demo-waveform .wave-bar:nth-child(7) { animation-delay: 0.6s; }
.demo-waveform .wave-bar:nth-child(8) { animation-delay: 0.7s; }
.demo-waveform .wave-bar:nth-child(9) { animation-delay: 0.8s; }
.demo-waveform .wave-bar:nth-child(10) { animation-delay: 0.9s; }
.demo-waveform .wave-bar:nth-child(11) { animation-delay: 1s; }
.demo-waveform .wave-bar:nth-child(12) { animation-delay: 1.1s; }

/* Call Actions */
.call-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}

.btn-call {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-call-start {
  background: var(--green-500);
  color: var(--white);
}

.btn-call-start:hover {
  background: var(--green-600);
  transform: scale(1.02);
}

.btn-call-end {
  background: var(--red-500);
  color: var(--white);
}

.btn-call-end:hover {
  background: var(--red-600);
  transform: scale(1.02);
}

.btn-call .icon {
  width: 20px;
  height: 20px;
}

/* Transcript */
.call-transcript-wrapper {
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-100);
  overflow: hidden;
}

.call-transcript-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.call-transcript {
  max-height: 200px;
  overflow-y: auto;
  padding: 16px;
}

.transcript-placeholder {
  text-align: center;
  padding: 40px 20px;
  color: var(--gray-400);
}

.transcript-placeholder p {
  font-size: 14px;
}

.transcript-line {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.transcript-speaker {
  flex-shrink: 0;
  width: 32px;
  height: 24px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.transcript-agent .transcript-speaker {
  background: var(--primary-100);
  color: var(--primary-700);
}

.transcript-user .transcript-speaker {
  background: var(--gray-200);
  color: var(--gray-700);
}

.transcript-text {
  font-size: 14px;
  color: var(--gray-700);
  line-height: 1.5;
}

/* Modal Footer */
.voice-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--gray-100);
  background: var(--gray-50);
}

.modal-footer-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: var(--gray-500);
}

.modal-footer-note .icon {
  width: 14px;
  height: 14px;
  color: var(--green-500);
}

/* Responsive */
@media (max-width: 640px) {
  .voice-modal-content {
    max-height: 100vh;
    height: 100%;
    border-radius: 0;
  }

  .call-avatars {
    gap: 20px;
  }

  .call-avatar-circle {
    width: 64px;
    height: 64px;
    font-size: 20px;
  }

  .call-transcript {
    height: 150px;
  }
}

/* Notification for setup required */
.setup-notice {
  background: linear-gradient(135deg, var(--primary-50) 0%, var(--accent-50) 100%);
  border: 1px solid var(--primary-200);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 24px;
}

.setup-notice-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-700);
  margin-bottom: 4px;
}

.setup-notice-text {
  font-size: 13px;
  color: var(--gray-600);
}
