/* ============================================================
   Scanning overlay — live "search" animation
   ============================================================ */

/* Searching overlay: sits below the header (top set from JS), 416px container */
.searching {
  position: fixed;
  inset: 0;                  /* top is overridden inline to the header height */
  background: var(--bg-grad);
  background-attachment: fixed;   /* line up the glow with the header, no seam */
  z-index: 10;
  overflow-y: auto;
  padding: 16px 20px calc(20px + env(safe-area-inset-bottom));
}
.searching[hidden] { display: none; }

.scan-inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.scan-map {
  width: 100%;
  height: 32vh;
  min-height: 200px;
  max-height: 320px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1.5px solid var(--line);
}

.scan-foot {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.scan-foot h1 { font-size: 26px; margin: 0; }

.searching-line {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  min-height: 18px;
  margin: -6px 0 0;
}

.scan-bar {
  width: 100%;
  height: 8px;
  background: var(--field-bg);
  border-radius: 999px;
  overflow: hidden;
}
.scan-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 999px;
  transition: width .12s linear;
}

/* Person pins on the scan map — circular avatars, drop in one by one.
   The container is the circle (clips the image); the animation lives on the
   child <img> because Leaflet drives the container's transform for placement. */
.person-pin {
  background: black;
  border: 2px solid rgba(156, 156, 156);
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 3px 6px rgb(0 0 0 / .55);
}
.person-pin img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: blur(6px) saturate(1.05);   /* same as .scan-card-face */
  transform: scale(1.15);
  transform-origin: 50% 50%;
  animation: pinDrop .35s cubic-bezier(.2, .9, .3, 1.4);
}
@keyframes pinDrop {
  from { opacity: 0; transform: translateY(-10px) scale(.5); }
  to   { opacity: 1; transform: translateY(0) scale(1.15); }
}

/* Completed search steps */
.scan-done {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.scan-done li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  animation: fade .3s ease;
}
.scan-done .feat-check { color: var(--accent); }

/* Found-people cards (blurred until unlocked) */
.scan-cards {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.scan-cards::-webkit-scrollbar { display: none; }
.scan-card {
  position: relative;
  flex-shrink: 0;
  width: 104px;
  height: 132px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #aeb4bf, #c9ced6 60%, #b7bcc6);
  transition: opacity .4s ease;
}
.scan-card-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(6px) saturate(1.05);
  transform: scale(1.15);
}
.scan-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgb(20 24 33 / .55)),
    radial-gradient(60% 45% at 50% 35%, rgb(255 255 255 / .18), transparent 70%);
}
.scan-card-name {
  position: absolute;
  left: 10px;
  bottom: 10px;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .02em;
  filter: blur(2.5px);
}
