/* Map boot loading — sequential steps + visible map blur/zoom (no re-init). */

/* Map always visible: blur + slight scale while locationLoading || markersLoading */
#mapWrap.neavo-map-boot-pending{
  overflow:hidden;
}

#mapWrap.neavo-map-boot-pending #map,
#mapWrap.neavo-map-boot-pending #neavoMapboxTestHost{
  filter:blur(8px);
  opacity:0.94;
  transform:scale(1.045);
  transform-origin:center center;
  transition:
    filter 500ms ease-out,
    opacity 500ms ease-out,
    transform 500ms ease-out;
  pointer-events:none;
  will-change:filter, transform, opacity;
}

#mapWrap:not(.neavo-map-boot-pending) #map,
#mapWrap:not(.neavo-map-boot-pending) #neavoMapboxTestHost{
  filter:none;
  opacity:1;
  transform:scale(1);
  transition:
    filter 500ms ease-out,
    opacity 500ms ease-out,
    transform 500ms ease-out;
  pointer-events:auto;
}

/* Keep tile shimmer from hiding the map during boot */
#mapWrap.neavo-map-boot-pending.neavo-map-loading::after,
#mapWrap.neavo-map-boot-pending.neavo-map-loading::before{
  opacity:0 !important;
  animation:none !important;
}

/* Map chrome non-interactive while boot loading (overlay is text-only) */
#mapWrap.neavo-map-boot-pending .map-control-stack,
#mapWrap.neavo-map-boot-pending .map-range-control,
#mapWrap.neavo-map-boot-pending .map-attrib-wrap{
  pointer-events:none;
  opacity:0.65;
  transition:opacity 500ms ease-out;
}

.neavo-map-boot-loading{
  position:absolute;
  inset:0;
  z-index:5200;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px max(16px, env(safe-area-inset-right)) 24px max(16px, env(safe-area-inset-left));
  box-sizing:border-box;
  pointer-events:none;
  background:transparent;
  opacity:1;
  transition:opacity 500ms ease-out;
}

.neavo-map-boot-loading.hidden{
  display:none !important;
}

.neavo-map-boot-loading--hiding{
  opacity:0;
  pointer-events:none;
}

/* Single centered slot — one loader visible at a time */
.neavo-map-boot-loading__content{
  display:grid;
  place-items:center;
  width:100%;
  max-width:min(100%, 340px);
  min-height:32px;
  pointer-events:none;
}

.neavo-map-boot-loading__row{
  grid-area:1 / 1;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:11px;
  min-height:28px;
  opacity:0;
  transform:translateY(10px);
  transition:
    opacity 300ms ease-out,
    transform 300ms ease-out;
  pointer-events:none;
}

.neavo-map-boot-loading__row.hidden{
  visibility:hidden;
  opacity:0 !important;
  transform:translateY(10px) !important;
}

.neavo-map-boot-loading__row.is-active{
  opacity:1;
  transform:translateY(0);
  pointer-events:auto;
}

.neavo-map-boot-loading__row.is-enter{
  opacity:0;
  transform:translateY(10px);
}

.neavo-map-boot-loading__row.is-exit{
  opacity:0;
  transform:translateY(-10px);
}

.neavo-map-boot-loading__spinner{
  flex-shrink:0;
  width:20px;
  height:20px;
  border-radius:50%;
  border:2px solid rgba(255, 255, 255, 0.22);
  border-top-color:rgba(248, 250, 255, 0.95);
  filter:drop-shadow(0 0 8px rgba(0, 0, 0, 0.35));
}

.neavo-map-boot-loading__spinner.is-spinning{
  animation:neavo-map-boot-spin 0.8s linear infinite;
}

.neavo-map-boot-loading__text{
  font-size:14px;
  font-weight:600;
  letter-spacing:0.02em;
  color:rgba(252, 253, 255, 0.96);
  line-height:1.25;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.65),
    0 0 18px rgba(0, 0, 0, 0.45);
}

@keyframes neavo-map-boot-spin{
  to{ transform:rotate(360deg); }
}

@media (prefers-reduced-motion: reduce){
  .neavo-map-boot-loading{
    transition-duration:0.01ms !important;
  }
  .neavo-map-boot-loading__row{
    transition-duration:0.01ms !important;
  }
  #mapWrap.neavo-map-boot-pending #map,
  #mapWrap.neavo-map-boot-pending #neavoMapboxTestHost{
    filter:blur(4px);
    transform:none;
    transition-duration:0.01ms !important;
  }
  .neavo-map-boot-loading__spinner.is-spinning{
    animation:none;
    opacity:0.9;
  }
}
