/* ==========================================
   SCANNER INTERFACE STYLES (MONITOR QR SCANNER)
   ========================================== */

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

.action-selector-card {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.action-btn-option {
  flex: 1;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-color);
  background: rgba(15, 23, 42, 0.6);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
  user-select: none;
}

.action-btn-option.selected.action-restart {
  border-color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.12);
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.25);
}

.action-btn-option.selected.action-refill {
  border-color: var(--accent-amber);
  background: rgba(245, 158, 11, 0.12);
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.25);
}

.action-btn-option:disabled, .action-btn-option.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  filter: grayscale(0.8);
}

.action-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.action-restart .action-icon-circle {
  background: rgba(6, 182, 212, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(6, 182, 212, 0.4);
}

.action-refill .action-icon-circle {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.action-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.action-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Scanner Viewport */
.scanner-viewport-wrapper {
  position: relative;
  background: #000000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--border-color);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

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

/* Custom Overlays on Camera */
.scanner-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.target-reticle {
  width: 250px;
  height: 250px;
  position: relative;
  border-radius: 16px;
}

/* Reticle corner brackets */
.target-reticle::before,
.target-reticle::after,
.reticle-corner-bl,
.reticle-corner-br {
  content: '';
  position: absolute;
  width: 32px;
  height: 32px;
  border-color: #6366f1;
  border-style: solid;
  pointer-events: none;
}

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

.target-reticle::after {
  top: 0;
  right: 0;
  border-width: 4px 4px 0 0;
  border-top-right-radius: 12px;
}

.reticle-corner-bl {
  bottom: 0;
  left: 0;
  border-width: 0 0 4px 4px;
  border-bottom-left-radius: 12px;
}

.reticle-corner-br {
  bottom: 0;
  right: 0;
  border-width: 0 4px 4px 0;
  border-bottom-right-radius: 12px;
}

/* Animated Scanning Laser Line */
.laser-beam {
  position: absolute;
  top: 0;
  left: 10px;
  right: 10px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #22d3ee, #6366f1, #22d3ee, transparent);
  box-shadow: 0 0 16px #06b6d4, 0 0 24px #6366f1;
  animation: scanLaser 2.2s infinite ease-in-out;
}

@keyframes scanLaser {
  0% {
    top: 5%;
    opacity: 0.2;
  }
  50% {
    top: 92%;
    opacity: 1;
  }
  100% {
    top: 5%;
    opacity: 0.2;
  }
}

.scan-prompt-text {
  margin-top: 24px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 10px #22d3ee;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

/* Glare reduction filter */
.filter-glare {
  filter: contrast(1.3) brightness(0.9) saturate(1.2) !important;
}

/* Scanner controls bar */
.scanner-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  gap: 12px;
  flex-wrap: wrap;
}

/* Manual Fallback & Simulator Link */
.manual-scan-box {
  margin-top: 24px;
  padding: 16px 20px;
  background: rgba(15, 23, 42, 0.4);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ==========================================
   PASSCODE SUCCESS MODAL
   ========================================== */
.passcode-display-card {
  text-align: center;
  padding: 10px 0;
}

.success-badge-header {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  margin-bottom: 20px;
}

.passcode-container {
  background: #060911;
  border: 2px solid var(--accent-indigo);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  box-shadow: 0 0 35px rgba(99, 102, 241, 0.3);
  margin-bottom: 24px;
}

.passcode-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.passcode-number {
  font-family: var(--font-mono);
  font-size: 48px;
  font-weight: 900;
  letter-spacing: 8px;
  color: #38bdf8;
  text-shadow: 0 0 20px rgba(56, 189, 248, 0.6);
  user-select: all;
}

.passcode-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
}

.timer-ring {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
}

/* 3 Email Dispatch Status Grid */
.email-dispatch-status {
  background: rgba(15, 23, 42, 0.5);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 20px;
  border: 1px solid var(--border-color);
  text-align: left;
}

.email-dispatch-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.email-recipients-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.email-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.email-item .recipient-addr {
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.email-status-pill {
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #34d399;
}
