/* Dashboard voice panel — live conversation with Marcus. */

#voice-live {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 24px;
  background: rgba(28, 24, 20, .28);
  backdrop-filter: blur(2px);
}
#voice-live[hidden] { display: none; }

.vl-panel {
  width: min(100%, 440px);
  max-height: min(72vh, 560px);
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  border: 1px solid rgba(28, 24, 20, .1);
  background: #FBFAF7;
  box-shadow: 0 24px 70px rgba(28, 24, 20, .28);
  overflow: hidden;
}

.vl-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(28, 24, 20, .08);
}

.vl-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #C4BDB2;
  flex: none;
}
.vl-dot.connected { background: #3F7A4E; }

.vl-status {
  font-size: 13.5px;
  font-weight: 600;
  color: #4A443C;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vl-close {
  flex: none;
  border: 0;
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: #A34A3C;
  cursor: pointer;
}
.vl-close:hover { background: #8F3E31; }

/* Voice-mode call surface: orb + one live caption, no chat log. */
.vl-call {
  flex: 1;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: 24px 20px;
}

.vl-orb {
  --vl-mic: 0;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .8);
  border: 1px solid rgba(28, 24, 20, .1);
  box-shadow:
    0 18px 44px rgba(28, 24, 20, .12),
    0 0 0 calc(14px * var(--vl-mic)) rgba(63, 122, 78, .13);
  transition: box-shadow .1s linear;
}
.vl-orb-core {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: #2E2A24;
}
.vl-orb-core i {
  width: 4px;
  border-radius: 2px;
  background: #FBFAF7;
  transform: scaleY(.35);
  opacity: .55;
  transition: transform .25s ease, opacity .25s ease;
}
.vl-orb-core i:nth-child(1) { height: 14px; }
.vl-orb-core i:nth-child(2) { height: 26px; }
.vl-orb-core i:nth-child(3) { height: 20px; }
.vl-orb-core i:nth-child(4) { height: 30px; }
.vl-orb-core i:nth-child(5) { height: 12px; }
.vl-orb.speaking .vl-orb-core i {
  animation: vl-eq .9s ease-in-out infinite alternate;
  transform: none;
  opacity: 1;
}
.vl-orb.speaking .vl-orb-core i:nth-child(2) { animation-delay: -.2s; }
.vl-orb.speaking .vl-orb-core i:nth-child(3) { animation-delay: -.5s; }
.vl-orb.speaking .vl-orb-core i:nth-child(4) { animation-delay: -.35s; }
.vl-orb.speaking .vl-orb-core i:nth-child(5) { animation-delay: -.6s; }
@keyframes vl-eq {
  from { transform: scaleY(.4); }
  to { transform: scaleY(1.1); }
}

.vl-caption {
  min-height: 72px;
  width: 100%;
  text-align: center;
}
.vl-caption-speaker {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #8A8276;
}
.vl-caption-text {
  margin: 8px 0 0;
  font-size: 15.5px;
  line-height: 1.5;
  color: #2E2A24;
}

/* AI-bar entry point */
.ai-bar-voice {
  margin-left: auto;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(28, 24, 20, .14);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #2E2A24;
  background: rgba(255, 255, 255, .7);
  cursor: pointer;
  transition: background .15s ease;
}
.ai-bar-voice:hover { background: #fff; }
.ai-bar-voice svg { width: 15px; height: 15px; }

@media (max-width: 640px) {
  #voice-live { padding: 10px; align-items: flex-end; justify-content: center; }
  .vl-panel { width: 100%; max-height: 70vh; }
}
