:root {
  --first-row-height: 40px;
  --second-row-height: 30px;
  --third-row-height: 50px;
  --max-playlist-height: 200px;
}

.playlist-component-container.hidden {
  display: none;
}

/**************************************************************************************************/
/******************************************** Playlist ********************************************/
/**************************************************************************************************/

.playlist-component-container .playlist {
  background-color: #676767;
  overflow-y: scroll;
  margin: 0px;
  padding: 0px;
  max-height: var(--max-playlist-height);
  scroll-behavior: smooth;
  transition: max-height 0.1s ease-in-out;
}

.playlist-component-container .playlist-container {
  position: fixed;
  bottom: calc(
    var(--first-row-height) + var(--second-row-height) + var(--third-row-height)
  );
  left: 0px;
  right: 0px;
}

.playlist-component-container .playlist-container.closed .playlist {
  max-height: 0px;
}

.playlist-component-container .playlist-container li {
  margin: 0;
  padding: 6px 10px;
  display: flex;
  align-items: center;
}

.playlist-component-container .playlist-container li::marker {
  color: transparent;
}

.playlist-component-container .playlist-container a {
  text-decoration: none;
  color: white;
  font-size: 18px;
}

.playlist-component-container .playlist-container li.active {
  background-color: rgb(90, 90, 90);
}

.playlist-component-container .playlist-button {
  position: fixed;
  display: flex;
  right: 15px;
  justify-content: flex-end;
  bottom: calc(
    var(--first-row-height) + var(--second-row-height) + var(--third-row-height) -
      37px
  );
}

.playlist-component-container .playlist-button button {
  width: 26px;
  height: 26px;
  font-size: 23px;
}

/**************************************************************************************************/
/********************************************* Player *********************************************/
/**************************************************************************************************/

.playlist-component-container audio {
  display: none;
}

.playlist-component-container .player-container {
  display: grid;
  grid-template-columns:
    calc(
      var(--first-row-height) + var(--second-row-height) +
        var(--third-row-height)
    )
    1fr 1fr 1fr;
  grid-template-rows:
    var(--first-row-height) var(--second-row-height)
    var(--third-row-height);
  grid-template-areas:
    "art song_info song_info song_info"
    "art seekbar seekbar seekbar"
    "art buttons_secondary buttons volume";
  background-color: #424242;
  color: white;
  overflow: hidden;
}

.playlist-component-container.sticky-bottom .player-container {
  position: fixed;
  bottom: 0;
  right: 0;
  left: 0;
}

.playlist-component-container .background {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  position: absolute;
  z-index: -1;
  filter: blur(100px) brightness(50%);
  -webkit-filter: blur(100px) brightness(50%);
  width: 100%;
  height: 100%;
}

.playlist-component-container button {
  background-color: transparent;
  border: none;
  height: calc(var(--third-row-height) * 0.8);
  width: calc(var(--third-row-height) * 0.8);
  border-radius: calc(var(--third-row-height) * 0.4);
  margin-right: 5px;
  margin-left: 5px;
  font-size: calc(var(--third-row-height) * 0.45);
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
}

.playlist-component-container button:hover {
  background-color: #5c5c5ca1;
  cursor: pointer;
}

/* Secondary buttons */

.playlist-component-container .buttons-container-secondary {
  grid-area: buttons_secondary;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
}

/* Primary buttons */

.playlist-component-container .buttons-container {
  grid-area: buttons;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.playlist-component-container .buttons-container button.play-btn i.fa-play {
  padding-left: 3px;
}

/* Song Info */

.playlist-component-container .song-info {
  grid-area: song_info;
  padding-top: 10px;
  font-size: calc(var(--first-row-height) * 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-right: 50px;
}

/* Song art */

.playlist-component-container .song-art {
  grid-area: art;
  display: flex;
  align-items: center;
  justify-content: center;
}

.playlist-component-container .song-art img {
  width: calc(
    var(--first-row-height) + var(--second-row-height) + var(--third-row-height) -
      20px
  );
  height: calc(
    var(--first-row-height) + var(--second-row-height) + var(--third-row-height) -
      20px
  );
  border-radius: 10px;
}

/* * * * * * Sliders * * * * * */

.playlist-component-container .volume-container {
  grid-area: volume;
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.playlist-component-container .seek-container {
  grid-area: seekbar;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.playlist-component-container .volume-container input {
  width: 100px;
  height: 100%;
}
.playlist-component-container .seek-container input {
  width: 100%;
  height: 100%;
}

.playlist-component-container .volume-container input[type="range"],
.playlist-component-container .seek-container input[type="range"] {
  margin-right: 10px;
  cursor: pointer;
}

/* Reset styles */

.playlist-component-container input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

/* Track Styles */

.playlist-component-container
  input[type="range"]::-webkit-slider-runnable-track {
  /* Chrome, Safari, Opera, and Edge Chromium */
  background: #ffffff;
  height: 6px;
  border-radius: 3px 2px 2px 3px;
}

.playlist-component-container input[type="range"]::-moz-range-track {
  /* Firefox */
  background: #ffffff;
  height: 6px;
  border-radius: 3px 2px 2px 3px;
}

/* Thumb Styles */

.playlist-component-container input[type="range"]::-webkit-slider-thumb {
  /* Chrome, Safari, Opera, and Edge Chromium */
  -webkit-appearance: none; /* Override default look */
  appearance: none;
  margin-top: -3px; /* Centers thumb on the track */
  background-color: #7e7e7e;
  height: 12px;
  width: 12px;
  border-radius: 6px;
}

/* Thumb Styles */

.playlist-component-container input[type="range"]::-moz-range-thumb {
  /* Firefox */
  border: none; /*Removes extra border that FF applies*/
  border-radius: 6px;
  background-color: #7e7e7e;
  height: 12px;
  width: 12px;
}

/* Focus Styles */

.playlist-component-container input[type="range"]:focus {
  outline: none; /* Removes default focus */
}

.playlist-component-container input[type="range"]:focus::-webkit-slider-thumb {
  /* Chrome, Safari, Opera, and Edge Chromium */
  background-color: #5c5c5c;
}

.playlist-component-container input[type="range"]:focus::-moz-range-thumb {
  /* Firefox */
  background-color: #5c5c5c;
}

/* Progress */

.playlist-component-container input[type="range"]::-moz-range-progress {
  background-color: #7e7e7e;
  height: 6px;
  border-radius: 2px 0px 0px 2px;
}

/**************************************************************************************************/
/***************************************** Inline Variant *****************************************/
/**************************************************************************************************/

/* Player placed in the page flow (song detail), with the track list expanding below */

.playlist-component-container.inline {
  position: relative;
  z-index: 10;
  isolation: isolate;
  max-width: 600px;
  margin: 20px auto 0px auto;
  border-radius: 10px;
  overflow: hidden;
}

.playlist-component-container.inline .player-container {
  /* Stacking context, so the blurred background is drawn above the background color */
  position: relative;
  z-index: 0;
}

.playlist-component-container.inline .playlist-container {
  position: static;
}

.playlist-component-container.inline .playlist {
  overflow-y: auto;
}

.playlist-component-container.inline .playlist-button {
  position: absolute;
  top: 11px;
  bottom: auto;
}

/**************************************************************************************************/
/****************************************** Small Screens *****************************************/
/**************************************************************************************************/

@media screen and (max-width: 550px) {
  :root {
    --first-row-height: 40px;
    --second-row-height: 20px;
    --third-row-height: 40px;
  }
  .playlist-component-container .player-container {
    grid-template-columns:
      calc(
        var(--first-row-height) + var(--second-row-height) +
          var(--third-row-height)
      )
      1fr 4fr 4fr;
    grid-template-areas:
      "art song_info song_info song_info"
      "art seekbar seekbar seekbar"
      "art buttons buttons_secondary volume";
  }

  .playlist-component-container button {
    margin-right: 2px;
    margin-left: 2px;
  }

  .playlist-component-container .volume-container input {
    width: 80px;
  }
}
