.waveform {
  --wave-progress: 0%;
  position: relative;
  min-height: 40px;
  overflow: hidden;
  cursor: pointer;
  touch-action: manipulation;
}

.waveform:hover {
  filter: brightness(1.16);
}

.waveform > svg {
  position: absolute;
  inset: 1px 0;
  display: block;
  width: 100%;
  height: 38px;
}

.waveform-base {
  opacity: 0.78;
}

.waveform-progress {
  clip-path: inset(0 calc(100% - var(--wave-progress)) 0 0);
  opacity: 1;
  filter: drop-shadow(0 0 9px rgba(48, 137, 255, 0.58));
}

.sound-row:hover .waveform-base {
  opacity: 0.94;
}

.sound-row.playing .waveform-base {
  opacity: 0.66;
}

.waveform::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: 3px;
  bottom: 3px;
  left: var(--wave-progress);
  width: 2px;
  border-radius: 2px;
  background: #d8f5ff;
  box-shadow: 0 0 8px #50c7ff, 0 0 16px rgba(39, 109, 255, 0.75);
  opacity: 0;
  transform: translateX(-1px);
  pointer-events: none;
}

.sound-row.playing .waveform::after {
  opacity: 1;
}

.sound-play {
  background: #071b8f;
  border-color: #1839ad;
  box-shadow: 0 7px 20px rgba(0, 17, 255, 0.2);
}

.sound-play:hover,
.sound-play:focus-visible,
.sound-row.playing .sound-play {
  color: #fff;
  background: #286dff;
  border-color: #5c9bff;
  box-shadow: 0 9px 26px rgba(39, 103, 255, 0.38);
}

.waveform-pending {
  display: block;
  width: 100%;
  height: 2px;
  margin-top: 19px;
  background: rgba(255, 255, 255, 0.08);
}
