/* voice-mode.css — full-screen ChatGPT-style voice conversation. */

.vm-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: none;
  flex-direction: column;
  background: radial-gradient(120% 90% at 50% 8%, #0a2033 0%, #050d16 55%, #02060b 100%);
  color: #e6f7ff;
  font-family: var(--font-hud, system-ui, -apple-system, 'Segoe UI', sans-serif);
  overflow: hidden;
}
.vm-overlay.vm-open { display: flex; animation: vm-in 260ms ease-out; }
@keyframes vm-in { from { opacity: 0; transform: scale(0.985); } to { opacity: 1; transform: none; } }

/* soft breathing aura behind everything */
.vm-aura {
  position: absolute; left: 50%; bottom: -18vh; width: 120vw; height: 90vh;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(0, 240, 255, 0.16), rgba(0, 120, 200, 0.06) 55%, transparent 75%);
  filter: blur(28px);
  pointer-events: none;
  animation: vm-breathe 7s ease-in-out infinite;
}
@keyframes vm-breathe {
  0%, 100% { opacity: 0.55; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.06); }
}

.vm-head {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; gap: 12px;
  border-bottom: 1px solid rgba(0, 240, 255, 0.12);
  backdrop-filter: blur(8px);
}
.vm-title { display: flex; align-items: center; gap: 12px; font-size: 12px; letter-spacing: 0.22em; color: #9fd8ea; }
.vm-engine {
  font-size: 10px; letter-spacing: 0.06em; color: rgba(140, 190, 210, 0.75);
  border: 1px solid rgba(0, 240, 255, 0.22); border-radius: 20px; padding: 2px 9px;
  text-transform: none;
}
.vm-head-right { display: flex; align-items: center; gap: 8px; }

.vm-chip, .vm-close {
  font: inherit; font-size: 11px; cursor: pointer;
  background: rgba(255, 255, 255, 0.04); color: #bfe9ff;
  border: 1px solid rgba(0, 240, 255, 0.25); border-radius: 20px;
  padding: 5px 12px; transition: background 0.15s, border-color 0.15s;
}
.vm-chip:hover, .vm-close:hover { background: rgba(0, 240, 255, 0.14); border-color: rgba(0, 240, 255, 0.55); }
.vm-chip:focus-visible, .vm-close:focus-visible, .vm-mic:focus-visible {
  outline: 2px solid #00f0ff; outline-offset: 3px;
}
.vm-close { width: 34px; height: 34px; padding: 0; font-size: 14px; }

/* conversation */
.vm-body {
  position: relative; z-index: 2;
  flex: 1; overflow-y: auto; padding: 26px clamp(18px, 8vw, 140px) 10px;
  display: flex; flex-direction: column; gap: 14px;
  scroll-behavior: smooth;
  transition: opacity 0.3s;
}
.vm-body.vm-dim { opacity: 0.55; }

.vm-msg { max-width: 760px; animation: vm-rise 240ms ease-out; }
@keyframes vm-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.vm-msg-label {
  font-size: 9.5px; letter-spacing: 0.18em; color: rgba(130, 180, 200, 0.8);
  margin-bottom: 5px;
}
.vm-msg-text { font-size: 17px; line-height: 1.62; }
.vm-user { align-self: flex-end; text-align: right; }
.vm-user .vm-msg-text { color: #b9e8ff; }
.vm-assistant .vm-msg-text { color: #f0fbff; }

.vm-meta {
  font-size: 10.5px; color: rgba(140, 180, 200, 0.65);
  border-left: 2px solid rgba(0, 240, 255, 0.25); padding-left: 9px;
  max-width: 760px;
}
.vm-mono { font-variant-numeric: tabular-nums; }

/* the words being spoken right now */
.vm-you {
  position: relative; z-index: 2;
  min-height: 30px; padding: 0 clamp(18px, 8vw, 140px);
  font-size: 15px; color: #7fd8f5; font-style: italic;
  text-align: center;
}

/* mic + waveform */
.vm-foot {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 6px 24px 26px;
}
.vm-ring { position: relative; width: 220px; height: 220px; display: grid; place-items: center; }
#vm-wave { position: absolute; inset: 0; pointer-events: none; }

.vm-mic {
  position: relative; z-index: 2;
  width: 92px; height: 92px; border-radius: 50%;
  border: 1.5px solid rgba(0, 240, 255, 0.55);
  background: radial-gradient(circle at 50% 35%, rgba(0, 240, 255, 0.28), rgba(0, 90, 130, 0.35));
  color: #eafcff; font-size: 30px; cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 0 34px rgba(0, 240, 255, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: transform 0.16s, box-shadow 0.2s, background 0.2s;
}
.vm-mic:hover { transform: scale(1.04); }
.vm-mic-live {
  background: radial-gradient(circle at 50% 35%, rgba(255, 80, 80, 0.35), rgba(140, 20, 20, 0.45));
  border-color: rgba(255, 120, 120, 0.8);
  box-shadow: 0 0 44px rgba(255, 80, 80, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  animation: vm-pulse 1.5s ease-in-out infinite;
}
@keyframes vm-pulse {
  0%, 100% { box-shadow: 0 0 34px rgba(255, 80, 80, 0.35); }
  50% { box-shadow: 0 0 60px rgba(255, 80, 80, 0.6); }
}
.vm-mic-think { border-color: rgba(168, 85, 247, 0.7); box-shadow: 0 0 40px rgba(168, 85, 247, 0.4); }
.vm-mic-speak { border-color: rgba(16, 185, 129, 0.75); box-shadow: 0 0 40px rgba(16, 185, 129, 0.4); }

.vm-hint { font-size: 12px; color: rgba(150, 195, 215, 0.8); min-height: 18px; text-align: center; }

.vm-type {
  display: flex; gap: 8px; width: min(560px, 82vw);
}
.vm-type input {
  flex: 1; font: inherit; font-size: 13px;
  background: rgba(255, 255, 255, 0.045); color: #eafcff;
  border: 1px solid rgba(0, 240, 255, 0.2); border-radius: 22px;
  padding: 11px 18px;
}
.vm-type input:focus { outline: none; border-color: rgba(0, 240, 255, 0.6); background: rgba(0, 240, 255, 0.07); }
.vm-type button {
  font: inherit; font-size: 12px; cursor: pointer;
  background: rgba(0, 240, 255, 0.16); color: #d9f6ff;
  border: 1px solid rgba(0, 240, 255, 0.4); border-radius: 22px; padding: 0 20px;
}
.vm-type button:hover { background: rgba(0, 240, 255, 0.28); }

@media (max-width: 640px) {
  .vm-msg-text { font-size: 15.5px; }
  .vm-ring { width: 180px; height: 180px; }
  #vm-wave { width: 180px; height: 180px; }
  .vm-mic { width: 78px; height: 78px; font-size: 26px; }
  .vm-body { padding: 18px 18px 6px; }
  .vm-you { padding: 0 18px; }
}
