/* Global */
body {
  font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
  min-width: 22rem;
  font-size: 1.125rem;
}

@media only screen and (min-width: 768px) {
  body {
    max-width: 38rem;
    font-size: 1rem;
  }
}

/* Search bar */
.search-bar {
  margin: 1rem 0;
  padding: 0.5rem 0;
}

.search-bar form {
  display: flex;
  gap: 0.5rem;
}

.search-bar input[type="search"] {
  flex-grow: 1;
  padding: 0.5rem;
  font-size: 1rem;
  border: thin solid grey;
  border-radius: 0.25rem;
}

.search-bar button {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border: thin solid grey;
  border-radius: 0.25rem;
  background: white;
  cursor: pointer;
}

.search-bar button:hover {
  background: #f0f0f0;
}

.search-results {
  margin: 1rem 0;
}

.search-results h2 {
  font-size: 1.25rem;
  margin: 0.5rem 0;
}

/* Directory listing and playlist tables */
.table {
  margin: 1.125rem 0 0 0;
  border-top: thin solid grey;
}

.row {
  border-bottom: thin solid grey;
  padding: 0.625rem 0 0.563rem;
  display: block;
  color: inherit;
  text-decoration: inherit;
  cursor: pointer;
}

.icon {
  padding-left: 2rem;
  background: center/1rem no-repeat;
}

.icon.folder {
  background-image: url("folder.svg");
}

.icon.file {
  background-image: url("document.svg");
}

.track>.icon.button-track-playpause {
  background-image: url("play.svg");
}

.track.playing>.icon.button-track-playpause {
  background-image: url("pause.svg");
}

/* Cover */
.cover {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 1.25rem;
}

.cover>img {
  width: 22rem;
  max-width: 100%;
}

/* Title */
.title {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 1.25rem;
}

/* Main player controls */
.controls {
  display: flex;
  align-items: center;
}

.time-elapsed,
.time-total {
  padding: 0 0.25rem 0 0.25rem;
}

.progressbar {
  flex-grow: 1;
}

.button-playpause {
  width: 3rem;
  height: 3rem;
  display: inline-block;
  vertical-align: middle;
  background: url("play.svg") center/3rem no-repeat;
}

.button-playpause.playing {
  background: url("pause.svg") center/3rem no-repeat;
}

.button-playpause.buffering {
  opacity: 0.6;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

.button-prev,
.button-next {
  width: 2rem;
  height: 2rem;
  display: inline-block;
  vertical-align: middle;
}

.button-prev {
  background: url("play-skip-back.svg") center/1.5rem no-repeat;
}

.button-next {
  background: url("play-skip-forward.svg") center/1.5rem no-repeat;
}

span[class^="button-"] {
  cursor: pointer;
}

span[class^="button-"].disabled {
  opacity: .4;
  cursor: unset;
}
