@import "../../style/themes/default";
@import "../../style/mixins/index";

@timeline-prefix-cls: ~"@{ui-prefix}-timeline";
@timeline-color: @border-color-split;

.@{timeline-prefix-cls} {
  .reset-component;
  list-style: none;
  margin: 0;
  padding: 0;

  &__item {
    position: relative;
    padding: 0 0 20px;
    list-style: none;
    margin: 0;
    font-size: @font-size-base;

    &_pending &-head {
      font-size: @font-size-sm;
    }

    &_pending &-tail {
      display: none;
    }

    &_last {
      .@{timeline-prefix-cls}-item-tail {
        border-left: 2px dotted @timeline-color;
        display: none;
      }
      .@{timeline-prefix-cls}-item-content {
        min-height: 48px;
      }
    }
  }
  &-item {
    &__tail {
      position: absolute;
      left: 4px;
      top: 0.75em;
      height: 100%;
      border-left: 2px solid @timeline-color;
    }
    &__content {
      padding: 0 0 0 18px;
      position: relative;
      top: -6px; //-(@font-size-base * @line-height-base - @font-size-base) + 1
    }
    &__head {
      position: absolute;
      width: 10px;
      height: 10px;
      background-color: @component-background;
      border-radius: 100px;
      border: 2px solid transparent;

      &_blue {
        border-color: @primary-color;
        color: @primary-color;
      }
      &_red {
        border-color: @error-color;
        color: @error-color;
      }
      &_green {
        border-color: @success-color;
        color: @success-color;
      }
      &_custom {
        position: absolute;
        text-align: center;
        line-height: 1;
        margin-top: 0;
        border: 0;
        height: auto;
        border-radius: 0;
        padding: 3px 0;
        transform: translate(-50%, -50%);
        top: 5px;
        left: 5px;
        width: auto;
      }
    }
  }

  &&_pending &__item_last &__item_tail {
    display: block;
  }
}
