[data-problem-statement] .problem-statement-image {
  position: relative;
  display: inline-block;
  max-width: 100%;
  vertical-align: middle;
  --statement-image-shade: #eceff3;
  --statement-image-highlight: #fafbfc;
}

.theme--dark [data-problem-statement] .problem-statement-image {
  --statement-image-shade: #272b33;
  --statement-image-highlight: #363c46;
}

[data-problem-statement] .problem-statement-image.is-pending {
  width: min(100%, var(--statement-image-width, 24rem));
  height: var(--statement-image-height, 10rem);
  aspect-ratio: var(--statement-image-ratio, auto);
}

[data-problem-statement] .problem-statement-image.is-pending img {
  position: absolute;
  inset: 0;
  opacity: 0;
}

[data-problem-statement] .problem-statement-image.has-placeholder::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  border-radius: 6px;
  pointer-events: none;
  opacity: 1;
  background: linear-gradient(100deg, var(--statement-image-shade) 35%, var(--statement-image-highlight) 50%, var(--statement-image-shade) 65%);
  background-size: 200% 100%;
  animation: problem-statement-image-shimmer 1.5s linear infinite;
}

[data-problem-statement] .problem-statement-image.is-revealing::after {
  opacity: 0;
  transition: opacity 180ms ease-out;
}

@keyframes problem-statement-image-shimmer {
  from { background-position: 200% 0; }
  to { background-position: 0% 0; }
}

@media (prefers-reduced-motion: reduce) {
  [data-problem-statement] .problem-statement-image.has-placeholder::after {
    animation: none;
    background: var(--statement-image-shade);
  }
  [data-problem-statement] .problem-statement-image.is-revealing::after {
    transition: none;
  }
}
