/* ── CameraCapture modal — shared by Public + Workshop ─────────────
   Relies on each surface's own :root variables (--bg, --surface,
   --border, --text, --text-dim, --accent, --radius, --danger) which
   are already named identically across app/static/public/app.css and
   app/static/workshop/app.css. ── */

.cam-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.72);
  padding: 16px;
}
.cam-modal.open { display: flex; }

.cam-modal-box {
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--bg-2, var(--bg));
  border: 1px solid var(--border);
  border-radius: var(--radius, 12px);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cam-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cam-modal-title {
  font-weight: 600;
  color: var(--text);
  font-size: 15px;
}
.cam-icon-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 6px;
}
.cam-icon-btn:hover { background: var(--surface, rgba(255,255,255,0.06)); color: var(--text); }

.cam-modal-hint {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-faint, var(--text-dim));
}

.cam-video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #000;
  border-radius: var(--radius-sm, 8px);
  overflow: hidden;
}
.cam-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cam-scan-frame {
  position: absolute;
  inset: 14% 10%;
  border: 2px solid var(--accent);
  border-radius: 10px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.28);
  pointer-events: none;
}

.cam-error {
  font-size: 13px;
  color: var(--danger);
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: 8px;
  padding: 8px 10px;
}

.cam-confirm {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface, rgba(255,255,255,0.05));
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
}
.cam-confirm-value {
  font-family: var(--font-mono, monospace);
  font-size: 15px;
  letter-spacing: 0.5px;
  color: var(--text);
  word-break: break-all;
}
.cam-confirm-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.cam-shots {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.cam-shot-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.cam-modal-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.cam-btn-shutter {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--accent);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.cam-btn-shutter:hover { box-shadow: 0 0 0 3px var(--accent-2, var(--accent)); }
.cam-btn-shutter:active { transform: scale(0.94); }
.cam-btn-switch {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: var(--surface-2, rgba(255,255,255,0.08));
  border: 1px solid var(--border-hi, var(--border));
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  white-space: nowrap;
}
.cam-btn-switch:hover { border-color: var(--accent); color: var(--accent-2); }
