.qrscanner-toolbar {
  position: fixed;
  right: 0;
  z-index: 5;
  top: env(safe-area-inset-top, 0);
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
}

.qrscanner-toolbar.is-hmt {
  right: 21pt;
  top: 21pt;
}

.qrscanner-button {
  background: rgba(var(--color-alpha-grey));
  padding: 0 !important;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  margin: 8px !important;
  box-sizing: border-box;
  border-radius: var(--default-radius-large);
  overflow: visible;
}

.qrscanner-button.is-vuzix {
  border: 2px solid transparent;
}

.qrscanner-button.is-vuzix:focus {
  border: 2px solid rgba(var(--vuzix-focus-color));
}

.qrscanner-button span {
  color: rgba(255, 255, 255, 1);
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%, 0);
  text-shadow: 0 0 4px rgba(0, 0, 0, 1);
}

.qrscanner-button md-icon {
  color: rgba(var(--font-color-invert));
  fill: rgba(var(--font-color-invert));
}

.scanner-wrapper,
.qrscanner-wrapper,
.nfc-scanner-wrapper {
  width: 100vw;
  height: 100%;
  display: flex;
  flex: 1;
  justify-content: center;
  align-items: center;
}

.scanner-wrapper {
  flex-direction: column;
  position: relative;
}

.nfc-scanner-wrapper {
  flex-direction: column;
  color: rgba(var(--font-color));
}

.nfc-scanner-wrapper .nfc-icon {
  width: 42%;
  height: 42%;
  color: rgba(var(--font-color));
  margin: 0;
  padding: 0;
  transform: scale(1);
}

.nfc-scanner-wrapper .nfc-icon.is-active {
  color: rgba(var(--color-success));
  transform: scale(1);
  animation: nfcpulse 1.5s ease alternate infinite;
  -webkit-animation: nfcpulse 1.5s ease alternate infinite;
  -o-animation: nfcpulse 1.5s ease alternate infinite;
  -moz-animation: nfcpulse 1.5s ease alternate infinite;
}

@keyframes nfcpulse {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.1);
  }
}

@-webkit-keyframes nfcpulse {
  0% {
    transform: scale(1);
    -webkit-transform: scale(1);
  }
  100% {
    transform: scale(1.1);
    -webkit-transform: scale(1.1);
  }
}

@-moz-keyframes nfcpulse {
  0% {
    transform: scale(1);
    -moz-transform: scale(1);
  }
  100% {
    transform: scale(1.1);
    -moz-transform: scale(1.1);
  }
}

@-o-keyframes nfcpulse {
  0% {
    transform: scale(1);
    -o-transform: scale(1);
  }
  100% {
    transform: scale(1.1);
    -o-transform: scale(1.1);
  }
}

.scanner-wrapper .scanner-actions {
  position: absolute;
  bottom: 21pt;
  padding-bottom: env(safe-area-inset-bottom, 0);
  display: flex;
  justify-content: center;
  align-items: center;
  color: rgba(255, 255, 255, 1);
  text-shadow: 0 0 4px rgba(0, 0, 0, 1);
}

.scanner-wrapper .scanner-actions md-icon {
  color: rgba(255, 255, 255, 1);
  stroke: rgba(0, 0, 0, 1);
}

.scanner-wrapper .scanner-actions .toggle-directive {
  padding: 0 8px;
}

.scanner-wrapper .scanner-actions .toggle-directive .toggle-box {
  background-color: rgba(var(--primary-color)) !important;
}

.qrscanner-overlay {
  width: calc(50vw - 16px);
  height: calc(50vw - 16px);
  min-width: 304px;
  min-height: 304px;
  margin: 8px;
  position: fixed;
  background: rgba(255, 255, 255, 0.21);
  border-radius: var(--default-radius-large);
  backface-visibility: hidden;
}

.camera-stream {
  height: 100%;
  min-height: 100%;
}

/* ! See https://bitnamic.atlassian.net/browse/VIOS-1969 */
/* ! See https://bugs.chromium.org/p/chromium/issues/detail?id=1401352 */
/* ! Workaround for VIOS-1969 (Freezing / Lagging video when no interaction happens on Android) */

.vios-1969-android-video-freeze-workaround {
  animation: vios-1969-android-video-freeze-workaround-rotation 2s linear
    infinite;
  background-color: #000;
  height: 1px;
  opacity: 0.1;
  position: absolute;
  width: 1px;
}

@media (orientation: landscape) {
  .qrscanner-overlay {
    width: calc(50vh - 16px);
    height: calc(50vh - 16px);
  }
  .camera-stream {
    width: 100%;
    min-width: 100%;
    height: auto;
    min-height: auto;
  }
}
