@import "../../styles/helper";

$mini-player-height: 80px;

#mini-player-collapsed,
#mini-player {
  bottom: 20px;
  left: 0;
  z-index: 6;
}

#mini-player-collapsed {
  margin-left: 15px;
  height: 20px;
  .icon {
    width: 30px;
    height: 30px;
    cursor: pointer;
  }
}

#mini-player {
  margin-left: 30px;
  display: flex;
  justify-content: flex-start;
  height: $mini-player-height;
  bottom: -$mini-player-height;
  animation: mini-player 260ms 600ms ease forwards;
  @keyframes mini-player {
    0% {
      transform: none;
    }
    100% {
      transform: translateY(-($mini-player-height + 10px));
    }
  }

  #mini-player-operation {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    .icon {
      display: block;
      width: 20px;
      height: 20px;
      @include cursor;
    }
  }

  #mini-player-cover {
    height: $mini-player-height;
    width: $mini-player-height;
    background-size: cover;
    background-position: center;
    border-color: white;
    margin: 0 12px;
    background-color: black;
    box-shadow: 0 0 30px 5px rgba(0, 0, 0, 0.35);
    @include transition;
    @include cursor;
    @include thin-border;
    &:hover {
      transform: scale(1.05);
      box-shadow: none;
      .icon {
        opacity: 0.8;
      }
    }
    .icon {
      width: 100%;
      height: 100%;
      opacity: 0;
      background-color: rgba(0, 0, 0, 0.3);
      @include transition;
    }
  }

  #mini-player-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 20vw;
    max-width: 300px;

    #mini-player-info-text {
      position: relative;
      top: -5px;
      & > p {
        text-overflow: ellipsis;
        white-space: nowrap;
        overflow: hidden;
        word-break: break-word;
      }
      #mini-player-info-name {
        font-size: 1em;
      }
      #mini-player-info-album {
        font-size: 0.7em;
      }
    }

    #mini-player-controller {
      .icon {
        height: 28px;
        width: auto;
        margin-right: 6px;
        @include cursor;
        &.play,
        &.play-mode {
          margin-left: 7px;
        }
      }
    }

    #mini-player-progress {
      width: 100%;
      height: 2px;
      background-color: rgba(255, 255, 255, 0.3);
      position: relative;
      & > div {
        height: 100%;
        position: absolute;
        left: 0;
        top: 0;
        background-color: white;
      }
    }
  }
}
