.nut-indicator {
  display: flex;
  width: auto;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;

  &-fixed-width {
    width: 21px;
  }

  &-dot,
  &-line {
    display: inline-block;
    vertical-align: middle;
    width: $indicator-dot-size;
    height: $indicator-dot-size;
    border-radius: 50%;
    background-color: $color-border-disabled;
    margin-left: $indicator-dot-margin;
    opacity: 0.4;

    &-0 {
      margin-left: 0px;
    }

    &-active {
      width: $indicator-dot-active-size;
      border-radius: $indicator-border-radius;
      background: $indicator-color;
      opacity: 1;
    }
  }

  // 固定宽度
  &-fixed-width {
    // 两个页码的时候
    .nut-indicator-dot {
      width: 12px;
      border-radius: $indicator-border-radius;

      &-active {
        width: 6px;
      }
    }
  }

  &-vertical {
    // 竖向固定高度
    &.nut-indicator-fixed-width {
      justify-content: flex-start;
      height: 21px;
      width: auto;

      // 竖向两个页码
      .nut-indicator-dot {
        width: 3px;
        height: 12px;
        border-radius: $indicator-border-radius;

        &-active {
          height: 6px;
        }
      }

      &.nut-indicator-fixed-width {
        &.nut-indicator-white {
          .nut-indicator-dot {
            &-active {
              height: 6px;
            }
          }
        }
      }
    }
  }

  &-line {
    width: $indicator-dot-active-size;
    margin: 0;

    border-radius: $indicator-border-radius;
    background-color: transparent;

    &-active {
      transition: transform 0.3s ease-in-out;
      background: $indicator-color;
    }
  }
}

.nut-indicator-track {
  position: relative;

  &:after {
    display: block;
    content: ' ';
    position: absolute;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    border-radius: $indicator-border-radius;
    background-color: $color-border-disabled;
    opacity: 0.4;
  }
}

.nut-indicator-white {
  .nut-indicator {
    &-dot,
    &-line {
      position: relative;
      /* #ifndef dynamic*/
      box-sizing: content-box;
      /* #endif */
      background: rgba(255, 255, 255, 0.4);
      opacity: 1;
    }

    &-line {
      opacity: 0;

      &-active {
        opacity: 1;
        background: rgba(255, 255, 255, 1);
      }
    }

    &-dot {
      &-active {
        background: rgba(255, 255, 255, 1);
      }
    }
  }
}

.nut-indicator-track.nut-indicator-white {
  &:after {
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.4);
  }
}

.nut-indicator-vertical {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  .nut-indicator {
    &-dot {
      margin: 0px;
      margin-top: $indicator-dot-margin;

      &-0 {
        margin-top: 0px;
      }

      &-active {
        width: $indicator-dot-size;
        height: $indicator-dot-active-size;
      }
    }
  }

  &.nut-indicator-track {
    .nut-indicator {
      &-line {
        width: $indicator-dot-size;
        height: $indicator-dot-active-size;
      }
    }
  }
}

[dir='rtl'] .nut-indicator,
.nut-rtl .nut-indicator {
  &-dot {
    &-0 {
      margin-right: $indicator-dot-margin;
      margin-left: 0px;
    }
  }
}
