/*
 * UB DSP comb player (player.js). The page's tokens, with the site's values as fallbacks:
 * --accent #F43A00 (the button, the played strokes), --accent-hover #D23100 (the button
 * hovered), --on-accent #FFFFFF (its glyph), --text-muted #999999 (the time, the unplayed strokes,
 * dimmed by the script), --text-bright #FFFFFF (the playhead, the focus ring).
 */
.uw-player {
  container-type: inline-size;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
}

.uw-player__play {
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 50%;
  padding: 0;
  display: grid;
  place-items: center;
  background: var(--accent, #F43A00);
  color: var(--on-accent, #FFFFFF);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.uw-player__play:hover {
  background: var(--accent-hover, #D23100);
}

.uw-player__play:focus-visible,
.uw-player__wave:focus-visible {
  outline: 2px solid var(--text-bright, #FFFFFF);
  outline-offset: 2px;
}

.uw-player__play svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.uw-player__wave {
  flex: 1 1 auto;
  min-width: 0;
  height: 3rem;
  cursor: pointer;
  touch-action: manipulation;
  border-radius: 2px;
}

.uw-player__wave canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.uw-player__time {
  flex: none;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted, #999999);
  white-space: nowrap;
}

/* A file the browser cannot play: its native controls come back and say so. */
.uw-player--error {
  display: none;
}

/* A narrow card (a phone): the time says where the playhead is, not the length too. */
@container (max-width: 300px) {
  .uw-player__total {
    display: none;
  }
}
