/* Live KYC camera: native video stays full-size (no transform — that blacks out
   mobile video). A canvas copy is shown on top once it actually has pixels. */

.vc-cap__stage video.vc-cap__video,
.vc-cap__stage canvas.vc-cap__live-canvas {
  max-width: 100% !important;
  max-height: 100% !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 100%;
  object-fit: cover !important;
  transform: none !important;
  -webkit-transform: none !important;
}

/* Every device sees the same screen-sized camera picture. The video element stays
   underneath as the stream source, because some phones draw it black. */
.vc-cap--live-stream.vc-cap--pixels-live .vc-cap__live-canvas,
.vc-cap--live-stream.vc-cap--pixels-live[data-vc-cap="idFront"] .vc-cap__live-canvas,
.vc-cap--live-stream.vc-cap--pixels-live[data-vc-cap="idBack"] .vc-cap__live-canvas {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 3 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  pointer-events: none;
  background: #000;
}

.vc-cap--live-stream .vc-cap__stage {
  aspect-ratio: auto;
  height: min(62dvh, 560px);
  min-height: 220px;
  max-height: min(62dvh, 560px);
  overflow: hidden;
  contain: paint;
  isolation: isolate;
}

@media (orientation: landscape) {
  .vc-cap--live-stream .vc-cap__stage {
    height: min(70dvh, 420px);
    min-height: 160px;
    max-height: min(74dvh, 460px);
  }
}

.vc-cap--live-stream .vc-cap__video {
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  opacity: 1 !important;
  visibility: visible !important;
  z-index: 2 !important;
  background: transparent !important;
  pointer-events: none;
}

.vc-cap--live-stream:not(.vc-cap--pixels-live) .vc-cap__live-canvas {
  display: none !important;
}

.vc-cap--pixels-live .vc-cap__live-canvas {
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 3 !important;
  background: transparent;
  pointer-events: none;
}

.vc-cap--live-stream .vc-cap__overlay {
  z-index: 4;
  background: transparent;
}

.vc-cap--live-stream.vc-cap--canvas-live .vc-cap__video {
  opacity: 1 !important;
  visibility: visible !important;
  width: 100% !important;
  height: 100% !important;
}

/* Review and saved photo sit above the camera. Live-stream rules must not keep a black video on top. */
.vc-cap--review .vc-cap__video,
.vc-cap--review .vc-cap__live-canvas,
.vc-cap--review .vc-cap__live-mirror,
.vc-cap--review .vc-cap__overlay,
.vc-cap--done .vc-cap__video,
.vc-cap--done .vc-cap__live-canvas,
.vc-cap--done .vc-cap__live-mirror,
.vc-cap--done .vc-cap__overlay {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  z-index: 0 !important;
}

.vc-cap--review .vc-cap__preview-img,
.vc-cap--done .vc-cap__preview-img {
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  opacity: 1 !important;
  visibility: visible !important;
  z-index: 6 !important;
  object-fit: contain !important;
  background: #111318;
}
