/* ═══════════════════════════════════════════════════════════════
   see-to-speak-live.css — live-camera overlay UI
   ───────────────────────────────────────────────────────────────
   Companion to js/see-to-speak/live-camera.js. Sits ABOVE the
   See-to-Speak overlay (z:300) and below the Settings modal (z:200)?
   No — the live camera is launched FROM the SeeToSpeak overlay,
   so it needs to sit above it. Setting z:350 so it covers the
   parent overlay but stays below toast/alerts (~10000) and the
   page nav (10001).
   ═══════════════════════════════════════════════════════════════ */

.live-cam-overlay {
  position: fixed;
  inset: 0;
  z-index: 350;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-sans);
  color: #fff;
}
.live-cam-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.86);
  backdrop-filter: blur(4px);
}
.live-cam-stage {
  position: relative;
  width: min(96vw, 720px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: #0c0a10;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

/* ── Video pane with overlaid I-See chips + thinking dots ─────── */
.live-cam-video-wrap {
  position: relative;
  width: 100%;
  background: #000;
  aspect-ratio: 4 / 3;
}
.live-cam-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.live-cam-isee {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  pointer-events: none;        /* let parent receive clicks unless chip is direct target */
}
.live-cam-isee-chip {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  max-width: 45%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.live-cam-isee-chip:hover,
.live-cam-isee-chip:focus-visible {
  background: rgba(232, 163, 61, 0.32);
  border-color: rgba(232, 163, 61, 0.7);
  outline: none;
}
.live-cam-isee-emoji { font-size: 0.95rem; line-height: 1; }
.live-cam-isee-label { font-size: 0.78rem; }

/* ── "Thinking" indicator over the video while Gemini works ──── */
.live-cam-thinking-dot {
  position: absolute;
  bottom: 12px;
  right: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(232, 163, 61, 0.85);
  color: #18121b;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 2px;
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}
.live-cam-thinking .live-cam-thinking-dot { opacity: 1; }

/* ── Action tiles grid (6 first-person suggestions) ──────────── */
.live-cam-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 10px 12px 6px;
  background: #100c14;
}
.live-cam-action-tile {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  min-height: 48px;
  line-height: 1.22;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s, border-color 0.12s, transform 0.12s;
}
.live-cam-action-tile:hover,
.live-cam-action-tile:focus-visible {
  background: rgba(232, 163, 61, 0.12);
  border-color: rgba(232, 163, 61, 0.55);
  outline: none;
  transform: translateY(-1px);
}
.live-cam-action-tile:active { transform: translateY(0); }
.live-cam-action-emoji { font-size: 1.35rem; flex-shrink: 0; line-height: 1; }
.live-cam-action-text  { flex: 1; }
.live-cam-action-ai    { border-color: rgba(168, 132, 255, 0.45); background: rgba(168, 132, 255, 0.08); }
.live-cam-action-ai:hover,
.live-cam-action-ai:focus-visible { border-color: rgba(168, 132, 255, 0.85); background: rgba(168, 132, 255, 0.16); }

/* ── Status line (scene description / errors) ───────────────── */
.live-cam-status {
  padding: 4px 14px 6px;
  background: #100c14;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  min-height: 1.1em;
  text-align: center;
  line-height: 1.4;
}

/* ── Bottom bar (Read now / Close) ──────────────────────────── */
.live-cam-bar {
  display: flex;
  gap: 8px;
  padding: 10px 12px calc(env(safe-area-inset-bottom, 0px) + 12px);
  background: #0a080d;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.live-cam-btn {
  flex: 1;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: #fff;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}
.live-cam-btn:hover,
.live-cam-btn:focus-visible {
  border-color: var(--amber);
  color: var(--amber);
  outline: none;
}
.live-cam-btn-primary {
  background: var(--amber);
  border-color: var(--amber);
  color: #1a1a1a;
}
.live-cam-btn-primary:hover,
.live-cam-btn-primary:focus-visible { filter: brightness(1.08); color: #000; }

/* Phones — single-column action grid + wider video */
@media (max-width: 520px) {
  .live-cam-stage { width: 100vw; max-height: 100vh; border-radius: 0; }
  .live-cam-actions { grid-template-columns: 1fr; }
}
