//************************************************************************//
// Dropdown Menu
//************************************************************************//
nav .dropdown {
  &.open > .dropdown-menu {
    display: flex; // Open dropdown menu on click
  }
}

.dropdown {
  &.open > .dropdown-menu {
    display: block; // Open dropdown menu on click, but make it vertical
  }
}

// Global Dropdown Menu Styles
//************************************************************************//
.nav-item .dropdown-menu {
  @include ui-dropdown(center, $width: 200px, $nub-bg-color: $nav-bg, $nub-border-color: none);
  background: $nav-bg;
  border: 0;
  border-radius: 3px;
  box-shadow: none;
  margin-top: 14px;

  // Remove nub
  @include media($small-screen){
    &:before, &:after {
      display: none;
    }
  }

  ol {
    overflow: visible;
  }

  li a {
    @extend %nav-anchor;
    line-height: 1.2;
    margin: 0;
    padding: 12px 15px;
    text-align: left;
  }
}

// Submenu
//************************************************************************//
li.dropdown-submenu {
  position: relative;
  @include clearfix;

  > a {
    padding-right: 30px;
    position: relative;
    font-size: $base-font-size-small-1;
    font-weight: bold;

    @include media($mobile){
      font-size: $base-font-size-small-2 - 1;
      line-height: 1.4em;
    }

    &:after {
      @include triangle(12px, hsla(0, 0%, 100%, 0.6), right);
      position: absolute;
      content: "";
      top: 50%;
      margin-top: -6px;
      right: 8px;
    }
  }

  .dropdown-menu {
    width: 200px;
    @include border-left-radius(0);
    display: none;
    top: 0;
    left: 100%;
    margin-top: -1px;
    margin-left: -1px;
    border-left: 1px solid darken($nav-bg, 5%);

    &:before, &:after {
      display: none;
    }
  }

  &:hover {
    background: $nav-hover;

    .show-submenu {
      background: $nav-hover;
      color: #fff;
    }

    > .dropdown-menu {
      display: block;
    }
  }

  li.title {
    border-top-right-radius: 2px;
    text-transform: uppercase;
    font-size: $base-font-size-small-2 - 1;
    color: $nav-color;
    padding: 3px 15px;
    font-weight: bold;
    background: $header-background-2;
  }
}
