@import "./variables";

.subnav {

  background-color: var(--dark);
  box-sizing: border-box;
  color: white;
  overflow: hidden;
  z-index: var(--foreground);

  &.scroll {
    position: fixed;
  }

  &.sticky.visible {
    position: fixed;
  }

  &.top {
    height: var(--subnav-size);
    left: 0;
    transition: top 0.2s;
    top: 0;
    width: 100%;

    &.scroll.hidden {
      top: calc(var(--subnav-size) * -1);
    }
  }

  &.right {
    height: 100vh;
    right: 0;
    transition: right 0.2s;
    top: 0;
    width: var(--subnav-size);

    &.scroll.hidden {
      right: calc(var(--subnav-size) * -1);
    }
  }

  &.left {
    height: 100vh;
    left: 0;
    transition: left 0.2s;
    top: 0;
    width: var(--subnav-size);

    &.scroll.hidden {
      left: calc(var(--subnav-size) * -1);
    }
  }

  &.bottom {
    bottom: 0;
    height: var(--subnav-size);
    transition: bottom 0.2s;
    top: 0;
    width: 100%;

    &.scroll.hidden {
      bottom: calc(var(--subnav-size) * -1);
    }
  }

  & .topic,
  & .section {

    & > a { color: white; }
    &.active > a { color: var(--accent); }

  }

}
