.yz-img-frame {
  position: relative;
  overflow: hidden;
  background-color: #eef5fb;
  background-image:
    linear-gradient(135deg, rgba(255,255,255,.86), rgba(255,255,255,0) 42%),
    linear-gradient(180deg, #f6f9fc 0%, #e9f2f8 100%);
}

.yz-img-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  background:
    linear-gradient(105deg, rgba(255,255,255,0) 22%, rgba(255,255,255,.82) 45%, rgba(255,255,255,0) 66%),
    radial-gradient(circle at 20% 18%, rgba(15, 95, 158, .08), transparent 32%);
  transform: translate3d(-72%, 0, 0);
}

.yz-img-frame.yz-img-loading::before {
  opacity: 1;
  animation: yz-img-sheen 1.18s cubic-bezier(.16, 1, .3, 1) infinite;
}

.yz-img-frame > img[data-yz-img-state="loading"],
.yz-img-frame img[data-yz-img-state="loading"] {
  opacity: .001;
}

.yz-img-frame > img,
.yz-img-frame img {
  position: relative;
  z-index: 1;
  transition: opacity .24s cubic-bezier(.16, 1, .3, 1), filter .24s ease;
}

.yz-img-frame.yz-img-loaded > img,
.yz-img-frame.yz-img-loaded img {
  opacity: 1;
}

.yz-img-frame.yz-img-error {
  background-color: #f1f5f8;
  background-image:
    linear-gradient(180deg, #f7fafc 0%, #edf3f7 100%),
    linear-gradient(90deg, rgba(13, 95, 158, .08), rgba(214, 42, 34, .06));
}

.yz-img-frame.yz-img-error::after {
  content: "";
  position: absolute;
  inset: 12px;
  z-index: 0;
  border: 1px solid rgba(15, 37, 58, .08);
}

@keyframes yz-img-sheen {
  0% { transform: translate3d(-72%, 0, 0); }
  100% { transform: translate3d(72%, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .yz-img-frame::before {
    animation: none !important;
    transform: none !important;
  }

  .yz-img-frame img {
    transition: none !important;
  }
}
