.webcame-recognition {
  position: relative;
  text-align: center;
  width: 500px;
  display: inline-block;
  vertical-align: baseline;
  overflow: hidden;
}

.webcame-recognition .video-recognition {
  position: relative;
}

.webcame-recognition .vidDisplay {
  position: relative;
  width: 100%;
  height: auto;
  display: inline-block;
  vertical-align: baseline;
  border-radius: 15px;
  transform: scaleX(-1);
  min-height: 350px;
}

.webcame-recognition canvas#overlay {
  width: 100%;
}

.webcame-recognition .overlay-recognition {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 240px;
  height: 300px;
  border: 5px double;
  border-color: #FFFFFF;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 18px;
  pointer-events: none;
  border-radius: 20px;
  opacity: 0.8;
}

.webcame-recognition .overlay-recognition.error {
  border-color: #ff0052;
}

.webcame-recognition .overlay-recognition.success {
  border-color: #4BD763;
}

.webcame-recognition .overlay-recognition .result-label {
  width: 90%;
  padding: 3px 2px;
  background-color: #ffffff;
  position: absolute;
  top: -0px;
  border-radius: 0px 0px 10px 10px;
  text-align: center;
  font-size: 13px;
  line-height: 20px;
  color: #111111;
  opacity: 0.7;
}

.webcame-recognition .overlay-recognition .result-label.error {
  background-color: #ff0052;
  color: #ffffff;
}

.webcame-recognition .overlay-recognition .result-label.success {
  background-color: #ffffff;
  color: #111111;
}

.webcame-recognition .overlay-recognition .result-label-top {
  width: 90%;
  padding: 3px 2px;
  position: absolute;
  top: 10px;
  text-align: center;
  font-size: 14px;
  line-height: 20px;
  color: #ffffff;
}

/* Garis scan */
.scan-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(to right, rgba(0, 255, 0, 0), rgba(255, 255, 255, 0.842), rgba(0, 255, 0, 0));
  animation: scan 2s linear infinite;
}

/* Animasi scan bergerak dari atas ke bawah */
@keyframes scan {
  0% {
    top: 0;
  }

  50% {
    top: calc(100% - 4px);
  }

  100% {
    top: 0;
  }
}

.resume-capture-face-api {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 120px;
  height: 130px;
  border-radius: 10px;
  overflow: hidden;
  border: solid 3px #eeeeee;
  display: none;
  box-shadow: 16px 14px 20px #0000008c;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.resume-capture-face-api::before {
  content: "";
  background-image: conic-gradient(#ff0052 20deg,
      transparent 120deg);
  width: 160%;
  height: 160%;
  position: absolute;
  animation: rotate 2s linear infinite;
  opacity: 0.4;
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(-360deg);
  }
}

.resume-capture-face-api img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/** Webcame Biasa */
.webcam-app {
  width: 600px;
  height: auto;
  text-align: center;
  display: inline-block;
}

.body-webcame {
  position: relative;
  text-align: center;
  display: inline-block;
  border-radius: 10px;
  overflow: hidden;
  width: 100%;
}


#webcam {
  display: block;
  position: relative;
  width: 100%;
  height: auto;
  z-index: 0;
  margin: auto;
}


#canvas {
  position: absolute;
  left: 0px;
  top: 0px;
  width: 100%;
  -webkit-backface-visibility: hidden;
  -moz-backface-visibility: hidden;
  border-radius: 10px;
  z-index: 0 !important;
}


.Controls-camera {
  position: relative;
}

.Controls-camera button {
  margin-right: 5px;
  border-radius: 30px;
  font-size: 15px;
  width: 45%;
}

.flash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #fff;
  z-index: 999999;
}

.datetime-overlay {
  position: absolute;
  width: auto;
  z-index: 9;
  border-radius: 5px;
  overflow: hidden;
  background: #ffffff;
  padding: 3px 3px;
  line-height: 20px;
  font-size: 12px;
}

.datetime-overlay.date {
  top: 10px;
  left: 8px;
  text-align: left;
}

.datetime-overlay.time {
  top: 10px;
  right: 8px;
  text-align: right;
}

#map-overlay {
  position: absolute;
  bottom: -40px;
  left: 50%;
  width: 95%;
  height: 100px;
  z-index: 2;
  border-radius: 8px;
  overflow: hidden;
  opacity: 0.5;
  transform: translate(-50%, -50%);
}

.shift-overlay {
  position: absolute;
  top: 10px;
  right: 8px;
  width: 130px;
  height: 80px;
  z-index: 999999;
  border-radius: 8px;
  overflow: hidden;
  background: #000000;
  background-color: rgba(0, 0, 0, 0.42);
  padding: 3px;
}

.shift-overlay ul {
  margin: 0;
  padding: 0px;
}

.shift-overlay ul li {
  text-align: left;
  list-style: none;
  padding: 0px;
  margin: 0px;
  color: #ffffff;
  font-size: 14px;
  line-height: 17px;
}

.camera-flash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
}

.camera-flash.active {
  animation: flash 0.3s ease-in-out;
}

@keyframes flash {
  0% {
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}


@media screen and (max-width: 480px) {
  .wallet-card-custom {
    padding: 0px;
    position: absolute;
    right: 0px;
    width: 100%;
  }

  .form-control.webcam-start {
    width: 300px;
  }

  /** Webcame Recongnition */
  .webcame-recognition {
    position: relative;
    width: 100% !important;
    height: 100%;
  }

  .webcame-recognition .video-recognition {
    position: relative;
    width: 100%;
    height: 355px;
  }


  .webcame-recognition .overlay-recognition {
    width: 250px;
    height: 300px;
    top: 53%;
    border: 5px double;
    border-radius: 20px;
    opacity: 0.8;
    margin: auto;
    border-color: #FFFFFF;
  }

  .webcame-recognition .vidDisplay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    object-fit: cover;
    /* atau contain, tergantung kebutuhan */
    background-color: black;
    /* fallback */
  }


  .resume-capture-face-api {
    top: 5px;
    right: 5px;
    width: 60px;
    height: 70px;
  }

  /* Webcame*/
  #webcam {
    width: 100%;
    object-fit: cover;
    z-index: 0;
    min-height: 380px;
  }
}