/** 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-xxdark-75a: rgba(160, 164, 168, 0.75);
  --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-semidark: rgb(66, 70, 84);
  --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);

  --color-blue-950: rgb(200, 220, 240);
  --color-blue-900: rgb(190, 210, 230);
  --color-blue-800: rgb(170, 190, 220);
  --color-blue-700: rgb(150, 170, 210);
  --color-blue-600: rgb(130, 150, 200);
  --color-blue-500: rgb(110, 130, 190);
  --color-blue-400: rgb(90, 110, 180);

  --color-green-900: rgb(190, 230, 210);
  --color-green-800: rgb(170, 210, 190);
  --color-green-700: rgb(150, 190, 170);
  --color-green-600: rgb(130, 170, 150);
  --color-green-500: rgb(110, 150, 130);
  --color-green-400: rgb(00, 130, 110);

  --color-yellow-400: rgb(130, 130, 70);
  --color-yellow-300: rgb(120, 120, 50);
}

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;
  position: relative;
}

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;

    @media (hover:hover) {
      &: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;
      }
    }
  }

  .announce {
    display: none;
    flex-direction: row;
    border-bottom: 2px solid var(--color-fg-xxdark);
    padding: 3px 8px 6px 8px;
    justify-content: center;
    text-align: center;

    color: var(--color-green-900);
    background-image: linear-gradient(to bottom, var(--color-bg), var(--color-bg-semidark));

    font-size: 15px;
    font-weight: 400;

    opacity: 0;
    max-height: 0px;

    transition: all 0.2s;

    &.new, &.past {
      background-image: none;
    }

    .emphasis {
      font-weight: 500;
    }

    &.new {
      color: var(--color-blue-950);
    }

    &.collecting {
      background-image: linear-gradient(to bottom, var(--color-bg), var(--color-blue-400));
      color: var(--color-fg);
    }

    &.future {
      background-image: linear-gradient(to bottom, var(--color-bg), var(--color-yellow-300));
      color: var(--color-fg);
    }

    &.visible {
      opacity: 1;
      max-height: 120px;
      display: flex;
    }
  }

  .songs {
    display: none;
    flex-direction: column;
    gap: 10px;
    border-bottom: 2px solid var(--color-fg-xxdark);
    padding: 0px 0px;
  
    max-height: 0px;
    transition: all 0.4s;

    &.no-announce {
      border-top: 2px solid var(--color-fg-xxdark);
      &.expanded, &.expanding {
        padding-top: 10px;
      }
    }

    &.visible {
      display: flex;
    }

    &.expanded {
      max-height: 5000px;
      padding: 0px 0px 10px 0px;
      oob-song {
        max-height: unset;
        opacity: 1;
      }
    }

    &.expanding {
      max-height: 5000px;
      padding: 0px 0px 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;

    @media (hover:hover) {
      &: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;

        @media (hover:hover) {
          &: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;
    }

    @media (hover:hover) {
      .summary:hover {
        background-color: transparent;
      }
    }

    .details {
      display: flex;
    }

    &.review {
      .details {
        height: auto;
        max-height: 700px;
      }
    }
    &.youtube {
      .details {
        max-height: 400px;
      }
    }
  }

}

a, a:visited {
  color: rgb(210, 240, 250);
}

.announcement {
  background-color: var(--color-blue-900);
  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;
  }

  .contacts {
    display: flex;
    flex-direction: row;
    gap: 20px;
  }
}

footer {
  margin: 32px 0px 0px 0px;
  padding: 20px 32px 20px 32px;
  display: flex;
  flex-direction: row;
  gap: 20px;
  font-size: 12px;
  border-top: 1px solid var(--color-fg-maxdark);
  align-items: center;

  .socials {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: center;
    img {
      width: 20px;
      height: 20px;
    }
  }
}

.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;

  &.passive {
    background-color: transparent;
    border-color: var(--color-fg-maxdark);
    border-width: 2px;
    color: var(--color-bg-dark);

    &:hover {
      background-color: var(--color-glow);
    }
  }

  &:visited {
    color: var(--color-fg);
  }

  &: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 {
    display: flex;
    flex-direction: row;
    padding-top: 20px;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;

    .other-playlist {
      display: flex;
      flex-direction: column;
      align-items: center;
      width: 200px;
      text-decoration: none;
      color: var(--color-fg);

      @media (hover:hover) {
        &: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;
        text-align: center;
      }
      .description {
        padding: 6px 0px 0px 0px;
        font-size: 12px;
        font-weight: 300;
        text-align: center;
      }
    }
  }
}

.current-playlist-promo {
  position: fixed;
  opacity: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s, background-filter 0.8s;
  backdrop-filter: blur(16px);
  z-index: 20;
  top: 0px;
  left: 0px;
  width: 100dvw;
  height: 100dvh;
  max-height: 100dvh;

  .content {
    width: min(600px, 94vw);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    background-color: var(--color-blue-900);
    color: var(--color-bg-xxdark);
    border-radius: 6px;
  }

  .banner {
    display: flex;
    position: relative;
    img {
      border-top-left-radius: 6px;
      border-top-right-radius: 6px;
      width: 100%;
      height: auto;
    }
    /*
    .boxes {
      display: flex;
      flex-direction: row;
      gap: 4%;
      width: 100%;
      height: 100%;
      position: absolute;
      z-index: 25;
      bottom: 0px;
      right: 0px;
      padding: 4% 4%;
      mask-image: linear-gradient(
        to left,
        black 0%,
        transparent 100%
      );
      mask-mode: alpha;
      .column {
        align-self: stretch;
        display: flex;
        flex-direction: column;
        gap: 4%;
        .box {
          width: 8%;
          height: 8%;
          background-color: var(--color-shadow);
        }
      }
    }
    */
  }

  .text {
    display: flex;
    gap: 16px;
    flex-direction: column;
    padding: 16px 24px 22px 24px;
    font-size: 28px;
    font-weight: 300;
  }

  .buttons {
    display: flex;
    flex-direction: row;
    align-self: stretch;
    justify-content: space-between;

    .button {
      font-size: 24px;
      padding: 8px 12px;

      &.passive {
        font-size: 18px;
        font-weight: 400;
      }
    }
  }

  .thanks {
    font-style: italic;
    font-weight: 500;
  }

  .signature {
    align-self: end;
  }

  &.visible {
    visibility: visible;
    pointer-events: all;
    opacity: 1;

    .content {
      box-shadow: 0px 0px 20px var(--color-bg-semidark), 0px 0px 10px var(--color-bg-semidark);
    }
  }
}