@keyframes scanLine {
  0% {
    top: 0;
    opacity: 1;
  }

  50% {
    top: calc(100% - 2px);
    opacity: 0.8;
  }

  100% {
    top: 0;
    opacity: 1;
  }
}

@media (max-width: 576px) {
  #qrModal .modal-dialog {
    max-width: 95% !important;
    margin: 1rem;
  }

  #qrModal #qrCameraVideo,
  #qrModal #qrCameraCanvas {
    width: 100% !important;
    height: auto !important;
    max-width: 360px;
  }
}

.qr-modal-file-input {
  display: none;
}

#qrModal .qr-modal-dialog {
  max-width: 520px;
}

#qrModal .qr-modal-content {
  border: none;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  position: relative;
}

#qrModal .qr-modal-close-btn {
  top: 10px;
  right: 15px;
  z-index: 10;
  background: transparent;
  border: none;
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 25px;
  font-weight: bold;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
  outline: none;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
}

#qrModal .qr-modal-body {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}

#qrModal .qr-modal-layer {
  position: relative;
  z-index: 2;
}

#qrModal .qr-modal-title {
  font-size: 1.5rem;
}

#qrModal .qr-camera-container {
  position: relative;
  display: inline-block;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

#qrModal .qr-camera-video {
  display: block;
  border-radius: 12px;
}

#qrModal .qr-camera-canvas {
  display: none;
}

#qrModal .qr-scan-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#qrModal .qr-scan-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 180px;
  height: 180px;
}

#qrModal .qr-scan-corner {
  position: absolute;
  width: 24px;
  height: 24px;
}

#qrModal .qr-scan-corner-top-left {
  top: 0;
  left: 0;
  border-top: 3px solid #0d6efd;
  border-left: 3px solid #0d6efd;
  border-radius: 4px 0 0 0;
}

#qrModal .qr-scan-corner-top-right {
  top: 0;
  right: 0;
  border-top: 3px solid #0d6efd;
  border-right: 3px solid #0d6efd;
  border-radius: 0 4px 0 0;
}

#qrModal .qr-scan-corner-bottom-left {
  bottom: 0;
  left: 0;
  border-bottom: 3px solid #0d6efd;
  border-left: 3px solid #0d6efd;
  border-radius: 0 0 0 4px;
}

#qrModal .qr-scan-corner-bottom-right {
  bottom: 0;
  right: 0;
  border-bottom: 3px solid #0d6efd;
  border-right: 3px solid #0d6efd;
  border-radius: 0 0 4px 0;
}

#qrModal .qr-scan-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #0d6efd, transparent);
  animation: scanLine 2s ease-in-out infinite;
}

#qrModal .qr-scan-status {
  font-size: 0.9rem;
  min-height: 20px;
}
