#playlist {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  flex: 1;
  min-width: none;
  text-align: center;
  overflow: auto;
  position: relative;
  min-height: 250px;
}
#playlist::before {
  display: inline-block;
  font-size: 12px;
  height: 100%;
  padding: 10px;
  box-sizing: border-box;
  white-space: pre-wrap;
  background-color: rgba(0,0,0,0.2);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  color: #fff;
  z-index: 99;
}
#playlist:empty::before {
  content: "Your playlist is empty…";
  background: url(../img/cat.png) no-repeat center;
  background-size: 80px;
  background-position-y: center;
}
#playlist.loading::before {
  content: "Loading…";
}
#playlist.loading > li {
  opacity: 0.4;
}
#playlist > li {
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin: 0;
  padding: 0;
}
#playlist > li a {
  color: inherit;
  text-decoration: none;
  padding: 10px;
  padding-left: 0;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
}

#playlist > li.playing a {
  background-color: var(--theme-highlight-color);
  color: var(--theme-contrast-color);
}

#playlist > li:not(.playing):hover a,
#playlist > li:not(.playing) a:focus {
  background-color: rgba(255,255,255,0.1);
}
#playlist > li.playing a:focus .cover::before {
  border: 1px solid var(--theme-highlight-color);
}
#playlist > li a::before {
  content: "";
  width: 16px;
  height: 16px;
  margin: 0 .5em;
  display: inline-block;
  border-radius: 50%;
  z-index: 1;
  background-size: cover;
}
#playlist > li.playing a::before {
  background-image: url(../img/play.svg);
  background-color: rgba(255, 255, 255, 0.5);
}
#playlist > li p {
  margin: 0;
  display: block;
  position: relative;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  font-size: 14px;
  -webkit-mask-image: linear-gradient(to left, transparent 0, black 20px);
  mask-image: linear-gradient(to left, transparent 0, black 20px);
}
#playlist > li p .artist {
  display: block;
  font-size: 12px;
  opacity: 0.5;
}
#playlist > li .cross {
  background-color: transparent;
  border: none;
  width: 16px;
  height: 16px;
  background-image:url("../img/cross.svg");
  background-size: 10px;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.88;
  margin-left: 2px;
  border-radius: 2px;
  -webkit-filter: invert(1);
  filter: invert(1);
}
.contrast-black #playlist .playing .cross {
  -webkit-filter: none;
  filter: none;
}
#playlist .playing .cross:focus,
#playlist .playing .cross:hover {
  -webkit-filter: invert(1);
  filter: invert(1);
  background-color: #ddd;
}
#playlist .cross:focus,
#playlist .cross:hover {
  opacity: 1;
  background-color: #15ced9;
  -webkit-filter: none;
  filter: none;
}

/* File upload input */
#upload-container {
  position: relative;
  cursor: pointer;
}
#upload-container div {
  padding: 10px;
  height: 2em;
  margin: 10px 0;
  border-radius: 2px;
  display: flex;
  width: 100%;
  box-sizing: border-box;
}
#upload-container div::before {
  flex: 1;
  align-self: center;
  content: "Add music or videos";
  text-transform: uppercase;
  text-align: center;
  font-size: 0.9em;
  z-index: -1;
  background-color: var(--theme-highlight-color);
  color: var(--theme-contrast-color);
  border-radius: 2px;
  padding-top: 0.4em;
  height: 2em;
  box-sizing: border-box;
}
#upfile:hover + div::before {
  background-image: linear-gradient(rgba(255,255,255,0.2),transparent);
}
#upfile:hover:active + div::before {
  background-image: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3));
}
#upfile:focus + div::before {
  box-shadow: 0 0 0 4px rgba(255,255,255,0.15);
}
#upfile {
  cursor: pointer;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: 99;
}
