@use '../../../css/_config/_mixins';
@use '../../../css/_config/_vars';

.wrap {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  width: 100vw;
  min-width: 720px;
  height: 100vh;
  height: 100svh;
  padding: 30px;

  @media (min-width: 840px) and (min-height: 560px) {
    padding: 40px;
  }
  @media (min-width: 1024px) and (min-height: 640px) {
    padding: 50px;
  }
  @media (min-width: 1140px) and (min-height: 740px) {
    padding: 65px;
  }
  @media (min-width: 1360px) and (min-height: 820px) {
    padding: 75px 80px;
  }
  @media (min-width: 1580px) and (min-height: 900px) {
    padding: 75px 90px;
  }
  @media (min-width: 1680px) and (min-height: 960px) {
    padding: 75px 100px;
  }

  > * {
    width: 100%;
  }
}

.topSpacer {
  height: 100px;
}

//
// NOW PLAYING
//

.nowPlaying {
  display: flex;
  justify-content: start;
  align-items: flex-end;
  width: 100%;
}

.cover {
  overflow: hidden;
  flex: 0 0 auto;
  width: 240px;
  height: 240px;
  margin-right: 25px;
  background: var(--color-secondary-hover);
  background-image: vars.$thumbnail;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 10px;
  outline: 1px solid var(--color-opacity-01);
  box-shadow: var(--shadow-xs);

  @media (min-width: 840px) and (min-height: 560px) {
    width: 280px;
    height: 280px;
    margin-right: 35px;
  }
  @media (min-width: 1024px) and (min-height: 640px) {
    width: 340px;
    height: 340px;
    margin-right: 40px;
  }
  @media (min-width: 1140px) and (min-height: 740px) {
    width: 400px;
    height: 400px;
    margin-right: 50px;
  }
  @media (min-width: 1280px) and (min-height: 770px) {
    width: 430px;
    height: 430px;
    margin-right: 55px;
  }
  @media (min-width: 1360px) and (min-height: 820px) {
    width: 460px;
    height: 460px;
    margin-right: 60px;
  }
  @media (min-width: 1580px) and (min-height: 900px) {
    width: 520px;
    height: 520px;
    margin-right: 65px;
  }
  @media (min-width: 1680px) and (min-height: 960px) {
    width: 580px;
    height: 580px;
  }
  @media (min-width: 1920px) and (min-height: 1020px) {
    width: 640px;
    height: 640px;
  }

  &Placeholder {
    outline: 1px solid var(--color-opacity-015);
  }
}

.coverLink,
.coverArtwork,
.coverArtwork img {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  object-fit: cover;
}

.details {
  flex: 1 1 auto;
  width: calc(100% - 240px - 25px);
  padding-bottom: 20px;

  @media (min-width: 840px) and (min-height: 560px) {
    width: calc(100% - 280px - 35px);
    padding-bottom: 25px;
  }
  @media (min-width: 1024px) and (min-height: 640px) {
    width: calc(100% - 340px - 40px);
    padding-bottom: 30px;
  }
  @media (min-width: 1140px) and (min-height: 740px) {
    width: calc(100% - 400px - 50px);
    padding-bottom: 35px;
  }
  @media (min-width: 1280px) and (min-height: 770px) {
    width: calc(100% - 430px - 55px);
  }
  @media (min-width: 1360px) and (min-height: 820px) {
    width: calc(100% - 460px - 60px);
    padding-bottom: 40px;
  }
  @media (min-width: 1580px) and (min-height: 900px) {
    width: calc(100% - 520px - 65px);
    padding-bottom: 45px;
  }
  @media (min-width: 1680px) and (min-height: 960px) {
    width: calc(100% - 580px - 65px);
    padding-bottom: 50px;
  }
  @media (min-width: 1920px) and (min-height: 1020px) {
    width: calc(100% - 640px - 65px);
  }

  a {
    @include mixins.focus-self-underline;

    &:hover {
      text-decoration: underline;
      text-decoration-thickness: 1px;
      text-underline-offset: 2px;
    }
  }
}

.title {
  font-size: 26px;
  line-height: 1.1;
  font-weight: bold;

  @media (min-width: 840px) and (min-height: 560px) {
    font-size: 30px;
  }
  @media (min-width: 1024px) and (min-height: 640px) {
    font-size: 34px;
  }
  @media (min-width: 1140px) and (min-height: 740px) {
    font-size: 37px;
  }
  @media (min-width: 1360px) and (min-height: 820px) {
    font-size: 40px;
  }
  @media (min-width: 1580px) and (min-height: 900px) {
    font-size: 44px;
  }
  @media (min-width: 1680px) and (min-height: 960px) {
    font-size: 48px;
  }
}

.artist {
  margin-top: 6px;
  font-size: 18px;
  line-height: 1.1;
  color: var(--color-opacity-04);

  @media (min-width: 840px) and (min-height: 560px) {
    font-size: 19px;
  }
  @media (min-width: 1024px) and (min-height: 640px) {
    margin-top: 7px;
    font-size: 20px;
  }
  @media (min-width: 1140px) and (min-height: 740px) {
    font-size: 21px;
  }
  @media (min-width: 1360px) and (min-height: 820px) {
    margin-top: 8px;
    font-size: 22px;
  }
  @media (min-width: 1580px) and (min-height: 900px) {
    font-size: 24px;
  }
  @media (min-width: 1680px) and (min-height: 960px) {
    font-size: 26px;
  }
}

.album {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.1;

  @media (min-width: 840px) and (min-height: 560px) {
  }
  @media (min-width: 1024px) and (min-height: 640px) {
    margin-top: 11px;
    font-size: 15px;
  }
  @media (min-width: 1140px) and (min-height: 740px) {
  }
  @media (min-width: 1360px) and (min-height: 820px) {
    margin-top: 12px;
    font-size: 16px;
  }
  @media (min-width: 1580px) and (min-height: 900px) {
    margin-top: 14px;
    font-size: 18px;
  }
}

.favourite {
  margin: 14px 0 11px;

  @media (min-width: 840px) and (min-height: 560px) {
  }
  @media (min-width: 1024px) and (min-height: 640px) {
    margin: 15px 0 12px;
  }
  @media (min-width: 1140px) and (min-height: 740px) {
  }
  @media (min-width: 1360px) and (min-height: 820px) {
    margin: 16px 0 13px;
  }

  &:last-child {
    margin-bottom: 0;
  }
}

.rating {
  margin: 16px 0;

  @media (min-width: 840px) and (min-height: 560px) {
  }
  @media (min-width: 1024px) and (min-height: 640px) {
    margin: 17px 0;
  }
  @media (min-width: 1140px) and (min-height: 740px) {
  }
  @media (min-width: 1360px) and (min-height: 820px) {
    margin: 18px 0;
  }

  &:last-child {
    margin-bottom: 0;
  }
}

.specs {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--color-opacity-04);

  @media (min-width: 840px) and (min-height: 560px) {
  }
  @media (min-width: 1024px) and (min-height: 640px) {
    margin-top: 11px;
  }
  @media (min-width: 1140px) and (min-height: 740px) {
  }
  @media (min-width: 1360px) and (min-height: 820px) {
    margin-top: 12px;
  }
  @media (min-width: 1580px) and (min-height: 900px) {
    font-size: 13px;
  }
}

//
// CONTROLS
//

.progress {
  margin-top: 60px;

  @media (min-width: 840px) and (min-height: 560px) {
    margin-top: 70px;
  }
  @media (min-width: 1024px) and (min-height: 640px) {
    margin-top: 80px;
  }
  @media (min-width: 1140px) and (min-height: 740px) {
    margin-top: 90px;
  }
  @media (min-width: 1360px) and (min-height: 820px) {
    margin-top: 100px;
  }
  @media (min-width: 1580px) and (min-height: 900px) {
  }
  @media (min-width: 1680px) and (min-height: 960px) {
  }
}

.controls {
  display: grid;
  justify-content: center;
  align-items: center;
  // grid-template-columns: minmax(0, 1fr) auto 1fr;
  grid-template-columns: 0 auto 1fr;
  margin: 30px auto 0;

  @media (min-width: 840px) and (min-height: 560px) {
    margin: 35px auto 0;
  }
  @media (min-width: 1024px) and (min-height: 640px) {
    margin: 40px auto 0;
  }
  @media (min-width: 1024px) {
    grid-template-columns: minmax(0, 1fr) auto 1fr;
  }

  a {
    &:hover {
      text-decoration: underline;
    }
  }
}

.rightCol {
  margin: 0 14px 0 auto;
}
