@import '../../style/mixins';
@import '../../style/themes/default';
@import '../../slider/style/index';

@audioPrefixCls: fm-audio;

.@{audioPrefixCls} {
  display: flex;
  align-items: center;
  height: @audio-size;
  border: @border-width-sm solid @border-color-base;
  background-color: @fill-base;
  border-radius: @radius-lg;

  /* elements */
  &-voice {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: @audio-icon-size;
    height: @audio-icon-size;
    margin-left: 20 * @hd;
    box-sizing: border-box;
    border: @border-width-lg solid @brand-primary;
    border-radius: 50%;

    &-icon {
      position: relative;
      width: 16 * @hd;
      height: 16 * @hd;
      box-sizing: border-box;
      overflow: hidden;
      transform: rotate(-45deg) translate3d(2px, 2px, 0);

      &-circle {
        box-sizing: border-box;
        border: @border-width-lg solid @brand-primary;
        border-radius: 50%;
        position: absolute;
      }

      &-one {
        background: @brand-primary;
        width: 7px;
        height: 7px;
        top: -3px;
        left: -3px;
      }

      &-two {
        width: 31px;
        height: 31px;
        top: -20px;
        left: -20px;

        &-anim {
          opacity: 0;
          animation: animTwo 2s infinite 0s;
        }
      }

      &-three {
        width: 41px;
        height: 41px;
        top: -25px;
        left: -25px;

        &-anim {
          opacity: 0;
          animation: animThree 2s infinite 0s;
        }
      }
    }
  }

  &-slider {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    position: relative;
    margin: -8px 20px 0 20px;
    box-sizing: border-box;
  }

  &-time {
    font-size: @font-size-caption-sm;
    display: flex;
    justify-content: space-between;
    box-sizing: border-box;
    width: 100%;
    position: absolute;
    top: 10px;
  }
}

@keyframes animTwo {
  0%,
  25% {
    opacity: 0;
  }

  50%,
  100% {
    opacity: 1;
  }
}

@keyframes animThree {
  0%,
  25%,
  75% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}
