/* Viewfinder (visor da câmera) — moldura tipo "mira de câmera" com cantos
   em L e uma linha de varredura (laser) animada. */
.visor-camera {
  position: relative;
  aspect-ratio: 1 / 1;
  max-height: 70vh;
  background-color: #000;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--cor-borda);
}

.visor-camera video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center center;
  touch-action: none;
}

.indicador-zoom {
  position: absolute;
  bottom: 14px;
  right: 14px;
  z-index: 5;
  background: rgba(11, 17, 32, 0.75);
  border: 1px solid var(--cor-borda);
  color: var(--cor-texto);
  font-family: var(--fonte-mono);
  font-size: 0.8rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.indicador-zoom.visivel {
  opacity: 1;
}

.reticulo-canto {
  position: absolute;
  width: 34px;
  height: 34px;
  border-color: var(--cor-acento);
  border-style: solid;
  border-width: 0;
  opacity: 0.9;
  pointer-events: none;
  z-index: 3;
}

.reticulo-canto.topo-esquerda { top: 14px; left: 14px; border-top-width: 3px; border-left-width: 3px; border-top-left-radius: 6px; }
.reticulo-canto.topo-direita { top: 14px; right: 14px; border-top-width: 3px; border-right-width: 3px; border-top-right-radius: 6px; }
.reticulo-canto.baixo-esquerda { bottom: 14px; left: 14px; border-bottom-width: 3px; border-left-width: 3px; border-bottom-left-radius: 6px; }
.reticulo-canto.baixo-direita { bottom: 14px; right: 14px; border-bottom-width: 3px; border-right-width: 3px; border-bottom-right-radius: 6px; }

.linha-varredura {
  position: absolute;
  left: 8%;
  right: 8%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cor-acento-forte), transparent);
  box-shadow: 0 0 10px 1px var(--cor-acento-forte);
  z-index: 2;
  opacity: 0;
}

.visor-camera.ligado .linha-varredura {
  opacity: 1;
  animation: varrer 2.2s ease-in-out infinite;
}

@keyframes varrer {
  0% { top: 10%; }
  50% { top: 88%; }
  100% { top: 10%; }
}

@media (prefers-reduced-motion: reduce) {
  .linha-varredura {
    animation: none !important;
    opacity: 0.6;
    top: 50%;
  }
}

.feed-terminal {
  background-color: var(--cor-painel-alt);
  border: 1px solid var(--cor-borda);
  border-radius: 0.75rem;
  font-family: var(--fonte-mono);
  font-size: 0.85rem;
  max-height: 70vh;
  overflow-y: auto;
}

.feed-terminal .linha-feed {
  border-bottom: 1px dashed var(--cor-borda);
  padding: 0.6rem 0.9rem;
  word-break: break-all;
}

.feed-terminal .linha-feed:last-child {
  border-bottom: none;
}

.feed-terminal .linha-feed .carimbo-hora {
  color: var(--cor-texto-suave);
  font-size: 0.72rem;
  display: block;
}

.feed-vazio {
  color: var(--cor-texto-suave);
  padding: 1.25rem;
  text-align: center;
  font-family: var(--fonte-corpo);
  font-size: 0.9rem;
}

.bolinha-status {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  background-color: var(--cor-texto-suave);
}

.bolinha-status.ativa {
  background-color: var(--cor-acento);
  box-shadow: 0 0 0 0 rgba(41, 217, 196, 0.7);
  animation: pulsar 1.6s infinite;
}

@keyframes pulsar {
  0% { box-shadow: 0 0 0 0 rgba(41, 217, 196, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(41, 217, 196, 0); }
  100% { box-shadow: 0 0 0 0 rgba(41, 217, 196, 0); }
}
