.navbar .container,
.navbar-left,
.navbar-header,
.navbar nav ul,
.navbar-right {
  display: flex;
  align-items: center;
}

.navbar {
  position: static;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  justify-content: space-between;
  height: $navbar-height;
  padding: 16px 24px;
  border-bottom: 1px solid #d4dadf;
  box-shadow: 0 3px 8px 0 rgba(116, 129, 141, 0.1);
  background: #fff;

  @media (min-width: 768px) {
    position: fixed;
  }

  .container {
    max-width: 1448px;
    margin: 0 auto;
  }

  .navbar-left {
    flex: 1;

    @media (min-width: 1500px) {
      padding-left: 24px;
    }
  }

  .navbar-header {
    width: 100%;
    font-size: 1.1rem;

    @media (min-width: 768px) {
      width: #{$sidetoc-width - 24px};
      border-right: 1px solid #e6ecf1;
    }

    a {
      display: flex;
      align-items: center;
      text-decoration: none;
      color: inherit;
    }

    img {
      height: 48px;
      margin-right: 16px;
    }
  }

  nav,
  form {
    display: none;
    position: absolute;
    z-index: 3;
    top: $navbar-height;
    left: 0;
    right: 0;
    height: 73px;
    border-bottom: 1px solid #d4dadf;
    background: #fff;
  }

  nav {
    padding: 24px 9px;

    ul {
      flex: 1;
      margin: 0;
      padding: 0;
      list-style: none;
    }

    a {
      padding: 8px 16px;
      color: inherit;

      &.active {
        color: var(--primary);
      }
    }

    @media (min-width: 768px) {
      flex: 1;
      display: flex !important;
      position: relative;
      top: 0;
      height: initial;
      padding: 0 24px;
      border-bottom: none;
      background: none;
    }
  }

  form {
    display: none;
    align-items: center;
    box-shadow: 0px 5px 8px 0 rgba(116, 129, 141, 0.2);
    transition: all 0.2s ease-in-out;

    input {
      width: 100%;
      height: 100%;
      padding: 0 24px;
      border: none;
      outline: none;
    }

    @media (min-width: 768px) {
      padding-right: calc(((100vw - 1448px) / 2) + 385px);
    }
  }

  .navbar-right {
    height: 48px;
    padding-left: 8px;
    border-left: 1px solid #e6ecf1;

    svg {
      fill: #666;
    }
  }
}

#btn-toggle-nav {
  @media (min-width: 768px) {
    display: none;
  }
}
