/* workspace/starcode2/shell/capture.css */
/* The capture overlay: a full-screen dialog with the camera view on top and
   the photo, typed code and test code panels stacked at the bottom, within
   thumb reach on a phone. */
.cap {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}
.cap-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--tap);
  padding-left: 16px;
  flex: 0 0 auto;
}
.cap-heading {
  font-weight: 600;
}
.cap-close {
  min-height: var(--tap);
  min-width: 80px;
  padding: 0 16px;
  color: var(--accent);
  font-weight: 600;
}
.cap-note {
  padding: 12px 16px;
  color: var(--muted);
  flex: 0 0 auto;
}
.cap-cam {
  position: relative;
  flex: 1 1 auto;
  min-height: 30vh;
  background: #000;
  overflow: hidden;
}
.cap-cam video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cap-frame {
  position: absolute;
  left: 10%;
  right: 10%;
  top: 50%;
  height: 34%;
  transform: translateY(-50%);
  border: 2px solid var(--accent);
  border-radius: 12px;
  pointer-events: none;
}
.cap-status {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  text-align: center;
  font-size: 14px;
  text-shadow: 0 1px 2px #000;
  pointer-events: none;
}
.cap-torch {
  position: absolute;
  top: 8px;
  right: 8px;
  min-height: var(--tap);
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(20, 27, 36, 0.8);
  color: var(--fg);
  font-weight: 600;
}
.cap-panels {
  flex: 0 0 auto;
  max-height: 60dvh;
  overflow-y: auto;
  border-top: 1px solid var(--line);
}
.cap-cam[hidden] ~ .cap-panels {
  flex: 1 1 auto;
  max-height: none;
}
.cap-panel {
  border-bottom: 1px solid var(--line);
}
.cap-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 16px;
  font-weight: 600;
  user-select: none;
}
.cap-summary::-webkit-details-marker {
  display: none;
}
.cap-summary::after {
  content: "+";
  margin-left: auto;
  color: var(--muted);
  font-size: 20px;
}
.cap-panel[open] > .cap-summary::after {
  content: "-";
}
.cap-panel-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 16px 16px;
}
.cap-row {
  display: flex;
  gap: 10px;
}
.cap-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0 18px;
  border-radius: var(--radius);
  background: var(--bg3);
  color: var(--fg);
  font-weight: 600;
  cursor: pointer;
  flex: 1 1 auto;
}
.cap-btn:disabled {
  opacity: 0.6;
}
.cap-btn-accent {
  background: var(--accent);
  color: var(--accent-ink);
}
.cap-file {
  position: relative;
}
.cap-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}
.cap-text {
  flex: 1 1 auto;
  min-width: 0;
  min-height: var(--tap);
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg2);
}
.cap-canvas {
  align-self: center;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  background: #fff;
}
.cap-digits {
  text-align: center;
  color: var(--muted);
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
}
.cap-msg {
  color: var(--warn);
}
