/* Scanner Mobile Styles */

.scanner-container {
  max-width: 600px;
  margin: 0 auto;
}

.scanner-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.scanner-video-box {
  position: relative;
  width: 100%;
  height: 320px;
  background-color: #000;
  overflow: hidden;
  border-radius: var(--radius-md);
}

#reader {
  width: 100% !important;
  height: 100% !important;
}

#reader video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

/* Scanner target box */
.scanner-reticle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 220px;
  height: 220px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  pointer-events: none;
}

.scanner-reticle::before,
.scanner-reticle::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: #38bdf8;
  border-style: solid;
}

.scanner-reticle::before {
  top: -2px;
  left: -2px;
  border-width: 4px 0 0 4px;
  border-top-left-radius: 12px;
}

.scanner-reticle::after {
  bottom: -2px;
  right: -2px;
  border-width: 0 4px 4px 0;
  border-bottom-right-radius: 12px;
}

/* Laser scan animation */
.scanner-laser {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #38bdf8, #22c55e, #38bdf8, transparent);
  box-shadow: 0 0 10px #38bdf8;
  animation: laserScan 2.5s infinite alternate ease-in-out;
}

@keyframes laserScan {
  0% { top: 10%; opacity: 0.8; }
  100% { top: 90%; opacity: 0.8; }
}

/* Feedback Toast Notification */
.scan-feedback {
  display: none;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  animation: fadeInDown 0.3s ease;
}

.scan-feedback.show {
  display: block;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-15px); }
  to { opacity: 1; transform: translateY(0); }
}

.scan-feedback-found {
  background-color: rgba(34, 197, 94, 0.2);
  border: 2px solid #22c55e;
  color: #86efac;
}

.scan-feedback-mismatch {
  background-color: rgba(249, 115, 22, 0.2);
  border: 2px solid #f97316;
  color: #fdba74;
}

.scan-feedback-duplicate {
  background-color: rgba(56, 189, 248, 0.2);
  border: 2px solid #38bdf8;
  color: #bae6fd;
}

.scan-feedback-unknown {
  background-color: rgba(239, 68, 68, 0.2);
  border: 2px solid #ef4444;
  color: #fca5a5;
}

/* Audit Session Progress */
.audit-progress-container {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.audit-kpi-pill {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  text-align: center;
}

.audit-kpi-val {
  font-size: 1.25rem;
  font-weight: 700;
}

.audit-kpi-lbl {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
}
