@import '../../../style/mixins/index';
@import '../../../style/theme/default/index';


.@{idoll-prefix}-anchor {
  .reset-component;
  position: relative;
  padding-left: @anchor-border-width;
  overflow: hidden;

  &-wrapper {
    background-color: @anchor-base-bg;
    overflow: auto;
    padding-left: @anchor-wrapper-padding;
    margin-left: -4px;
  }

  &-ink {
    position: absolute;
    height: 100%;
    left: 0;
    top: 0;
    &:before {
      content: ' ';
      position: relative;
      width: @anchor-border-width;
      height: 100%;
      display: block;
      background-color: @border;
      margin: 0 auto;
    }
    &-ball {
      display: none;
      position: absolute;
      height: 38px;
      border-left: 2px @border-style-base @primary-color;
      background-color: @primary-color;
      top: 51%;
      left: 50%;
      transition: top .3s ease-in-out;
      transform: translate(-50%, -38%);
      &.visible {
        display: inline-block;
      }
    }
  }

  &.fixed &-ink &-ink-ball {
    display: none;
  }

  &-link {
    padding: 7px 0 7px @padding-md;
    line-height: 1.143;

    &-title {
      display: block;
      position: relative;
      transition: all .3s;
      color: @text-color;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      margin-bottom: 6px;

      &:only-child {
        margin-bottom: 0;
      }
    }

    &-active > &-title {
      color: @primary-color;
    }
  }

  &-line-link {
    display: inline-block;
    padding: 12px @padding-lg - 1;
  }

  &-link &-link {
    padding-top: 5px;
    padding-bottom: 5px;
  }
}
