@import '_variables';

.navbar-inner {
  font-size: 0.9rem;
  line-height: 1.5rem;
  height: 100%;
  display: flex;
  justify-content: space-between;

  a {
    font-weight: 500;
    color: var(--text-color);
  }

  #docsearch-container {
    display: flex;
    align-items: center;
    margin-left: 1.5rem;

    .DocSearch-Button {
      margin: 0;
    }

    // less than 1200px
    @media (max-width: ($desktop - 0.02px)) {
      & {
        margin-left: 1rem;
      }
    }
  }
}

// ------------------------------------ Site Brand ------------------------------------

.toggle-sidebar-button {
  display: none;
  cursor: pointer;
}

.site-brand {
  display: flex;
  align-items: center;

  a {
    display: flex;
    align-items: center;
    margin-right: 1.5rem;

    // less than 1200px
    @media (max-width: ($desktop - 0.02px)) {
      & {
        margin-right: 1rem;
      }
    }

    // less than 992px
    @media (max-width: ($tablet - 0.02px)) {
      & {
        margin-right: 0.5rem;
      }
    }
  }

  .logo-box {
    display: flex;
    flex-direction: column;
    justify-content: center;

    img {
      height: 2.6rem;
      min-width: 2.6rem;
    }
  }

  // 992px and up
  @media (min-width: $tablet) {
    .logo-with-title {
      margin-right: 0.5rem;
    }
  }

  .site-brand-title {
    font-size: 1.1rem;
  }
}

// ------------------------------------ Navbar Links ------------------------------------
.navbar-links-wrapper {
  flex: 1 1 auto;
  white-space: nowrap;
}

.navbar-links {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.navbar-links-item {
  position: relative;
  margin: 0 0.75rem;

  // less than 1200px
  @media (max-width: ($desktop - 0.02px)) {
    & {
      margin: 0 0.5rem;
    }
  }

  & > a {
    display: inline-block;

    // 992px and up
    @media (min-width: $tablet) {
      &.nav-link:not(.external) {
        margin-bottom: -2px;
        border-bottom: 2px solid transparent;
        transition: all 200ms cubic-bezier(0.22, 0.61, 0.36, 1);
      }

      &.router-link-active:not(.external) {
        border-bottom: 2px solid var(--theme-color);
      }
    }
  }
}

.navbar-links-item,
.navbar-features-item {
  &:first-child {
    margin-left: 0;
  }

  &:last-child {
    margin-right: 0;
  }
}

// ------------------------------------ Navbar Features ------------------------------------

.navbar-right {
  display: flex;
}

.navbar-features {
  height: 100%;
  display: flex;
  align-items: center;
  margin-left: 1.5rem;
}

.navbar-features-item {
  position: relative;
  margin: 0 0.75rem;

  button {
    display: flex;
    align-items: center;
    color: inherit;

    &:hover {
      color: var(--theme-color);
    }
  }
}

// ------------------------------------ Responsive ------------------------------------

// less than 992px
@media (max-width: ($tablet - 0.02px)) {
  .can-hide {
    display: none;
  }

  .navbar .toggle-sidebar-button {
    display: flex;
    align-items: center;
    margin-right: 0.5rem;
  }
}
