SCSS

by Bart Kalisz

HTML

<div class="wp-block-jetpack-podcast-player is-error" id="podcast-player-1">
  <div class="podcast-player__controls"></div>
  <ol class="podcast-player__episodes">
    <li class="podcast-player__episode">
      <a class="podcast-player__episode-link" href="#">
        <span class="podcast-player__episode-title">
          April 29-May 3: A week of disclosure.
        </span>
        <span class="podcast-player__episode-time">
          15:01
        </span>      
      </a>
    </li>
    <li class="podcast-player__episode is-active">
      <a class="podcast-player__episode-link" href="#">
        <span class="podcast-player__episode-title">
          May 13-17: A week of preservation.
        </span>
        <span class="podcast-player__episode-time">
          7:43
        </span>
      </a>
      <div class="podcast-player__episode-error">
         Episode unavailable <span>(<a href="#">Open in new tab</a>)</span>
      </div>
    </li>
    <li class="podcast-player__episode">
      <a class="podcast-player__episode-link" href="#">
        <span class="podcast-player__episode-title">
          May 6-10: A week of submersion.
        </span>
        <span class="podcast-player__episode-time">
          12:23
        </span>      
      </a>
    </li>
    <li class="podcast-player__episode">
      <a class="podcast-player__episode-link" href="#">
        <span class="podcast-player__episode-title">
          April 29-May 3: A week of disclosure.
        </span>
        <span class="podcast-player__episode-time">
          15:01
        </span>      
      </a>
    </li>
  </ol>
</div>

SCSS

body {
  background: #f5eee0;
  padding: 20px;
  display: flex;
  & > * {
    flex: 1
  }
}

.wp-block-jetpack-podcast-player {
  max-width: 600px;
  background: #fff;
  font-family: Arial;
}

ol.podcast-player__episodes {
  list-style-type: none;
  display: flex;
  flex-direction: column;
  padding: 14px 0;
}

li.podcast-player__episode {
  color: #92959a;
  
  &:hover {
    color: #000;
  }

  &.is-active {
    color: #000;
    font-weight: bold;
  }
}
  
a.podcast-player__episode-link {
  display: flex;
  flex-direction: row;
  flex-row: nowrap;
  justify-content: space-between;
  padding: 10px;
  
  text-decoration: none;
  color: inherit;
  
  .is-error .is-active & {
    padding-bottom: 0;
  }
}

.podcast-player__episode-title {
  flex-grow: 1;
  flex-basis: 100%;

  display: flex;
  flex-direction: row;
  justify-content: left;
  align-items: baseline;
  
  padding: 0 10px;
}

.podcast-player__episode-title::before {
  width: 16px;
  margin-right: 10px;
  content: "";

  .is-active & {
    .is-error & {
      content: "🛑";
    }
  
    .is-playing & {
      content: "▶️";
    }
  }
}

.podcast-player__episode-error {
  display: none;
  margin-left: calc(10px + 10px + 16px + 10px);
  margin-bottom: 10px;
  font-size: 0.8em;
  font-weight: normal;
  color: red;
  
  .is-error & {
    display: block;
  }
  
  span {
    color: #92959a;
  }
  
  span > a {
    color: inherit;
  }
}