/* Neavo premium polish — skeleton, touch, map shimmer (imported via styles.css append) */

@keyframes neavo-shimmer{
  0%{ background-position:120% 0; }
  100%{ background-position:-40% 0; }
}
@keyframes neavo-reveal-in{
  from{ opacity:0; transform:translate3d(0,8px,0); }
  to{ opacity:1; transform:translate3d(0,0,0); }
}

.neavo-skel{
  position:relative;
  overflow:hidden;
  border-radius:10px;
  background:rgba(255,255,255,.06);
}
.neavo-skel::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(
    100deg,
    transparent 0%,
    rgba(255,255,255,.04) 42%,
    rgba(255,255,255,.12) 50%,
    rgba(255,255,255,.04) 58%,
    transparent 100%
  );
  background-size:220% 100%;
  animation:neavo-shimmer 1.35s ease-in-out infinite;
}
.neavo-skel--avatar{
  width:50px;
  height:50px;
  border-radius:999px;
  flex-shrink:0;
}
.neavo-skel-block{
  flex:1;
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.neavo-skel--line{ height:11px; border-radius:8px; }
.neavo-skel--w70{ width:70%; }
.neavo-skel--w90{ width:90%; }
.neavo-skel--w55{ width:55%; }
.neavo-skel--w45{ width:45%; }
.neavo-skel--w40{ width:40%; }
.neavo-skel--w85{ width:85%; }
.neavo-skel--pill{
  width:52px;
  height:24px;
  border-radius:999px;
  flex-shrink:0;
}
.neavo-skel--block{
  height:42px;
  border-radius:12px;
}
.neavo-skel-text{
  color:transparent !important;
  position:relative;
  display:inline-block;
  min-width:4.5em;
  border-radius:6px;
  background:rgba(255,255,255,.06);
  overflow:hidden;
}
.neavo-skel-text::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(100deg, transparent 0%, rgba(255,255,255,.1) 50%, transparent 100%);
  background-size:220% 100%;
  animation:neavo-shimmer 1.35s ease-in-out infinite;
}

/* Nearby skeleton cards */
.neavo-skeleton-host{
  display:flex;
  flex-direction:column;
  gap:12px;
  opacity:1;
  transition:opacity 220ms var(--neavo-ease-out);
}
.neavo-skeleton-host.hidden{ display:none !important; }
.neavo-skeleton-host--out{ opacity:0; }
.neavo-skeleton-card{
  pointer-events:none;
  cursor:default;
  border-color:rgba(255,255,255,.06) !important;
  box-shadow:none !important;
}
.neavo-skeleton-card:active{ transform:none !important; opacity:1 !important; }

.person.neavo-reveal-in{
  animation:neavo-reveal-in 340ms var(--neavo-ease-out) both;
}

/* Profile overlay skeleton */
.neavo-profile-skeleton{
  display:none;
  flex-direction:column;
  gap:12px;
  padding:14px;
  pointer-events:none;
}
#profileOverlay.neavo-profile-loading .neavo-profile-skeleton{
  display:flex;
}
#profileOverlay.neavo-profile-loading #ovBody{
  opacity:0;
  pointer-events:none;
}
#profileOverlay.neavo-profile-loading #ovBody,
#profileOverlay:not(.neavo-profile-loading) #ovBody{
  transition:opacity 280ms var(--neavo-ease-out);
}
#profileOverlay:not(.neavo-profile-loading) #ovBody{
  opacity:1;
}
.neavo-skel-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

/* Map tile loading shimmer */
#mapWrap.neavo-map-loading::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:120;
  pointer-events:none;
  opacity:1;
  transition:opacity 420ms var(--neavo-ease-out);
  background:
    linear-gradient(165deg, rgba(245,247,251,.92) 0%, rgba(235,240,250,.88) 100%);
}
#mapWrap.neavo-map-ready::after,
#mapWrap:not(.neavo-map-loading)::after{
  opacity:0;
}
#mapWrap.neavo-map-loading::before{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:0;
  height:42%;
  z-index:121;
  pointer-events:none;
  background:linear-gradient(
    100deg,
    transparent 0%,
    rgba(255,255,255,.35) 45%,
    rgba(255,255,255,.55) 50%,
    rgba(255,255,255,.35) 55%,
    transparent 100%
  );
  background-size:220% 100%;
  animation:neavo-shimmer 1.6s ease-in-out infinite;
  opacity:.55;
}

/* Native-style touch feedback */
@media (hover: none), (pointer: coarse){
  .person:active,
  .top-btn:active,
  .icon-btn:active,
  .map-stack-btn:active:not(:disabled),
  .map-attrib-btn:active,
  .map-range-control > .map-range-btn:active,
  .map-range-option:active,
  .nearby-range-seg:active,
  .tap-badge:active,
  .profile-head-icon:active,
  #profileOverlay .sbtn--chip:active,
  .guest-onb-btn:active,
  .btn:active:not(:disabled),
  .page[data-page="account"] .account-logout-btn:active:not(:disabled){
    transform:scale(0.97) !important;
    opacity:0.9;
    transition-duration:80ms !important;
  }
}
.leaflet-marker-icon.neavo-marker-wrap:active .nmkr{
  transform:scale(0.94);
  transition:transform 100ms var(--neavo-ease-out);
}
.nmkr{
  transition:transform 120ms var(--neavo-ease-out);
}

@media (prefers-reduced-motion: reduce){
  .neavo-skel::after,
  .neavo-skel-text::after,
  #mapWrap.neavo-map-loading::before,
  .activity-status--active .activity-status__dot,
  .person.neavo-reveal-in{
    animation:none !important;
  }
  .neavo-skeleton-host,
  #profileOverlay #ovBody,
  #mapWrap.neavo-map-loading::after{
    transition-duration:0.01ms !important;
  }
}

/* iOS Safari — smoother profile sheet + avatar layer (perf only) */
#profileOverlay > .overlay{
  contain:layout style;
  -webkit-overflow-scrolling:touch;
}
#profileOverlay #ovAvatarImg{
  -webkit-transform:translateZ(0);
  transform:translateZ(0);
}
