/* Existing bars remain the still illustration until the page is loaded and idle. */
.soundboard[data-audio-motion],
.stem-package[data-audio-motion] {
  position: relative;
}

[data-audio-motion] .audio-motion-control {
  position: absolute;
  right: 0;
  bottom: -33px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 28px;
  padding: 3px 6px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #9db0c5;
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: .015em;
}

[data-audio-motion] .audio-motion-control:hover:not(:disabled) {
  color: #d7eaff;
  background: #ffffff08;
}

[data-audio-motion] .audio-motion-control:disabled {
  color: #8494a8;
  opacity: 1;
}

.audio-motion-control svg {
  width: 11px;
  height: 11px;
  fill: currentColor;
}

[data-audio-motion-ready="true"] .wave > i {
  transform-origin: center;
  animation: patchrender-wave var(--wave-duration, 7s) ease-in-out var(--wave-delay, 0s) infinite;
  animation-play-state: paused;
}

[data-audio-motion-playing="true"] .wave > i {
  animation-play-state: running;
}

@keyframes patchrender-wave {
  0%, 100% { transform: scaleY(1); }
  27% { transform: scaleY(var(--wave-low, .6)); }
  61% { transform: scaleY(var(--wave-high, 1.12)); }
  83% { transform: scaleY(var(--wave-middle, .8)); }
}

@media (prefers-reduced-motion: reduce) {
  [data-audio-motion] .wave > i {
    animation: none;
    transform: none;
  }
}

@media (max-width: 760px) {
  /* A 25px feature-card gutter accommodates the control below the soundboard. */
  .soundboard[data-audio-motion] .audio-motion-control {
    bottom: -25px;
    min-height: 24px;
  }
}
