
/* PORTAL_021R2_SIGNATURE_CAMERA_UX */

.video-container {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  overflow: hidden !important;
  background: #05070a !important;
}

.video-container video {
  width: 100% !important;
  height: 100% !important;
  min-width: 100% !important;
  min-height: 100% !important;
  object-fit: cover !important;
  background: #05070a !important;
  transform: scaleX(-1) !important;
  -webkit-transform: scaleX(-1) !important;
}

.video-container .center-box {
  position: absolute !important;
  top: 45% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: min(75vw, 340px) !important;
  height: auto !important;
  aspect-ratio: 3 / 4 !important;
  border: 3px solid rgba(255,255,255,.92) !important;
  border-radius: 50% !important;
  box-sizing: border-box !important;
  z-index: 12 !important;
  box-shadow: 0 0 0 9999px rgba(0,0,0,.28) !important;
  pointer-events: none !important;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease !important;
}

.video-container .center-box.face-detected:not(.face-valid) {
  border-color: #f4c95d !important;
  box-shadow:
    0 0 0 9999px rgba(0,0,0,.30),
    0 0 0 2px rgba(244,201,93,.18) !important;
}

.video-container .center-box.face-valid {
  border-color: #39d98a !important;
  box-shadow:
    0 0 0 9999px rgba(0,0,0,.28),
    0 0 0 2px rgba(57,217,138,.22),
    0 0 30px rgba(57,217,138,.20) !important;
}

.video-container .center-box.countdown-active {
  border-width: 4px !important;
}

/* Selfie is automatic, exactly like Signature V3. */
.video-container .button-container {
  display: none !important;
}

/* DNI: same fullscreen camera language, rectangular ID-1 guide. */
app-scanning-document .video-container video {
  transform: none !important;
  -webkit-transform: none !important;
}

app-scanning-document .video-container .overlay {
  display: none !important;
}

app-scanning-document .video-container .center-box {
  top: 44% !important;
  width: min(88vw, 620px) !important;
  height: auto !important;
  aspect-ratio: 1.586 / 1 !important;
  border-radius: 18px !important;
  border: 3px solid rgba(255,255,255,.94) !important;
  box-shadow: 0 0 0 9999px rgba(0,0,0,.30) !important;
}

app-scanning-document .video-container .button-container {
  display: flex !important;
  position: absolute !important;
  left: 50% !important;
  bottom: max(42px, calc(env(safe-area-inset-bottom, 0px) + 18px)) !important;
  transform: translateX(-50%) !important;
  width: 100% !important;
  z-index: 30 !important;
  align-items: center !important;
  justify-content: center !important;
}

app-scanning-document ion-button.portal-document-camera-button {
  width: 104px !important;
  height: 104px !important;
  min-width: 104px !important;
  min-height: 104px !important;
  --border-radius: 52px !important;
  --padding-start: 0 !important;
  --padding-end: 0 !important;
  --padding-top: 0 !important;
  --padding-bottom: 0 !important;
}

app-scanning-document .portal-document-camera-icon {
  width: 46px !important;
  height: 46px !important;
  font-size: 46px !important;
}

/* Signature V3 biometric state UI. */

#portal021r2-ui {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  pointer-events: none;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.portal021r2-state {
  position: absolute;
  left: 50%;
  bottom: max(126px, 16vh);
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(10,14,20,.62);
  color: rgba(255,255,255,.92);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.portal021r2-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.65);
}

.portal021r2-state.detected .portal021r2-dot {
  background: #f4c95d;
}

.portal021r2-state.valid .portal021r2-dot {
  background: #39d98a;
  box-shadow: 0 0 0 4px rgba(57,217,138,.13);
}

.portal021r2-countdown {
  position: absolute;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
  display: none;
  align-items: center;
  justify-content: center;
  width: 94px;
  height: 94px;
  border-radius: 50%;
  background: rgba(0,0,0,.42);
  color: #fff;
  font-size: 58px;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 2px 12px rgba(0,0,0,.55);
}

.portal021r2-hint {
  position: absolute;
  left: 50%;
  bottom: max(70px, 9vh);
  transform: translateX(-50%);
  width: min(86vw, 380px);
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(0,0,0,.58);
  color: #fff;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.portal021r2-hint.valid {
  background: rgba(13,112,58,.78);
}
