/** OOB styles */

* {
  box-sizing: border-box;
}

& {
  --font-main: 'Inter',sans-serif;
  --color-fg: rgb(240, 244, 248);
  --color-fg-dark: rgb(220, 224, 228);
  --color-fg-xdark: rgb(210, 214, 218);
  --color-fg-xxdark: rgb(160, 164, 168);
  --color-fg-maxdark: rgb(120, 124, 128);

  --color-bg: rgb(76, 80, 94);
  --color-bg-clear: rgba(76, 80, 94, 0);
  --color-bg-hover: rgb(100, 104, 118);
  --color-bg-dark: rgb(56, 60, 74);
  --color-bg-xdark: rgb(46, 50, 64);
  --color-bg-xxdark: rgb(16, 20, 34);
  --color-bg-youtube: rgb(16, 18, 20);

  --color-shadow: rgb(50, 54, 68);
  --color-glow: rgba(240, 244, 248, 0.6);
}

html {
  /** Always show the vertical scrollbar to avoid horizontal bumps. */
  overflow-y: scroll;
}

body {
  font-family: var(--font-main);
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;

  background-color: var(--color-bg);
  color: var(--color-fg);

  margin: 0px 0px;

  display: flex;
  flex-direction: column;
}

header {
  display: flex;
  flex-direction: column;
  background-image: url("../img/banner.webp");
  background-size: cover;
  background-position: left center;
  min-height: 220px;
  justify-content: end;

  .overlay {
    display: flex;
    flex-direction: column;
    background-image: linear-gradient(to bottom, var(--color-bg-clear), var(--color-bg) 70%, var(--color-bg) );
  }

  h1 {
    align-self: center;
    font-size: 60px;
    font-weight: 100;
    margin: 0 0;

    text-shadow: 0px 0px 1px var(--color-bg), 0px 0px 2px var(--color-bg);
  }
}

.about {
  padding: 14px 32px 0px 32px;
  align-self: center;
  font-weight: 300;
  font-size: 18px;
  letter-spacing: 0.5px;
  text-align: center;
}

main {
  padding: 32px 32px 0px 32px;
  display: flex;
  flex-direction: column;
}

oob-main {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

oob-playlist {
  display: flex;
  flex-direction: column;
  gap: 10px;

  .banner {
    display: flex;
    flex-direction: row;
    gap: 14px;
    flex: 1 0 0;

    &:hover {
      background-color: var(--color-bg-hover);
    }

    .text {
      display: flex;
      flex-direction: row;
      gap: 14px;
      flex: 1 0 0;
    }

    .name-sub {
      display: flex;
      flex-direction: column;
      align-self: end;

      .name-spotify {
        display: flex;
        flex-direction: row;
        gap: 10px;
        color: var(--color-fg);
        align-items: center;

        .name {
          font-weight: 300;
          font-size: 24px;
          line-height: 28px;
          letter-spacing: -0.5px;
        }
      }
      .sub {
        font-weight: 750;
        text-transform: uppercase;
        font-size: 36px;
        line-height: 36px;
      }
    }

    .count-from {
      display: flex;
      flex-direction: column;
      align-self: end;
      align-items: end;
      flex: 1 0 0;
      color: var(--color-fg-dark);
      text-align: end;

      .count {
        font-weight: 200;
        font-size: 36px;
        line-height: 42px;
      }
      .from, .starts {
        font-weight: 300;
        color: var(--color-fg-xdark);
      }
      .from {
        font-size: 18px;
        line-height: 18px;
      }
      .starts {
        font-size: 15px;
        line-height: 15px;
        font-style: italic;
      }
    }
  }

  .songs {
    display: none;
    flex-direction: column;
    gap: 10px;
    border-top: 2px solid var(--color-fg-xxdark);
    border-bottom: 2px solid var(--color-fg-xxdark);
    padding: 0px 0px;
  
    max-height: 0px;
    transition: all 0.4s;

    &.visible {
      display: flex;
    }

    &.expanded {
      max-height: 5000px;
      padding: 10px 0px;
      oob-song {
        max-height: unset;
        opacity: 1;
      }
    }

    &.expanding {
      max-height: 5000px;
      padding: 10px 0px;
      oob-song {
        max-height: 60px;
        opacity: 1;
      }
    }

    &.collapsing {
      max-height: 0px;
      oob-song {
        max-height: 0px;
        opacity: 0;
      }
    }
  }
}

oob-song {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 0px;
  opacity: 0;
  transition: all 0.2s;
  border-color: var(--color-bg);

  .summary {
    display: flex;
    flex-direction: row;
    gap: 14px;

    &:hover {
      background-color: var(--color-bg-hover);
    }
  }

  .number {
    align-self: center;
    text-align: center;
    font-size: 20px;
    font-weight: 200;
    min-width: 46px;
    padding-left: 6px;
  }

  .song-image {
    width: 60px;
    height: 60px;
    align-self: center;
    box-shadow: 3px 3px 3px var(--color-shadow);
    border-radius: 2px;
  }

  .name-artist {
    display: flex;
    flex-direction: column;
    align-self: center;
    flex: 1;
    min-width: 0;

    .name, .artist {
      text-overflow: ellipsis;
      white-space: nowrap;
      overflow: hidden;
    }

    .name {
      font-weight: 700;
    }
    .artist {
      color: var(--color-fg-dark);
      font-weight: 400;
    }
  }

  .album-contrib {
    display: flex;
    flex-direction: column;
    align-self: center;
    flex: 1;
    min-width: 0;

    .album {
      display: flex;
      flex-direction: row;
      gap: 6px;
      font-weight: 400;

      .album-name {
        display: flex;
        flex-direction: row;
        flex: 0 1 auto;
        min-width: 0;
        .text {
          text-overflow: ellipsis;
          white-space: nowrap;
          overflow: hidden;
        }
      }
      .year {
        color: var(--color-fg-dark);
        font-size: 14px;
        align-self: center;
      }
    }
    .genre {
      font-size: 12px;
      color: var(--color-fg-xdark);
      font-weight: 400;
    }
    .contrib {
      font-size: 12px;
      font-style: italic;
      color: var(--color-fg-xdark);
      font-weight: 400;
    }
  }

  .links {
    display: flex;
    flex-direction: row;
    gap: 24px;
    align-items: center;
    justify-content: end;
    min-width: 100px;

    .youtube, .spotify {
      background-size: 24px;
      background-position: center;
      background-repeat: no-repeat;
      width: 38px;
      height: 38px;
    }

    .youtube {
      background-image: url(../img/youtube-gray.svg);
    }

    .spotify {
      background-image: url(../img/spotify-gray.svg);
    }
  }

  .details {
    display: none;

    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    max-height: 0;
    transition: all 0.3s;

    padding-left: 10px;
    padding-right: 10px;

    .options {
      display: flex;
      flex-direction: row;
      gap: 10px;
      align-items: start;
      align-self: center;
      transition: opacity 0.3s;
      opacity: 0;

      .tab {
        display: flex;
        align-items: center;
        background-color: var(--color-bg-hover);
        border-top: 1px solid var(--color-bg-hover);
        border-left: 1px solid var(--color-bg-hover);
        border-right: 1px solid var(--color-bg-hover);
        border-top-left-radius: 6px;
        border-top-right-radius: 6px;
        border-bottom-left-radius: 0px;
        border-bottom-right-radius: 0px;
        cursor: pointer;
        color: var(--color-fg);
        padding: 2px 8px;
        height: 28px;

        &:hover {
          background-color: var(--color-bg-dark);
          border-color: var(--color-fg-dark);
        }
      }

      .spotify {
        margin-top: 1px;
      }

      .youtube {
        background-size: 20px;
        background-position: 8px center;
        background-repeat: no-repeat;
        padding-left: 34px;
        background-image: url(../img/youtube-gray.svg);
      }
    }

    .view {
      display: flex;
      flex-direction: column;
      align-items: center;
      background-color: var(--color-bg-xdark);
      min-height: 60px;
      padding: 10px;
      transition: opacity 0.3s;
      opacity: 0;
    }
  }

  &.review .details .options .tab.review,
  &.youtube .details .options .tab.youtube {
    background-color: var(--color-bg-xdark);
    border-top-color: var(--color-bg-xdark);
    border-left-color: var(--color-bg-xdark);
    border-right-color: var(--color-bg-xdark);
    border-bottom-color: var(--color-bg-xdark);
  }

  &.review .details .options,
  &.review .details .view,
  &.youtube .details .options,
  &.youtube .details .view  {
    opacity: 1;
  }

  &.review .details .view {
    align-items: start;
    font-size: 22px;
    line-height: 26px;
    font-weight: 300;

    p, quote {
      margin: 8px 0px;
      &:first-child {
        margin-top: 0px;
      }
      &:last-child {
        margin-bottom: 0px;
      }
    }

    quote {
      font-style: italic;
      margin-left: 20px;
      border-left: 2px solid var(--color-fg-xxdark);
      padding-left: 20px;
    }

    .not-available {
      align-self: center;
      justify-content: center;
      flex: 1 0 0;
      padding: 30px 0px;
    }
  }

  &.detailed {
    border-top: 1px solid var(--color-fg-maxdark);
    border-bottom: 1px solid var(--color-fg-maxdark);
    padding: 10px 0px;
    background-color: var(--color-bg-dark);

    .links {
      visibility: hidden;
      pointer-events: none;
    }

    .summary:hover {
      background-color: transparent;
    }

    .details {
      display: flex;
    }

    &.review {
      .details {
        height: auto;
        max-height: 540px;
      }
    }
    &.youtube {
      .details {
        max-height: 400px;
      }
    }
  }

}

a, a:visited {
  color: rgb(210, 240, 250);
}

.announcement {
  background-color: rgb(190, 210, 230);
  color: black;
  display: flex;
  flex-direction: column;
  padding: 12px 0px;

  .text {
    font-weight: 600;
    font-size: 16px;
    font-style: italic;
    align-self: center;
  }

  a {
    color: rgb(20, 22, 120);
  }
}

.contribute {
  padding: 64px 32px 0px 32px;

  max-width: 800px;
  margin: 0 auto;

  h2 {
    font-size: 36px;
    line-height: 36px;
    font-weight: 200;
    font-style: italic;
    margin: 0px 0px 10px 0px;
  }
}

footer {
  margin: 32px 0px 0px 0px;
  padding: 20px 32px 20px 32px;
  display: flex;
  font-size: 12px;
  border-top: 1px solid var(--color-fg-maxdark);
}

.button {
  display: flex;
  align-items: center;
  background-color: var(--color-bg-hover);
  border: 1px solid var(--color-fg-xxdark);
  border-radius: 6px;
  cursor: pointer;
  color: var(--color-fg);
  text-decoration: none;

  &:hover {
    background-color: var(--color-bg-dark);
    border-color: var(--color-fg-dark);
  }

  &.inline {
    display: inline-flex;
    padding: 2px 8px;
  }
}

.playlist-image {
  width: 120px;
  height: 120px;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  box-shadow: 4px 4px 4px var(--color-shadow), inset 0px 0px 6px var(--color-glow);
  border-radius: 3px;
  align-self: end;
}

.spotify-open-button, a.spotify-open-button {
  display: flex;
  flex-direction: row;
  gap: 4px;
  background-color: #1ED760;
  color: black;
  padding: 3px 6px 3px 26px;
  border-radius: 6px;
  font-size: 14px;
  align-items: center;
  text-decoration: none;

  background-image: url(../img/spotify-black.svg);
  background-size: 18px;
  background-repeat: no-repeat;
  background-position: 4px center;
}

.other-playlists {
  display: flex;
  flex-direction: column;
  padding: 64px 32px 0px 32px;
  align-self: center;
  align-items: center;

  .banner {
    display: flex;
    flex-direction: row;
    gap: 8px;
    font-weight: 200;
    font-size: 28px;
    line-height: 32px;
    align-items: center;

    .spotify {
      background-image: url(../img/spotify-gray.svg);
      background-size: cover;
      width: 24px;
      height: 24px;
    }
 }
  .sub {
    font-weight: 300;
    font-size: 16px;
    line-height: 20px;
    font-style: italic;
  }
  .lineup {
    padding-top: 20px;
    display: flex;
    flex-direction: row;
    gap: 20px;

    .other-playlist {
      display: flex;
      flex-direction: column;
      align-items: center;
      width: 200px;
      text-decoration: none;
      color: var(--color-fg);

      &:hover {
        background-color: var(--color-bg-hover);
      }

      .playlist-image {
        align-self: center;
      }
      .obsessions {
        padding-top: 10px;
        font-weight: 300;
        font-size: 20px;
        line-height: 24px;
        letter-spacing: -0.5px;
      }
      .name {
        font-weight: 750;
        text-transform: uppercase;
        font-size: 28px;
        line-height: 28px;
      }
    }
  }
}