@import "mixins/mixins";
@import "common/var";

@include b(timeline-item) {
  position: relative;
  padding-bottom: 20px;

  @include e(wrapper) {
    position: relative;
    padding-left: 28px;
    top: -3px;
  }

  @include e(tail) {
    position: absolute;
    left: 4px;
    height: 100%;
    border-left: 2px solid $--timeline-node-color;
  }

  @include e(icon) {
    color: $--color-white;
    font-size: $--font-size-small;
  }

  @include e(node) {
    position: absolute;
    background-color: $--timeline-node-color;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;

    @include m(normal) {
      left: -1px;
      top: 3px;
      width: $--timeline-node-size-normal;
      height: $--timeline-node-size-normal;
      
      &:after {
          content: '';
          display: block;
          width: $--timeline-node-size-normal - 4px;
          height: $--timeline-node-size-normal - 4px;
          background-color: #fff;
          border-radius: 50%;
          position: absolute;
          top: 2px;
          left: 2px;
      }
    }
    @include m(large) {
      left: -2px;
      top: 2px;
      width: $--timeline-node-size-large;
      height: $--timeline-node-size-large;
      
      &:after {
          content: '';
          display: block;
          width: $--timeline-node-size-large - 4px;
          height: $--timeline-node-size-large - 4px;
          background-color: #fff;
          border-radius: 50%;
          position: absolute;
          top: 2px;
          left: 2px;
      }
    }

    @include m(primary) {
      background-color: $--color-primary;
    }
    @include m(success) {
      background-color: $--color-success;
    }
    @include m(warning) {
      background-color: $--color-warning;
    }
    @include m(danger) {
      background-color: $--color-danger;
    }
    @include m(info) {
      background-color: $--color-info;
    }
  }

  @include e(dot) {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  @include e(content) {
    font-size: $--font-size-base;
    color: $--color-text-primary;
    font-weight: $--font-weight-primary;
    line-height: 26px;
  }

  @include e(timestamp) {
    // font-size: $--font-size-base;
    // color: $--color-text-primary;
    font-weight: $--font-weight-primary;
    line-height: 26px;
    
    font-size: $--font-size-small;
    color: $--color-black-45;

    @include when(top) {
      // margin-bottom: 8px;
      margin-bottom: 6px;
      // padding-top: 4px;
    }
    @include when(bottom) {
      // margin-top: 8px;
      margin-top: 6px;
    }
  }
}
