@import '../../common/scss/variable.scss';

.play-list {
  position: relative;
  height: 100%;
  width: 300px;
  padding-top: 10px;
  background: $color-dark;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
  box-shadow: 0 0 12px 0 rgba(0, 0, 0, 0.664);
  z-index: 10;

  .without-music {
    margin-top: 150px;
    text-align: center;
    font-size: $font-size-x;
    color: $color-text-gray;
  }

  .list-info {
    position: absolute;
    width: 100%;
    height: 23px;
    font-size: $font-size-m;
    color: $color-text-gray;
    background: $color-dark;

    .music-count {
      position: absolute;
      left: 20px;
    }

    .delete {
      position: absolute;
      right: 20px;
      cursor: pointer;
    }
  }

  ul {
    margin-top: 23px;
    height: calc(100vh - 90px - 33px);
    overflow-y: scroll;
    overflow-x: hidden;
  }

  li {
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 9px 10px 9px 20px;
    list-style-type: none;
    font-size: $font-size-l;
    color: $color-text;
    border-bottom: 1px solid rgb(8, 8, 8);
    transition: all 0.3s;

    &:hover {
      background: $color-dark-gray;
    }

    .music-name {
      margin-bottom: 5px;
      box-sizing: border-box;
    }

    .singer-name {
      font-size: $font-size-m;
      color: $color-text-gray;
    }

    .singer-name, .music-name {
      display: inline-block;
      max-width: 220px;
      text-overflow: ellipsis; //让超出的用...实现
      white-space: nowrap; //禁止换行
      overflow: hidden; //超出的隐藏

      span {
        cursor: pointer;
        
        &:hover {
          color: $color-theme;
        }
      }
    }
    
    i {
      position: absolute;
      top: 16px;
      right: 22px;
      color: $color-text-gray;
      cursor: pointer;

      &:hover {
        color: $color-theme;
      }
    }
  }

  .action::before {
    position: absolute;
    top: 1px;
    left: 0;
    content: '';
    display: inline-block;
    width: 5px;
    height: 51px;
    background: $color-theme;
  }
}