html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: black;
  font-family: Arial, Helvetica, sans-serif;
}

button {
  font-family: inherit;
}

#camerafeed {
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  background: black;
  z-index: 0;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

#fotoCapturada {
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  display: none;
  object-fit: cover;
  background: black;
  z-index: 2;
}

#fotoCapturada.visivel {
  display: block;
}

#targetCanvas {
  display: none;
}

/*
  Canvas usado somente para o contorno de 3 px
  do Image Target selecionado.
*/
#canvasSelecao {
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 4;
  pointer-events: none;
}

#interface {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

#barraSuperior {
  position: absolute;
  left: 12px;
  top: calc(12px + env(safe-area-inset-top));
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
}

#linhaBotoes {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

#botaoFotografar {
  padding: 9px 12px;
  border: 1px solid white;
  border-radius: 8px;
  background: white;
  color: black;
  font-size: 11px;
  font-weight: bold;
  pointer-events: auto;
  cursor: pointer;
}

#botaoAdicionarVideo,
#botaoAdicionarMascara,
#botaoTelaCheia,
#botaoVisualizar {
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.45);
  color: rgba(255, 255, 255, 0.75);
  font-size: 11px;
  pointer-events: auto;
  cursor: pointer;
}

#botaoDeletarTarget {
  padding: 9px 10px;
  border: 1px solid rgba(255, 100, 100, 0.8);
  border-radius: 8px;
  background: rgba(80, 0, 0, 0.65);
  color: white;
  font-size: 11px;
  font-weight: bold;
  pointer-events: auto;
  cursor: pointer;
}

#botaoTelaCheia.ativo,
#botaoVisualizar.ativo {
  border-color: white;
  background: white;
  color: black;
  font-weight: bold;
}

#botaoFotografar:disabled,
#botaoAdicionarVideo:disabled,
#botaoAdicionarMascara:disabled {
  opacity: 0.35;
  cursor: default;
}

#caixaInfo {
  min-width: 185px;
  max-width: min(320px, calc(100vw - 24px));
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.65);
  color: white;
  font-size: 11px;
  line-height: 1.45;
  text-align: left;
  pointer-events: none;
}

#contadorFps,
#contadorTargets {
  font-variant-numeric: tabular-nums;
}

#status {
  font-weight: bold;
}

#controlesFoto {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(520px, calc(100vw - 36px));
  transform: translate(-50%, -50%);
  display: flex;
  gap: 10px;
  pointer-events: auto;
}

#botaoGerar,
#botaoCancelar {
  flex: 1;
  padding: 15px 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
}

#botaoGerar {
  border: 0;
  background: white;
  color: black;
}

#botaoCancelar {
  border: 1px solid white;
  background: rgba(0, 0, 0, 0.65);
  color: white;
}

#botaoGerar:disabled,
#botaoCancelar:disabled {
  opacity: 0.45;
  cursor: default;
}

.oculto {
  display: none !important;
}