/* EstateFlow website — image load shimmer (mirrors CRM LazyImage) */
.ef-lazy-image {
  position: relative;
  display: block;
  overflow: hidden;
  isolation: isolate;
  background-color: #e2e8f0;
  width: 100%;
  height: 100%;
}

.ef-lazy-image.is-loaded .ef-lazy-image__loading {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.ef-lazy-image.is-error {
  background-color: #e8edf5;
}

.ef-lazy-image__loading,
.ef-lazy-image__placeholder {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.ef-lazy-image__shimmer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #e2e8f0;
}

.ef-lazy-image__shimmer::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background-image: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.55),
    transparent
  );
  animation: efLazyShimmer 1.35s infinite;
}

.ef-lazy-image__spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1.35rem;
  height: 1.35rem;
  margin: -0.675rem 0 0 -0.675rem;
  border: 2px solid rgba(15, 23, 42, 0.12);
  border-top-color: rgba(11, 61, 145, 0.85);
  border-radius: 999px;
  animation: efLazySpin 0.7s linear infinite;
  z-index: 1;
}

.ef-lazy-image__img,
.ef-lazy-image > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 1;
}

/* Card / gallery hosts keep aspect while image loads */
.ef-lazy-image--card {
  aspect-ratio: 4 / 3;
  min-height: 140px;
  border-radius: inherit;
}

.ef-lazy-image--gallery,
.ef-main-media .ef-lazy-image {
  width: 100%;
  height: 100%;
  min-height: 180px;
  border-radius: inherit;
}

.ef-lazy-image--thumb {
  width: 100%;
  height: 100%;
  min-height: 64px;
  border-radius: inherit;
}

/* Listing cards — fill media hosts while photos load */
.prop-media .ef-lazy-image,
.property-item .position-relative > a > .ef-lazy-image,
.photo .ef-lazy-image,
.arch-img .ef-lazy-image,
.shot .ef-lazy-image,
.agent-arch .ef-lazy-image,
.hero-arch .ef-lazy-image,
.hero-circle .ef-lazy-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: inherit;
}

.prop-media > a,
.property-item .position-relative > a:not(.stretched-link),
.arch-img {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}

.property-item .ef-lazy-image--card {
  position: relative;
  inset: auto;
  display: block;
  width: 100%;
  height: 250px;
  min-height: 0;
}

.photo {
  position: relative;
}

.photo > .ef-lazy-image {
  position: absolute;
  inset: 0;
  min-height: 0;
}

.shot .more {
  z-index: 3;
}

@keyframes efLazyShimmer {
  100% {
    transform: translateX(100%);
  }
}

@keyframes efLazySpin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ef-lazy-image__shimmer::after,
  .ef-lazy-image__spinner {
    animation: none;
  }
}
