/* ========================================================
   Kiosk Camera Scanner Styles - QR 출석 관리 시스템
   ======================================================== */

.kiosk-body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #05070f;
  color: var(--text-main);
  overflow-x: hidden;
  user-select: none;
}

.kiosk-header {
  height: 70px;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 20;
}

.kiosk-main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  position: relative;
}

/* Scanner Viewport Frame */
.scanner-viewport-wrap {
  width: 100%;
  max-width: 520px;
  aspect-ratio: 4/3;
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: #090d16;
  border: 2px solid rgba(99, 102, 241, 0.4);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8), 0 0 30px var(--primary-glow);
}

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

#reader video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: var(--radius-xl);
}

/* Cybernetic Reticle & Laser */
.scan-reticle {
  position: absolute;
  inset: 15%;
  border: 2px dashed rgba(6, 182, 212, 0.6);
  border-radius: var(--radius-lg);
  pointer-events: none;
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.scan-laser {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #06b6d4, #6366f1, transparent);
  box-shadow: 0 0 15px #06b6d4;
  animation: laserScan 2s infinite ease-in-out;
  pointer-events: none;
}

@keyframes laserScan {
  0% { top: 5%; opacity: 0.2; }
  50% { top: 95%; opacity: 1; }
  100% { top: 5%; opacity: 0.2; }
}

/* Scanner Controls Bar */
.kiosk-controls-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.kiosk-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.kiosk-btn:hover {
  background: rgba(51, 65, 85, 0.9);
  border-color: rgba(255, 255, 255, 0.2);
}

.kiosk-btn.active {
  background: rgba(99, 102, 241, 0.25);
  border-color: var(--primary-light);
  color: #c7d2fe;
}

/* Result Overlay Card (Auto-dismisses in 1.5s) */
.result-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 15, 0.88);
  backdrop-filter: blur(12px);
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.result-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.result-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-xl);
  transform: scale(0.9);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.result-overlay.active .result-card {
  transform: scale(1);
}

.result-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  margin-bottom: 1.25rem;
}

.result-icon.success {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 2px solid rgba(16, 185, 129, 0.3);
}

.result-icon.duplicate {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 2px solid rgba(245, 158, 11, 0.3);
}

.result-icon.error {
  background: rgba(244, 63, 94, 0.15);
  color: #f43f5e;
  border: 2px solid rgba(244, 63, 94, 0.3);
}

.result-name {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.result-sub {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.result-time {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Manual Barcode / Token Input Panel */
.manual-input-strip {
  margin-top: 1.5rem;
  width: 100%;
  max-width: 520px;
  display: flex;
  gap: 0.5rem;
}

/* ========================================================
   Responsive Media Queries for Kiosk Mode
   ======================================================== */
@media (max-width: 680px) {
  .kiosk-header {
    height: 60px;
    padding: 0 0.85rem;
  }

  .kiosk-session-title {
    display: none;
  }

  .kiosk-main {
    padding: 1rem 0.75rem;
  }

  .scanner-viewport-wrap {
    max-width: 95vw;
    border-radius: var(--radius-lg);
  }

  .kiosk-controls-bar {
    gap: 0.5rem;
    margin-top: 1rem;
  }

  .kiosk-btn {
    padding: 0.55rem 0.85rem;
    font-size: 0.82rem;
  }

  .manual-input-strip {
    max-width: 95vw;
    margin-top: 1rem;
  }

  .result-card {
    padding: 1.75rem 1.25rem;
    max-width: 90vw;
  }

  .result-name {
    font-size: 1.35rem;
  }
}

