/* Voice Agent Styles */
.voice-agent-container {
  position: relative;
  width: calc(100%);
  background: var(--corporate-dark);
  border-radius: 16px;
  padding: 40px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  box-sizing: border-box;
 
  backdrop-filter: blur(10px);
  
}

.voice-agent-animation {
  position: relative;
  width: 220px;
  height: 220px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
}

/* Hintergrundkreis */
.voice-agent-circle::before {
  content: '';
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--corporate-orange) 3%, transparent);
  box-shadow: 
    inset 0 0 30px color-mix(in srgb, var(--corporate-orange) 5%, transparent),
    0 0 35px color-mix(in srgb, var(--corporate-orange) 5%, transparent);
  z-index: 1;
}

/* Grundzustand - ausgegraut */
.voice-agent-circle {
  position: absolute;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: rgba(128, 128, 128, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.5s ease;
  box-shadow: 
    inset 0 0 20px rgba(0, 0, 0, 0.2),
    0 0 25px rgba(0, 0, 0, 0.1);
}

.voice-agent-icon {
  color: rgba(128, 128, 128, 0.5);
  font-size: 42px;
  z-index: 2;
  transition: all 0.5s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Pulsierende Ringe - standardmäßig unsichtbar */
.voice-agent-ring {
  position: absolute;
  border: 1px solid var(--corporate-orange);
  border-opacity: 0.3;
  border-radius: 50%;
  opacity: 0;
  transition: all 0.5s ease;
  display: none;
  box-shadow: 0 0 10px var(--corporate-orange);
  box-shadow-opacity: 0.1;
}

.voice-agent-ring:nth-child(1) {
  width: 110px;
  height: 110px;
}

.voice-agent-ring:nth-child(2) {
  width: 140px;
  height: 140px;
}

.voice-agent-ring:nth-child(3) {
  width: 170px;
  height: 170px;
}

/* Verbundener Zustand - Orange Farbe */
.voice-agent-container.listening .voice-agent-circle::before {
  background: linear-gradient(145deg, 
    color-mix(in srgb, var(--corporate-orange) 3%, transparent) 0%, 
    color-mix(in srgb, var(--corporate-orange) 3%, transparent) 100%
  );
  box-shadow: 
    inset 0 0 30px color-mix(in srgb, var(--corporate-orange) 5%, transparent),
    0 0 35px color-mix(in srgb, var(--corporate-orange) 5%, transparent);
}

.voice-agent-container.listening .voice-agent-circle {
  background: linear-gradient(145deg, color-mix(in srgb, var(--corporate-orange) 8%, transparent) 0%, color-mix(in srgb, var(--corporate-orange) 8%, transparent) 100%);
  box-shadow: 
    inset 0 0 20px color-mix(in srgb, var(--corporate-orange) 10%, transparent),
    0 0 25px color-mix(in srgb, var(--corporate-orange) 10%, transparent);
}

.voice-agent-container.listening .voice-agent-icon {
  color: var(--corporate-orange);
  opacity: 0.9;
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--corporate-orange) 30%, transparent));
}

/* Sprechender Zustand mit verbesserter Animation */
.voice-agent-container.speaking .voice-agent-ring {
  display: block;
  animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite; /* Langsamere Animation */
}

.voice-agent-container.speaking .voice-agent-ring:nth-child(1) {
  animation-delay: 0s;
}

.voice-agent-container.speaking .voice-agent-ring:nth-child(2) {
  animation-delay: 0.6s; /* Längere Verzögerung */
}

.voice-agent-container.speaking .voice-agent-ring:nth-child(3) {
  animation-delay: 1.2s; /* Längere Verzögerung */
}

.voice-agent-container.speaking .voice-agent-circle::before {
  background: color-mix(in srgb, var(--corporate-orange) 5%, transparent);
  box-shadow: 
    inset 0 0 40px color-mix(in srgb, var(--corporate-orange) 8%, transparent),
    0 0 45px color-mix(in srgb, var(--corporate-orange) 8%, transparent);
}

.voice-agent-container.speaking .voice-agent-circle {
  background: color-mix(in srgb, var(--corporate-orange) 12%, transparent);
}

@keyframes pulse {
  0% {
    transform: scale(0.98);
    opacity: 0;
  }
  50% {
    opacity: 0.25;
    box-shadow: 0 0 15px var(--corporate-orange);
    box-shadow-opacity: 0.2;
  }
  100% {
    transform: scale(1.08);
    opacity: 0;
  }
}

/* Status Container Styles */
.status-container {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 10px 0;
  width: 100%;
  max-width: 500px;
}

.status,
.speaking-status {
  padding: 10px 24px;
  border-radius: 30px;
  font-size: 14px;
  min-width: 170px;
  text-align: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
}

.status {
  background: linear-gradient(145deg, #ff4444 0%, #ff6b6b 100%);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.status.connected {
  background: linear-gradient(145deg, #00C851 0%, #00E676 100%);
}

.speaking-status {
  background: color-mix(in srgb, var(--corporate-orange) 30%, transparent);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}

.speaking-status.speaking {
  background: linear-gradient(145deg, color-mix(in srgb, var(--corporate-orange) 90%, transparent) 0%, color-mix(in srgb, var(--corporate-orange) 90%, transparent) 100%);
  color: var(--corporate-dark);
  border: 1px solid var(--corporate-orange);
  border-opacity: 0.3;
}

/* Muted Status Style */
.speaking-status.muted {
  background: rgba(128, 128, 128, 0.3);
  color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(128, 128, 128, 0.5);
}

/* Controls Styles */
.voice-agent-container .controls {
  display: flex;
  justify-content: center;
  gap: 20px;
  width: 100%;
  max-width: 500px;
  margin-top: 10px;
}

.voice-agent-container .control-button {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  min-width: 220px;
  justify-content: center;
  background: white;
  border: 1px solid var(--corporate-orange);
  color: var(--corporate-orange);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Mute Button Spezifische Styles */
.voice-agent-container .control-button.mute-button {
  min-width: 60px !important;
  padding: 14px !important;
  position: relative;
  gap: 0 !important;
}

.voice-agent-container .control-button.mute-button i {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  margin: 0 !important;
  line-height: 1;
}

/* Verstecke den leeren span im Mute Button */
.voice-agent-container .control-button.mute-button .button-text {
  display: none !important;
}

/* Muted State */
.voice-agent-container .control-button.mute-button.muted {
  background: rgba(128, 128, 128, 0.1);
  border-color: rgba(128, 128, 128, 0.5);
  color: rgba(128, 128, 128, 0.8);
}

.voice-agent-container .control-button.mute-button.muted i {
  color: rgba(128, 128, 128, 0.8);
}

/* Mute Button Pulse Animation when muted */
.voice-agent-container .control-button.mute-button.muted::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: rgba(128, 128, 128, 0.3);
  border-radius: 4px;
  animation: mutePulse 2s ease-in-out infinite;
  z-index: -1;
}

@keyframes mutePulse {
  0%, 100% {
    opacity: 0;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.05);
  }
}

.voice-agent-container .control-button i {
  font-size: 18px;
  color: var(--corporate-orange);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.voice-agent-container .control-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Mobile Anpassungen */
@media (max-width: 768px) {
  .voice-agent-container {
    padding: 30px 20px;
    gap: 20px;
  }

  .voice-agent-animation {
    width: 180px;
    height: 180px;
    margin: 10px 0;
  }

  .voice-agent-circle {
    width: 90px;
    height: 90px;
  }

  .voice-agent-icon {
    font-size: 36px;
  }

  .voice-agent-ring:nth-child(1) {
    width: 90px;
    height: 90px;
  }

  .voice-agent-ring:nth-child(2) {
    width: 120px;
    height: 120px;
  }

  .voice-agent-ring:nth-child(3) {
    width: 150px;
    height: 150px;
  }

  .status-container {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .status,
  .speaking-status {
    padding: 8px 20px;
    min-width: 170px;
    font-size: 13px;
  }

  .voice-agent-container .controls {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .voice-agent-container .control-button {
    width: 100%;
    max-width: 280px;
    padding: 12px 24px;
  }
  
  .voice-agent-container .control-button.mute-button {
    width: auto;
    min-width: 55px;
    max-width: 55px;
    padding: 12px 16px;
    gap: 0 !important;
  }
  
  .voice-agent-container .control-button.mute-button .button-text {
    display: none !important;
  }

  .voice-agent-circle::before {
    width: 130px;
    height: 130px;
  }
}

/* Hover-Effekte nur für Desktop-Geräte */
@media (hover: hover) and (pointer: fine) {
  .voice-agent-container .control-button:hover:not(:disabled) {
    background: color-mix(in srgb, var(--corporate-orange) 30%, transparent);
    color: white;
  }
  
  /* Stelle sicher, dass auch das Icon im Button weiß wird */
  .voice-agent-container .control-button:hover:not(:disabled) i {
    color: white;
  }
  
  /* Mute Button Hover bleibt grau wenn muted */
  .voice-agent-container .control-button.mute-button.muted:hover {
    background: rgba(128, 128, 128, 0.2);
    color: rgba(128, 128, 128, 0.9);
  }
  
  .voice-agent-container .control-button.mute-button.muted:hover i {
    color: rgba(128, 128, 128, 0.9);
  }
}

/* Touch-Geräte (iOS) */
@media (hover: none) and (pointer: coarse) {
  .voice-agent-container .control-button {
    -webkit-appearance: none;
    background: white !important;
    border: 1px solid var(--corporate-orange) !important;
  }
  
  .voice-agent-container .control-button:hover:not(:disabled),
  .voice-agent-container .control-button:active:not(:disabled),
  .voice-agent-container .control-button:focus:not(:disabled) {
    background: white !important;
    color: var(--corporate-orange) !important;
  }
}

.voice-agent-questions {
  margin-top: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 20px;
  height: calc((10px + 10px + 1px) * 8);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--corporate-orange) rgba(255, 170, 58, 0.1);
}

.voice-agent-info {
  color: rgba(0, 0, 0, 0.9);
  line-height: 1.6;
}

.voice-agent-info h3 {
  color: var(--corporate-orange);
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 18px;
}

.voice-agent-info p {
  margin-bottom: 15px;
}

.voice-agent-info p:last-child {
  margin-bottom: 0;
}

.voice-agent-info strong {
  color: var(--corporate-orange);
  display: inline-block;
  margin-bottom: 8px;
}

/* Mobile Anpassungen */
@media (max-width: 768px) {
  .voice-agent-questions {
    margin-top: 15px;
    padding: 15px;
    height: auto;
    min-height: 300px;
  }

  .voice-agent-info {
    font-size: 14px;
  }

  .voice-agent-info h3 {
    font-size: 16px;
    margin-bottom: 12px;
  }

  .voice-agent-info p {
    margin-bottom: 12px;
  }
}