
/* Phase B — voice orb + conversations */
.voice-orb-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  gap: 14px; padding-bottom: 7vh; background: #050409;
}
/* Full-page visualizer: the canvas fills the overlay (particle field across the
   whole screen, orb sphere centered); the text/controls sit above it. */
.orb-canvas { position: absolute; inset: 0; z-index: 0; cursor: pointer; }
.voice-orb-overlay > .orb-status,
.voice-orb-overlay > .orb-caption,
.voice-orb-overlay > .orb-reply,
.voice-orb-overlay > .orb-controls { position: relative; z-index: 1; }
.orb-status { color: #fff; font-family: 'Geist Mono', monospace; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.8; }
.orb-caption { color: #fff; font-size: 18px; max-width: 620px; text-align: center; line-height: 1.5; padding: 0 24px; min-height: 1px; }
.orb-reply { color: oklch(80% 0.05 250); font-size: 15px; max-width: 620px; text-align: center; line-height: 1.55; padding: 0 24px; }
.orb-controls { display: flex; gap: 12px; margin-top: 8px; }
/* Talk-to-agent: the live conversation renders as frosted bubbles stacked
   on the right side, transparent (just the bubbles over the orb field). */
.orb-bubbles {
  position: absolute; z-index: 2;
  top: 6vh; bottom: 15vh; right: 4vw;
  width: min(440px, 46vw);
  display: flex; flex-direction: column; gap: 10px;
  overflow-y: auto; padding: 4px;
}
.orb-bubbles .conv-bubble.ea {
  background: rgba(255,255,255,0.12);
  color: #eef0f3; border-color: rgba(255,255,255,0.18);
}
.orb-btn { background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; padding: 7px 16px; cursor: pointer; font-size: 12px; }
.orb-btn:hover { background: rgba(255,255,255,.16); }
/* Rich assistant bubble (AARO-2 cards/markdown reused from the chat dock): let
   the cards and prose read directly over the dark field, no frosted panel. The
   result cards bring their own themed surface, so they stay readable on dark. */
.orb-bubbles .conv-bubble.ea.rich { background: transparent; border: none; padding: 0; max-width: 100%; }
.orb-bubbles .conv-bubble.ea.rich .md { color: #eef0f3; }
.orb-bubbles .conv-bubble.ea.rich .md a { color: #9ccbff; }
/* "Anything else?" panel inside the orb overlay (Yes reopens the mic, No ends). */
.orb-anything-else { position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; }
.orb-anything-else .oae-label { color: #fff; font-size: 13px; opacity: .85; }
.orb-anything-else .oae-yes { background: var(--accent); border-color: transparent; }
.orb-anything-else .oae-yes:hover { filter: brightness(1.08); background: var(--accent); }
/* Global field-dictation orb: the WebGL voice visualizer on a transparent
   background (no disc, no backdrop, just the orb sphere), large so it reads,
   hovering near the focused field. */
.field-orb {
  position: fixed; z-index: 200;
  width: 140px; height: 140px;
  border: none; padding: 0; cursor: pointer;
  background: transparent;
  transition: transform .12s var(--ease);
}
.field-orb:hover { transform: scale(1.06); }
.field-orb.busy { opacity: .55; }
/* "Speak or type?" prompt above the chat bar */
.chat-voice-prompt {
  display: flex; align-items: center; gap: 8px; z-index: 200;
  background: var(--paper-1); border: 1px solid var(--line); border-radius: 999px;
  box-shadow: var(--shadow-md); padding: 6px 8px 6px 14px;
  font-size: 12.5px; white-space: nowrap;
}
.chat-voice-prompt .cvp-label { color: var(--ink-3); }
.chat-voice-prompt button { border: none; border-radius: 999px; padding: 6px 13px; font-size: 12.5px; font-family: inherit; cursor: pointer; }
.chat-voice-prompt .cvp-speak { background: var(--accent); color: #fff; }
.chat-voice-prompt .cvp-speak:hover { filter: brightness(1.06); }
.chat-voice-prompt .cvp-type { background: var(--paper-2); color: var(--ink-1); }
.chat-voice-prompt .cvp-type:hover { background: var(--paper-3); }
.conv-list { background: var(--paper-1); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-sm); }
.conv-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; border-top: 1px solid var(--line); cursor: pointer; transition: background .12s var(--ease); }
.conv-row:first-child { border-top: none; }
.conv-row:hover { background: var(--paper-2); }
.conv-main { min-width: 0; }
.conv-title { font-size: 14px; color: var(--ink-0); font-weight: 500; }
.conv-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60ch; }
.conv-meta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; font-family: 'Geist Mono', monospace; font-size: 10.5px; color: var(--ink-3); }
.conv-meta .sep { opacity: 0.5; }
.conv-thread { display: flex; flex-direction: column; gap: 10px; }
.conv-bubble { font-size: 14px; line-height: 1.45; padding: 10px 14px; border-radius: 18px; max-width: 84%; white-space: pre-wrap; word-wrap: break-word; }
.conv-bubble.me {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--accent), color-mix(in oklab, var(--accent) 78%, #000));
  color: #fff; border-bottom-right-radius: 6px;
  box-shadow: 0 6px 18px color-mix(in oklab, var(--accent) 27%, transparent);
}
.conv-bubble.ea {
  align-self: flex-start;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  color: var(--ink-1); border: 1px solid oklch(86% 0.010 70 / 0.55);
  border-bottom-left-radius: 6px;
}
body[data-theme="night"] .conv-bubble.ea { background: rgba(255,255,255,0.12); color: var(--paper-1); border-color: rgba(255,255,255,0.18); }

/* Mobile: the Conversations view overlays the voice-orb animation. */
#convOrbBackdrop { display: none; }
@media (max-width: 900px) {
  #convOrbBackdrop { display: block; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.45; }
  #page-conversations { position: relative; z-index: 1; }
}
@media (prefers-reduced-motion: reduce) { #convOrbBackdrop { display: none !important; } }
