.rf-audio {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 680px;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 14px;
}

.rf-audio__btn {
  width: 36px;
  height: 36px;
  border: 1px solid #cfcfcf;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  position: relative;
  flex: 0 0 36px;
  transition: border-color .2s ease, background-color .2s ease;
}

.rf-audio__btn:hover {
  border-color: var(--rf-color-hover);
}

.rf-audio__btn::before {
  content: "";
  position: absolute;
  left: 14px; top: 10px;
  width: 0; height: 0;
  border-left: 10px solid var(--rf-color);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  transition: border-left-color .2s ease;
}

.rf-audio__btn::before {
  content: "";
  position: absolute;
  left: 14px; top: 10px;
  width: 0; height: 0;
  border-left: 10px solid var(--rf-color);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  transition: border-left-color .2s ease;
}

.rf-audio.is-playing .rf-audio__btn::before,
.rf-audio.is-playing .rf-audio__btn::after {
  content: "";
  position: absolute;
  top: 9px;
  width: 4px; height: 18px;
  background: var(--rf-color);
  border: none;
}

.rf-audio.is-playing .rf-audio__btn::before { left: 11px; }
.rf-audio.is-playing .rf-audio__btn::after  { left: 21px; }

.rf-audio__track {
  position: relative;
  min-width: 140px;
  height: 8px;
  background: var(--rf-track-bg);
  border-radius: 4px;
  cursor: pointer;
}

.rf-audio__progress {
  position: absolute;
  left: 0; top: 0;
  height: 100%;
  width: 0%;
  background: var(--rf-progress);
  border-radius: 4px;
  transition: width .08s linear;
  overflow: visible;
}

.rf-audio__handle {
  position: absolute;
  right: 0; top: 50%;
  width: 16px; height: 16px;
  background: var(--rf-progress);
  border-radius: 50%;
  transform: translate(50%, -50%);
  pointer-events: none;
  z-index: 2;
  box-shadow: 0 0 0 2px #fff;
}

.rf-audio__time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #444;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.rf-audio.rf--compact {
  gap: 8px;
  font-size: 13px;
}

.rf-audio.rf--compact .rf-audio__btn {
  width: 30px; height: 30px;
}

.rf-audio.rf--compact .rf-audio__btn::before {
  left: 12px; top: 9px;
  border-left-width: 9px; border-top-width: 5px; border-bottom-width: 5px;
}

.rf-audio.rf--compact.is-playing .rf-audio__btn::before {
  left: 10px; height: 16px; top: 7px;
}
.rf-audio.rf--compact.is-playing .rf-audio__btn::after {
  left: 19px; height: 16px; top: 7px;
}

header .rf-audio,
.menu .rf-audio {
  width: 100%;
}

.rf-audio--footer {
  --rf-color: #ee7e36;
  --rf-color-hover: #ff9a5a;
  --rf-track-bg: #444;
  --rf-progress: #ee7e36;
}

.rf-audio--footer .rf-audio__btn {
  border: 1px solid #666;
  background: #ffffff;
}

.rf-audio--footer .rf-audio__time {
  color: #ffffff;
}