/* ==========================================================
   speech.css — Spracheingabe-Overlay
   ========================================================== */

.speech-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 12, 8, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 150;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.speech-overlay.show { display: flex; }

.speech-card {
  background: #FFFFFF;
  border-radius: var(--radius-card);
  padding: 36px 28px 24px;
  width: 100%;
  max-width: 360px;
  text-align: center;
  color: var(--color-text);
}

.mic-circle {
  width: 110px;
  height: 110px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--color-narzisse);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background 0.2s;
}

.mic-circle::before,
.mic-circle::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--color-narzisse);
  opacity: 0;
}

.speech-overlay[data-state="listening"] .mic-circle {
  background: #C84545;
}
.speech-overlay[data-state="listening"] .mic-circle::before {
  animation: mic-pulse 1.6s ease-out infinite;
}
.speech-overlay[data-state="listening"] .mic-circle::after {
  animation: mic-pulse 1.6s ease-out 0.5s infinite;
  border-color: #C84545;
}

.speech-overlay[data-state="processing"] .mic-circle {
  background: #6B6B6B;
}

@keyframes mic-pulse {
  0%   { opacity: 0.6; transform: scale(1); }
  100% { opacity: 0;   transform: scale(1.6); }
}

.mic-circle svg {
  width: 44px;
  height: 44px;
  color: #FFFFFF;
}

.speech-status {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 8px;
}

.speech-hint {
  font-size: 14px;
  line-height: 1.45;
  color: rgba(42, 24, 16, 0.65);
  margin-bottom: 20px;
  min-height: 21px;
}

.speech-transcript {
  background: #F5EFE6;
  border-radius: var(--radius-msg, 12px);
  padding: 14px 16px;
  min-height: 60px;
  text-align: left;
  font-size: 15px;
  line-height: 1.5;
  color: var(--color-text);
  margin-bottom: 18px;
  display: none;
}
.speech-transcript.show { display: block; }
.speech-transcript .interim { color: rgba(42, 24, 16, 0.4); }

.speech-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.speech-btn {
  flex: 1;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 500;
  border: none;
  border-radius: var(--radius-pill);
  transition: background 0.15s, transform 0.1s;
}
.speech-btn:active { transform: scale(0.97); }

.speech-btn.cancel {
  background: #EFE5D5;
  color: var(--color-text);
}
.speech-btn.cancel:active { background: #E5D9C4; }

.speech-btn.primary {
  background: var(--color-narzisse);
  color: var(--color-white);
}
.speech-btn.primary:active { background: var(--color-narzisse-2); }
.speech-btn.primary:disabled {
  background: #BBBBBB;
  cursor: not-allowed;
}
