@import "variables";

.trackWrapper {
  transition: 0.3s ease-out;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  outline: none;

  font-size: 12px;
  color: #ddd;
  background-color: inherit;
  width: 100%;
  min-height: 65px;
  padding: 1rem 2rem;
  border-radius: 7px;
  box-sizing: border-box;

  .trackImageWrap {
    position: relative;
    min-width: 3rem;
    min-height: 3rem;
    height: 3rem;
    width: 3rem;
    margin-right: 1rem;
    border-radius: 7px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;

    img {
      max-height: 100%;
      width: auto;
    }
  }

  .titleWrapper {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;

    > div {
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
  }

  .trackRightControls {
    margin-left: auto;
    min-width: 45px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  svg {
    color: $bgAccent;
  }

  &:focus,
  &:hover {
    background-color: $bg12;

    .singleSource,
    .trackSettingsButton {
      display: block;
      animation: fadeInFromNone 0.3s ease-out;
      display: block;
    }
  }

  &:hover * {
    opacity: 1;
  }
}

.stackedArtistName {
  color: $primaryLightest;
  cursor: pointer;
  text-decoration: none;

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

.trackSettingsButton,
.singleSource {
  opacity: 0;

  color: $bgAccent;
  padding: 5px 10px;

  svg {
    color: inherit;
  }
}

.singleSource {
  display: none;
}

.notStreamable {
  opacity: 0.4;
  cursor: default;
}

.playingNow {
  background-color: $bg12;

  * {
    opacity: 1;
  }

  .trackImageWrap div {
    opacity: 1;
  }
}

.trackDropdown {
  position: absolute;
  top: 4rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  background-color: $bg16;
  padding: 0.5rem;
  padding-left: 0.7rem;
  box-shadow: 0 1rem 1rem rgba(0, 0, 0, 0.2);
  z-index: 1;

  > button {
    margin-top: 0.5rem;
  }

  .dropdownOption {
    margin: 3px 0;
    color: $smallheader;
    display: flex;
    width: inherit;
    padding-left: 0;
    cursor: pointer;
    outline: none;
    transition: 0.1s ease-out;

    span:first-child {
      padding-right: 0.5rem;
      width: 1rem;
    }

    &:hover {
      color: white;
    }

    &:active {
      color: $primary;
    }
  }
}

.queueTrackItem {
  background-color: transparent;

  &:hover,
  &:focus {
    background-color: transparent;
  }

  .removeFromQueueButton {
    display: none;
  }

  &:hover .duration,
  .singleSource {
    display: none;
  }

  &:hover .removeFromQueueButton {
    display: block;
  }
}

.formTrackTitle {
  display: flex;
  flex-direction: column;
  align-items: center;

  font-size: 13px;
  text-align: center;
  font-weight: bold;
  color: white;
  width: 100%;

  div {
    max-width: 90%;
    margin: 0 10px;
    flex-grow: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    box-sizing: border-box;
  }
}

@media (min-width: 800px) {
  .singleSource {
    margin-right: 30px;
  }
}

@media (min-width: 1025px) {
  .dropDownButton {
    margin-left: 0;
  }
}

@media (min-width: 1400px) {
}

@media (min-width: 1600px) {
}
