/* Tharvik - voicebar.css (2026-11-03): the message bar while the mic is on (pairs with js/voicebar.js). Same idea as Claude / ChatGPT dictation:
   "Listening…" in the box, a live waveform, the mic lit in the brand gold. Everything is scoped to #inputRow.voice-on. */

/* order, left to right, as in Claude / ChatGPT: + , the words (or "Listening…"), the waveform, the mic, send. The mic used to sit left of the words. */
#inputRow #photoBtn{ order:0; }
#inputRow #msgInput{ order:1; }
#inputRow .voice-wave{ order:2; }
#inputRow #micBtn{ order:3; }
#inputRow #sendBtn{ order:4; }

.voice-wave{ display:none; align-items:center; justify-content:center; gap:3px; height:26px; flex-shrink:0; padding:0 6px; }
.voice-wave i{
  display:block; width:2.5px; height:22px; border-radius:2px; background:var(--gold);
  transform:scaleY(.14); transform-origin:center; will-change:transform; opacity:.9;
}
.voice-wave i:nth-child(odd){ opacity:.65; }

#inputRow.voice-on{ border-color:var(--accent-line); }
#inputRow.voice-on .voice-wave{ display:flex; animation:vbIn .22s ease-out; }
#inputRow.voice-on #msgInput::placeholder{ color:var(--text); font-style:italic; font-weight:500; opacity:.78; }
#inputRow.voice-on #photoBtn{ opacity:.45; }

/* the mic: lit with a soft gold disc and ring (it was a pulsing red button) - tap it to stop */
#inputRow.voice-on #micBtn.listening{
  background:var(--accent-tint); color:var(--gold); animation:none;
  box-shadow:inset 0 0 0 1.5px var(--accent-line);
}
#inputRow.voice-on #micBtn.listening svg{ animation:vbMic 1.6s ease-in-out infinite; }

@keyframes vbIn{ from{ opacity:0; transform:translateX(6px); } to{ opacity:1; transform:none; } }
@keyframes vbMic{ 0%,100%{ transform:scale(1); } 50%{ transform:scale(1.12); } }

/* a narrow phone: fewer bars, so the words still have room */
@media (max-width:400px){
  .voice-wave{ gap:2.5px; padding:0 3px; }
  .voice-wave i{ width:2.5px; }
  .voice-wave i:nth-child(-n+2), .voice-wave i:nth-last-child(-n+2){ display:none; }
}
@media (max-width:350px){
  .voice-wave i:nth-child(-n+4), .voice-wave i:nth-last-child(-n+4){ display:none; }
}
@media (prefers-reduced-motion: reduce){
  #inputRow.voice-on .voice-wave, #inputRow.voice-on #micBtn.listening svg{ animation:none; }
}
