/* Full-screen camera view shown while scanning. */
.scanner {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: #000;
}

.scanner video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Frame to line the barcode up with; everything around it is dimmed. */
.scanner-guide {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(80vw, 420px);
  aspect-ratio: 2 / 1;
  transform: translate(-50%, -50%);
  border: 3px solid #fff;
  border-radius: 12px;
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.45);
}

.scanner-hint {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 16px);
  left: 16px;
  right: 16px;
  margin: 0;
  color: #fff;
  text-align: center;
}

.scanner-cancel {
  position: absolute;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 24px);
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 32px;
  border: none;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font-size: 1rem;
}
