/* Passport scan feedback, active only while OCR is running. */
.dropzone.scanning {
  overflow: hidden;
  isolation: isolate;
  border-style: solid;
  border-color: rgba(139, 129, 255, .82);
  background:
    radial-gradient(ellipse at 50% 65%, rgba(128, 108, 255, .2), transparent 70%),
    rgba(6, 15, 31, .4);
  box-shadow: inset 0 0 32px rgba(98, 110, 255, .12), 0 0 22px rgba(84, 171, 255, .12);
  cursor: progress;
}

.dropzone.scanning::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: 7%;
  right: 7%;
  top: 10%;
  height: 2px;
  border-radius: 50%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, #a990ff 24%, #7beaff 50%, #a990ff 76%, transparent);
  box-shadow: 0 0 9px 2px rgba(116, 208, 255, .62), 0 0 24px 5px rgba(145, 126, 255, .3);
  animation: passport-scan-sweep 1.65s ease-in-out infinite alternate;
}

.dropzone.scanning > * {
  position: relative;
  z-index: 1;
}

.dropzone.scanning .upload-icon {
  animation: passport-scan-pulse 1.1s ease-in-out infinite alternate;
}

.status.processing {
  color: #b9dfff;
}

.status.processing::after {
  content: "";
  display: inline-block;
  width: 1.2em;
  text-align: left;
  animation: passport-scan-dots 1.2s steps(4, end) infinite;
}

@keyframes passport-scan-sweep {
  from { top: 10%; opacity: .5; }
  to { top: 89%; opacity: 1; }
}

@keyframes passport-scan-pulse {
  from { transform: translateY(2px); opacity: .62; }
  to { transform: translateY(-3px); opacity: 1; }
}

@keyframes passport-scan-dots {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75%, 100% { content: "..."; }
}

@media (prefers-reduced-motion: reduce) {
  .dropzone.scanning::after,
  .dropzone.scanning .upload-icon,
  .status.processing::after { animation: none; }
}
