@import (reference) "../../../assets/css/index";
@prefixClass: ~'@{fishd-prefix}-audio-player';
@sliderPrefixClass: ~"@{fishd-prefix}-slider";

.@{prefixClass} {
  position: relative;
  width: 100%;
  height: @audio-player-height-base;
  &-wrap {
    display: flex;
    align-items: center;
    border: @border-width-base @border-style-base @border-color-base;
    border-radius: @border-radius-base;
    padding: 0 @audio-player-padding-base;
    height: 100%;
    .box {
      text-align: center;
    }
    // 播放区
    .pause-play-box {
      width: @audio-player-height-base;
      height: 100%;
      line-height: @audio-player-height-base - 2px;
    }
    .pause-play-box-enable {
      cursor: pointer;
    }
    .pause-play-box-disabled > i {
      cursor: not-allowed;
    }
    //进度区
    .step-box {
      flex: 1;
      padding: 0 @audio-player-padding-base;
    }
    .time-box {
      padding: 0 @audio-player-padding-base;
    }
    //音量调节区
    .volume-box {
      width: 30px;
      height: 100%;
      line-height: @audio-player-height-base - 2px;
    }
    // 播放速度调节区
    .rate-box {
      padding: 0 6px;
      height: 100%;
      line-height: @audio-player-height-base - 2px;
      cursor: pointer;
      margin-bottom: 0;
    }
    //下载区
    .download-box {
      width: 30px;
      height: 100%;
      line-height: @audio-player-height-base - 2px;
      a {
        color: @text-6;
      }
    }
    .handle-audio-icon {
      cursor: pointer;
      color: @text-6;
      &:hover {
        color: @text-3;
      }
    }
  }
  &-sm {
    height: @audio-player-height-sm;
    &-wrap {
      // 播放区
      padding: 0 @audio-player-padding-sm;
      .pause-play-box {
        width: @audio-player-height-sm;
        height: 100%;
        line-height: @audio-player-height-sm - 2px;
      }
      //进度区
      .step-box {
        padding: 0 @audio-player-padding-sm;
      }
      .time-box {
        padding: 0 @audio-player-padding-sm;
        font-size: 12px;
      }
      //音量调节区
      .volume-box {
        width: 30px;
        height: 100%;
        line-height: @audio-player-height-sm - 2px;
      }
      // 播放速度调节区
      .rate-box {
        padding: 0 6px;
        height: 100%;
        line-height: @audio-player-height-sm - 2px;
        cursor: pointer;
        margin-bottom: 0;
      }
      //下载区
      .download-box {
        width: @audio-player-height-sm;
        height: 100%;
        line-height: @audio-player-height-sm - 2px;
      }
    }
  }
  .change-audio-volume {
    &-box {
      width: 30px;
      height: 150px;
    }
    &-slider {
      height: 120px;
      text-align: center;
    }
    &-value {
      font-size: 12px;
      letter-spacing: 0;
      text-align: center;
    }
    &-customer-handle {
      width: 20px;
      height: 13px;
      background-color: #666;
      border-radius: 4px;
      line-height: 10px;
      text-align: center;
      border: 1px solid #fff;
      i {
        color: #fff;
        font-size: 12px;
      }
    }

    // Popover样式覆盖
    .fishd-popover-inner-content {
      padding: 11px 4px;
    }

    //Slider样式覆盖
    .@{sliderPrefixClass} {
      margin: 6px 9px;
      &-handle {
        border: none;
        margin-left: -8px;
      }
      &-handle-custom {
        border-radius: 4px;
      }
    }
  }

  .change-audio-rate-item {
    margin-bottom: 6px;
    word-break: normal;
    white-space: nowrap;
    cursor: pointer;
    &:last-child {
      margin-bottom: 0;
    }
    &:hover {
      color: @primary-color;
    }
  }

  //Slider样式覆盖
  .@{sliderPrefixClass} {
    margin: 10px 6px;
    &-track {
      background-color: fade(#666, 80%);
    }

    &-handle {
      border: solid 2px fade(#666, 80%);

      &:focus {
        border-color: #666;
        box-shadow: none;
      }

      &.@{fishd-prefix}-tooltip-open {
        border-color: #666;
      }
    }

    &:hover {
      .@{sliderPrefixClass}-rail {
        background-color: #e1e3e6;
      }
      .@{sliderPrefixClass}-track {
        background-color: #666;
      }
      .@{sliderPrefixClass}-handle:not(.@{fishd-prefix}-tooltip-open) {
        border-color: #666;
      }
    }
    &-dot {
      border: 2px solid @border-color-split;
      &-active {
        border-color: fade(#666, 80%);
      }
    }
  }
}
