/* Voice call screen (js/call/voice-screen.js mounts into #screen-call-voice).
 * Layout per the terracotta mockup: chevron-down top-left, concentric rings
 * (108 dim / 90 accent / 72 disc) wrapped by the sphere canvas, name 22px,
 * tabular timer, state caption, live captions, 50px round control row. */

#screen-call-voice {
  align-items: stretch;
  justify-content: center;
}

.vc-root {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* ── Top bar ─────────────────────────────────────────────────────────── */

.vc-top {
  flex-shrink: 0;
  display: flex;
  padding: max(10px, env(safe-area-inset-top)) 12px 0;
}
.vc-back {
  color: var(--text-2);
}
.vc-back .icon {
  font-size: 20px;
}

/* ── Center stage ────────────────────────────────────────────────────── */

.vc-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 0;
  padding: 0 24px;
}

.vc-sphere-wrap {
  position: relative;
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.vc-sphere {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.vc-ring-outer {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  border: 2px solid var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative; /* above the sphere canvas */
}
.vc-ring-inner {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}
.vc-disc {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent-disc);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 400;
}

/* State accents on the ring stack */
.vc-root.state-ai-speaking .vc-ring-inner {
  transform: scale(1.04);
}
.vc-root.state-reconnecting .vc-sphere-wrap,
.vc-root.state-queued .vc-sphere-wrap {
  opacity: 0.65;
}
.vc-root.state-thinking .vc-ring-inner {
  animation: vc-think 1.6s ease-in-out infinite;
}
@keyframes vc-think {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.97);
  }
}

/* ── Identity + status ───────────────────────────────────────────────── */

.vc-name {
  font-size: 22px;
  color: var(--text-1);
  font-weight: 400;
}
.vc-timer {
  font-size: 13px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
.vc-caption {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 2px;
  min-height: 18px;
  text-align: center;
}
.vc-note {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 10px;
  text-align: center;
  max-width: 300px;
  line-height: 1.5;
}

/* Live captions: one quiet line each, no wrapping jitter. */
.vc-captions {
  margin-top: 14px;
  min-height: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: min(100%, 420px);
}
.vc-cap-user,
.vc-cap-nova {
  font-size: 12px;
  color: var(--text-2);
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vc-cap-user:empty,
.vc-cap-nova:empty {
  display: none;
}
.vc-cap-user {
  color: var(--text-3);
}
.vc-cap-nova {
  color: var(--text-2);
}

/* ── Push-to-talk (degraded VAD) ─────────────────────────────────────── */

.vc-ptt {
  align-self: center;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  margin-bottom: 14px;
  border-radius: 22px;
  border: var(--hairline-w) solid var(--hairline);
  background: var(--bubble-in);
  color: var(--text-1);
  font-size: 13px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.vc-ptt .icon {
  font-size: 17px;
}
.vc-ptt.held {
  background: var(--accent);
  color: var(--on-accent);
}

/* ── Control row ─────────────────────────────────────────────────────── */

.vc-controls {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  gap: 14px;
  padding: 0 12px calc(26px + env(safe-area-inset-bottom));
}
.vc-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--bubble-in);
  color: var(--text-1);
  display: flex;
  align-items: center;
  justify-content: center;
}
.vc-btn .icon {
  font-size: 21px;
}
.vc-btn.vc-mute.active {
  background: var(--accent);
  color: var(--on-accent);
}
.vc-btn.vc-hangup {
  background: var(--danger);
  color: #fff;
}

/* ── Pre-join ────────────────────────────────────────────────────────── */

.vc-join {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 30px;
  border-radius: 25px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 15px;
  font-weight: 600;
}
.vc-join .icon {
  font-size: 19px;
}
