@import url('/tools/zt/eng/device/workbench.css');

.camera-result { display: grid; gap: 10px; padding: 12px; }
#tool :is(.device-actions, #device-error, #camera-stage) button { min-width: 44px; min-height: 44px; }
#tool #device-input { font-size: 16px; min-height: 44px; }
#camera-options summary { min-height: 44px; align-content: center; cursor: pointer; }
#camera-options .zt-hint { flex-basis: 100%; }
#camera-stage {
  display: grid;
  position: relative;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 360px;
  overflow: hidden;
  border: 1px solid var(--ws-line-strong);
  border-radius: var(--r-sm);
  background: var(--ws-ink);
  color: var(--ws);
}
#camera-video { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.camera-mirrored { transform: scaleX(-1); }
#camera-exit { display: none; }
#camera-stage:fullscreen, #camera-stage.zt-full-window {
  width: 100%;
  height: 100%;
  max-height: none;
  border: 0;
  border-radius: 0;
}
#camera-stage.zt-full-window { position: fixed; inset: 0; z-index: 100; }
#camera-stage:fullscreen #camera-exit, #camera-stage.zt-full-window #camera-exit {
  display: inline-flex;
  position: absolute;
  top: 16px;
  right: 16px;
  border-color: var(--ws);
}

.camera-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#camera-status { font-weight: 600; }

.camera-actions:not(:has(button:not([hidden]))) { display: none; }
#tool.device-active > .zt-do,
#tool.device-active .device-permission { display: none; }

@media (max-width: 620px) {
  #tool.device-active .device-workbench { gap: 8px; }
  #tool.device-active .camera-result { padding: 0; border: 0; }
  #camera-stage:not(:fullscreen, .zt-full-window) { max-height: 28dvh; }
}
