/* ============================================================
   DripBack Voice-Demo-Widget — "So klingt JEFF"
   Waveform + Antwortzeit + paralleles Transkript.
   Audio: lokale Piper-TTS-Clips (de_DE-thorsten-high), kein Autoplay.
   Token-System: tokens.css (--t-accent, --dur-tap/-pop, True-Grey).
   Nested-Radius-Regel: outer = inner + padding (16 = 10 + 6 … 12 = 8 + 4).
   ============================================================ */

.voice-demo {
  padding: clamp(48px, 7vw, 88px) 0;
  border-top: 1px solid var(--line, rgba(255,255,255,0.08));
}
.voice-demo .wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}
.vd-eyebrow {
  font-family: var(--font-mono, 'Geist Mono', ui-monospace, monospace);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--t-accent, #3D7BFF);
  margin-bottom: 14px;
}
.voice-demo h2 {
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.12;
  margin: 0 0 10px;
  color: var(--t-ink, #F5F5F7);
}
.vd-sub {
  max-width: 620px;
  color: rgba(245,245,247,0.72);
  margin: 0 0 28px;
}

/* Szenario-Pills */
.vd-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.vd-pill {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 13px;
  padding: 8px 16px;
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);
  color: rgba(245,245,247,0.78);
  cursor: pointer;
  transition: background var(--dur-tap, 150ms), border-color var(--dur-tap, 150ms),
              color var(--dur-tap, 150ms), transform var(--dur-tap, 150ms);
}
.vd-pill:hover { background: rgba(61,123,255,0.12); border-color: rgba(61,123,255,0.4); transform: translateY(-1px); }
.vd-pill[aria-pressed="true"] {
  background: rgba(61,123,255,0.16);
  border-color: var(--t-accent, #3D7BFF);
  color: #FFFFFF;
}

/* Panel: Player links, Transkript rechts */
.vd-panel {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(61,123,255,0.22);
  border-radius: 16px;
  background: rgba(10,10,11,0.85);
}
.vd-player, .vd-transcript {
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
}
.vd-player { padding: 20px; display: flex; flex-direction: column; gap: 16px; }

.vd-play {
  display: inline-flex; align-items: center; gap: 10px;
  align-self: flex-start;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 14px; font-weight: 500;
  padding: 12px 22px; min-height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(61,123,255,0.5);
  background: rgba(37,99,235,0.18);
  color: #FFFFFF;
  cursor: pointer;
  transition: background var(--dur-tap, 150ms), transform var(--dur-tap, 150ms),
              box-shadow var(--dur-tap, 150ms);
}
.vd-play:hover { background: rgba(37,99,235,0.3); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(43,111,255,0.25); }
.vd-play:active { transform: translateY(0); }
.vd-play .vd-play-ico { width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent currentColor; }
.vd-play[data-state="playing"] .vd-play-ico { border: none; width: 10px; height: 12px; border-left: 3.5px solid currentColor; border-right: 3.5px solid currentColor; }

.vd-wave {
  width: 100%; height: 56px; display: block;
  border-radius: 8px;
  background: rgba(0,0,0,0.35);
}

/* Status-Zeile: Schritt + Antwortzeit */
.vd-status {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 12px;
  color: rgba(245,245,247,0.6);
  min-height: 18px;
}
.vd-step { letter-spacing: 0.08em; text-transform: uppercase; }
.vd-latency { font-variant-numeric: tabular-nums; color: rgba(245,245,247,0.6); transition: color var(--dur-tap, 150ms); }
.vd-latency[data-hot="1"] { color: var(--t-accent, #3D7BFF); }
.vd-latency b { color: #22C55E; font-weight: 600; }

/* Transkript */
.vd-transcript {
  padding: 16px 18px;
  min-height: 260px; max-height: 340px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px;
  scroll-behavior: smooth;
}
.vd-line {
  max-width: 88%;
  padding: 9px 13px;
  border-radius: 10px;
  font-size: 14.5px; line-height: 1.5;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--dur-pop, 250ms) ease, transform var(--dur-pop, 250ms) ease;
}
.vd-line.in { opacity: 1; transform: translateY(0); }
.vd-line-caller {
  align-self: flex-end;
  background: rgba(255,255,255,0.06);
  color: rgba(245,245,247,0.85);
  border: 1px solid rgba(255,255,255,0.07);
}
.vd-line-jeff {
  align-self: flex-start;
  background: rgba(37,99,235,0.14);
  border: 1px solid rgba(61,123,255,0.28);
  color: #F5F5F7;
}
.vd-line-jeff[data-speaking="1"] { border-color: var(--t-accent, #3D7BFF); box-shadow: 0 0 0 1px rgba(61,123,255,0.35); }
.vd-line .vd-who {
  display: block;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(245,245,247,0.5);
  margin-bottom: 3px;
}
.vd-line-jeff .vd-who { color: var(--t-accent, #3D7BFF); }

.vd-note {
  margin-top: 12px;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px; letter-spacing: 0.06em;
  color: rgba(245,245,247,0.55);
}

/* Hero-/Panel-Trigger — Sekundär-CTA neben hero-cta */
.voice-trigger {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 15px; font-weight: 500;
  padding: 14px 26px; min-height: 44px;
  margin-left: 14px;
  border-radius: 10px;
  border: 1px solid rgba(61,123,255,0.45);
  background: transparent;
  color: var(--t-accent, #3D7BFF);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur-tap, 150ms), transform var(--dur-tap, 150ms),
              box-shadow var(--dur-tap, 150ms);
}
.voice-trigger:hover { background: rgba(61,123,255,0.1); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(43,111,255,0.18); }
.voice-trigger .vt-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #22C55E; box-shadow: 0 0 8px #22C55E;
  animation: vtPulse 1.6s ease-in-out infinite;
}
@keyframes vtPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
.chapter .voice-trigger { margin: 14px 0 0; }

@media (max-width: 860px) {
  .vd-panel { grid-template-columns: 1fr; }
  .vd-transcript { min-height: 200px; max-height: 280px; }
}
@media (max-width: 560px) {
  .voice-trigger { margin-left: 0; margin-top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .vd-pill, .vd-play, .voice-trigger, .vd-line { transition: none; }
  .vd-pill:hover, .vd-play:hover, .voice-trigger:hover { transform: none; }
  .voice-trigger .vt-dot { animation: none; }
  .vd-transcript { scroll-behavior: auto; }
}
