@import (reference) '../style/variables.less';

ul[role='slug-list'] {
  &.__dumi-default-layout-toc {
    background-color: transparent;

    li a {
      @line-width: 2px;
      @left-distance: 4px;

      padding-left: 10px;

      &:after {
        content: '';
        position: absolute;
        left: calc(@left-distance + @line-width / 2);
        bottom: 0;
        width: 8px;
        height: 8px;
        border: 2px solid transparent;
        border-radius: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
      }

      &.active:after {
        border-color: #5970DD;
        background: none;
      }

      &:before {
        left: @left-distance;
        width: @line-width;
      }

      &.active:before {
        background: rgba(89, 112, 221, 0.12);
      }
    }
  }

  &:empty {
    margin: 0 !important;
    padding: 0 !important;
  }

  li {
    > a.active {
      color: darken(@c-primary, 2%);
    }

    &[data-depth='3'] {
      padding-left: 12px;
    }
  }
}
