.image-loader {
  position: relative;
  isolation: isolate;
}

.image-loader > img {
  transition: opacity .2s ease;
}

.image-loader.image-loading > img {
  opacity: .42;
}

.image-loader.image-loading::before,
.image-loader.image-loading::after {
  position: absolute;
  top: 50%;
  left: 50%;
  pointer-events: none;
  content: "";
  transform: translate(-50%, -50%);
}

.image-loader.image-loading::before {
  z-index: 2;
  width: clamp(40px, 17%, 52px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgb(23 107 72 / 16%);
  box-shadow: 0 0 0 5px rgb(255 255 255 / 82%), 0 4px 14px rgb(24 50 41 / 15%);
  animation: image-loader-throb 1s ease-in-out infinite;
}

.image-loader.image-loading::after {
  z-index: 3;
  width: clamp(18px, 7%, 24px);
  aspect-ratio: 1;
  border-radius: 6px;
  background: var(--image-loader-logo) center / cover no-repeat;
  box-shadow: 0 1px 5px rgb(24 50 41 / 18%);
}

.image-loader.image-error > img {
  opacity: 1;
}

.throbber-submit-indicator {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin-inline-start: 8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: throbber-submit-spin .75s linear infinite;
  vertical-align: middle;
}

@keyframes image-loader-throb {
  0%, 100% {
    transform: translate(-50%, -50%) scale(.86);
    opacity: .7;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.08);
    opacity: 1;
  }
}

@keyframes throbber-submit-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .image-loader.image-loading::before {
    animation: none;
    opacity: 1;
  }

  .throbber-submit-indicator {
    animation: none;
    border-right-color: currentColor;
  }
}
