/* 连续扫码样式 */

/* 扫码输入框 */
.scan-input {
  font-size: 24px;
  font-weight: bold;
  padding: 15px;
  border: 3px solid #0d6efd;
  border-radius: 8px;
  text-align: center;
  letter-spacing: 2px;
}

.scan-input:focus {
  border-color: #0a58ca;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
  outline: none;
}

/* 最近扫描列表 */
.recent-scans {
  margin-top: 20px;
  max-height: 300px;
  overflow-y: auto;
}

.recent-scan-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 6px;
  margin-bottom: 8px;
  animation: slideInRight 0.3s ease;
}

.recent-scan-item code {
  font-size: 18px;
  font-weight: bold;
  color: #0d6efd;
}

.recent-scan-item .badge {
  font-size: 14px;
}

.recent-scan-item small {
  margin-left: auto;
  font-size: 12px;
}

/* 警告提示动画 */
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(-20px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* 扫码面板 */
.scan-panel {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.scan-panel-header {
  margin-bottom: 20px;
  border-bottom: 2px solid #e9ecef;
  padding-bottom: 15px;
}

.scan-panel-header h6 {
  margin: 0;
  font-size: 18px;
  font-weight: bold;
  color: #212529;
}

.scan-panel-header p {
  margin: 5px 0 0 0;
  font-size: 14px;
  color: #6c757d;
}

/* 扫码提示 */
.scan-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px;
  background: #d1ecf1;
  border: 1px solid #bee5eb;
  border-radius: 8px;
  color: #0c5460;
  font-size: 14px;
  margin-bottom: 15px;
}

.scan-hint i {
  font-size: 20px;
}

/* 移动端优化 */
@media (max-width: 768px) {
  .scan-input {
    font-size: 20px;
    padding: 12px;
  }

  .recent-scan-item {
    padding: 8px;
  }

  .recent-scan-item code {
    font-size: 16px;
  }

  .scan-panel {
    padding: 16px;
  }
}

/* 扫码成功/失败视觉反馈 */
.scan-success-flash {
  animation: successFlash 0.5s ease;
}

.scan-error-flash {
  animation: errorFlash 0.5s ease;
}

@keyframes successFlash {
  0%, 100% { background-color: white; }
  50% { background-color: #d4edda; }
}

@keyframes errorFlash {
  0%, 100% { background-color: white; }
  50% { background-color: #f8d7da; }
}
