@import "../../base.less";

@import "./_var.less";

.@{prefix}-indexes-anchor {
  color: @indexes-anchor-color;
  font-size: @indexes-anchor-font-size;
  line-height: @indexes-anchor-line-height;

  &__header {
    display: none;
    padding: 4px 16px;
    background-color: @indexes-anchor-bg-color;

    &--active {
      background-color: @indexes-anchor-active-bg-color;
      .border(bottom);
    }
  }

  &__slot {
    overflow: hidden;
  }

  &__slot:empty + &__header {
    display: block;
  }

  &__wrapper {
    will-change: transform;

    &--sticky {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      z-index: 1;
    }

    &--active {
      color: @indexes-anchor-active-color;
      font-weight: @indexes-anchor-active-font-weight;
    }
  }
}
