/* ─────────────────────────────────────────────────────────────────
   css/camera-vision.css — Phase 3.10 (Batch A · Worker C1)
   Modal styles for the Camera Vision client (getUserMedia + 3-intent
   dispatch). Namespace: `.camviz-*`. Matches the existing builder
   visual language (brand-blue CTAs, --bg-elev surface, --border).
   PROTOTYPE label — visual polish lives at the same tier as the JS.
   ───────────────────────────────────────────────────────────────── */

.camviz-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2100;
  background: rgba(12, 21, 48, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overscroll-behavior: contain;
}

.camviz-card {
  background: var(--surface, var(--bg-elev, #fff));
  border: 1px solid var(--border, #E5DDD0);
  border-radius: var(--radius-lg, 18px);
  box-shadow: var(--shadow-xl, 0 16px 50px rgba(26, 26, 46, 0.18));
  width: min(640px, 100%);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  color: var(--ink, #1A1A2E);
  font-family: 'DM Sans', sans-serif;
  overflow: hidden;
}

.camviz-header {
  position: relative;
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--border-light, #EDE8E0);
}

.camviz-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.camviz-subtitle {
  font-size: 0.85rem;
  color: var(--ink-soft, #4A4A5A);
  margin: 0;
}

.camviz-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  background: transparent;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--ink, #1A1A2E);
  cursor: pointer;
}

.camviz-close:hover { background: rgba(0, 0, 0, 0.06); }
.camviz-close:focus-visible { outline: 2px solid var(--brand, #2563eb); outline-offset: 2px; }

.camviz-stage {
  position: relative;
  background: #000;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.camviz-video, .camviz-still {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.camviz-canvas { display: none; }

.camviz-snapbar {
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: center;
  border-top: 1px solid var(--border-light, #EDE8E0);
}

.camviz-snap {
  font-size: 1rem;
  font-weight: 600;
  padding: 0.75rem 2rem;
  min-height: 44px;
  min-width: 44px;
  border-radius: 999px;
  border: none;
  background: var(--brand, #2563eb);
  color: #fff;
  cursor: pointer;
}

.camviz-snap:hover { background: var(--brand-dark, #1d4ed8); }
.camviz-snap:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.camviz-intentbar {
  padding: 0.75rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  border-top: 1px solid var(--border-light, #EDE8E0);
}

.camviz-intent, .camviz-retake {
  flex: 1 1 30%;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.65rem 0.9rem;
  min-height: 44px;
  border-radius: var(--radius-md, 10px);
  border: 1px solid var(--border, #E5DDD0);
  background: var(--bg, #FAF7F2);
  color: var(--ink, #1A1A2E);
  cursor: pointer;
  text-align: center;
}

.camviz-intent:hover, .camviz-retake:hover {
  background: var(--bg-elev, #fff);
  border-color: var(--brand, #2563eb);
}

.camviz-intent:focus-visible, .camviz-retake:focus-visible {
  outline: 2px solid var(--brand, #2563eb);
  outline-offset: 2px;
}

.camviz-retake {
  flex: 0 0 auto;
  background: transparent;
}

.camviz-result {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-light, #EDE8E0);
  max-height: 32vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.camviz-result-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}

.camviz-result-text { font-size: 0.95rem; margin: 0; line-height: 1.4; }
.camviz-result-meta { font-size: 0.8rem; color: var(--ink-soft, #4A4A5A); margin: 0; }

.camviz-result-tiles {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.25rem 1rem;
}

.camviz-result-tile { font-size: 0.85rem; }

.camviz-result-action {
  align-self: flex-start;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.55rem 1.1rem;
  min-height: 44px;
  border-radius: var(--radius-md, 10px);
  border: none;
  background: var(--brand, #2563eb);
  color: #fff;
  cursor: pointer;
}

.camviz-result-action:hover { background: var(--brand-dark, #1d4ed8); }
.camviz-result-action:focus-visible {
  outline: 2px solid var(--brand, #2563eb);
  outline-offset: 2px;
}

@media (max-width: 480px) {
  .camviz-card { width: 100%; max-height: 96vh; }
  .camviz-intent { flex: 1 1 100%; }
}
