
/* ---------- 1) Row layout ---------- */
ul.playlist > li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;      /* match your “good” screenshot spacing */
}

/* The player row container */
ul.playlist > li .player {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1;
}

/* Title (your span filename) */
ul.playlist > li .player > span,
ul.playlist > li .player .clip-title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  line-height: 1.2;

  /* keep one-line like your screenshot (remove if you prefer wrapping) */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Download pinned to the right */
ul.playlist > li .player .download-link {
  margin-left: auto;
  white-space: nowrap;
}
ul.playlist > li .player .download-link a {
  float: none !important;
  display: inline-block;
}

/* Also support the alternate markup: <h5 class="attached audio"> ... */
ul.playlist > li h5.attached.audio {
  display: flex;
  align-items: center;
  gap: 12px;

  flex: 1 1 auto;
  min-width: 0;

  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  width: auto !important;
  line-height: 1.2 !important;
}
ul.playlist > li h5.attached.audio > span {
  flex: 1 1 auto;
  min-width: 0;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
ul.playlist > li h5.attached.audio > a {
  margin-left: auto;
  white-space: nowrap;
  float: none !important;
  display: inline-block;
}

/* ---------- 2) Strip Plyr audio chrome (no bar) ---------- */
.plyr.plyr--audio {
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  padding: 0 !important;

  display: inline-flex !important;
  align-items: center !important;
}

.plyr.plyr--audio .plyr__controls {
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  padding: 0 !important;

  display: inline-flex !important;
  align-items: center !important;

  height: 18px !important;
  min-height: 0 !important;
  line-height: 0 !important;
}

/* Hide everything except play */
.plyr.plyr--audio .plyr__progress,
.plyr.plyr--audio .plyr__time,
.plyr.plyr--audio .plyr__volume,
.plyr.plyr--audio .plyr__menu,
.plyr.plyr--audio .plyr__controls__item:not([data-plyr="play"]) {
  display: none !important;
}

/* ---------- 3) Custom red play button ---------- */
.plyr.plyr--audio .plyr__control[data-plyr="play"] {
  width: 18px !important;
  height: 18px !important;
  border-radius: 50%;
  background: #d60000;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  cursor: pointer;
  box-shadow: none !important;
  line-height: 1 !important;
}

.plyr.plyr--audio .plyr__control[data-plyr="play"] svg {
  display: none !important; /* hide Plyr SVG icons */
}

/* default (paused) triangle */
.plyr.plyr--audio .plyr__control[data-plyr="play"]::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 5px solid #fff;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  margin-left: 1px;
}

/* playing = pause bars */
.plyr.plyr--audio.plyr--playing .plyr__control[data-plyr="play"]::before {
  content: "";
  width: 8px;
  height: 8px;
  background: linear-gradient(
    to right,
    #fff 0 3px,
    transparent 3px 5px,
    #fff 5px 8px
  );
  border: none;
  margin-left: 0;
}

.plyr.plyr--audio .plyr__control[data-plyr="play"]:hover {
  background: #b80000;
}

/* focus halo without changing layout */
.plyr.plyr--audio .plyr__control[data-plyr="play"]:focus,
.plyr.plyr--audio .plyr__control[data-plyr="play"]:focus-visible {
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(0,128,255,.35) !important;
}

/* Center everything vertically inside the grey bar */
ul.playlist > li .player {
  display: flex !important;
  align-items: center !important;   /* <-- this is the key */
}

/* Make sure the Plyr wrapper behaves like a centered flex item */
ul.playlist > li .player .plyr {
  display: flex !important;
  align-items: center !important;
}

/* Also ensure the controls block itself is centered */
ul.playlist > li .player .plyr__controls {
  display: flex !important;
  align-items: center !important;
  height: 100% !important;
}
/* Center everything vertically inside the grey bar */
ul.playlist > li .player {
  display: flex !important;
  align-items: center !important;   /* <-- this is the key */
}

/* Make sure the Plyr wrapper behaves like a centered flex item */
ul.playlist > li .player .plyr {
  display: flex !important;
  align-items: center !important;
}

/* Also ensure the controls block itself is centered */
ul.playlist > li .player .plyr__controls {
  display: flex !important;
  align-items: center !important;
  height: 100% !important;
}

.plyr {
  min-width:20px;
}
