// =============================================================================
// _DROPDOWNS.SCSS
// -----------------------------------------------------------------------------
// Site styles.
// =============================================================================

// =============================================================================
// TABLE OF CONTENTS
// -----------------------------------------------------------------------------
//   01. Desktop Base Styles
//   02. Desktop Masthead Positioning: Inline
//   03. Desktop Masthead Positioning: Stacked
//   06. Portfolio Filters
// =============================================================================

// Desktop Base Styles
// =============================================================================

.desktop {
  .menu-item,
  .menu-item > a {
    position: relative;
  }

  .menu-item.x-active > .sub-menu {
    display: block;
  }

  .sub-menu {
    position: absolute;
    right: 0;
    display: none;
    float: left;
    min-width: 200px;
    margin: 0;
    border: 1px solid $baseBorderSolid;
    border: 1px solid $baseBorderRgba;
    padding: $dropdownPadding;
    @include font-size(1.4);
    list-style: none;
    background-color: $baseModBackground;
    z-index: $zindexDropdown;
    @include translate3d(0, 0, 0);

    a {
      display: block;
      clear: both;
      border: 0;
      padding: $dropdownLinkPadding;
      line-height: $baseLineHeight;
      white-space: nowrap;
      color: $dropdownLinkColor;
      @include transition(#{none});

      &:hover {
        text-decoration: none;
        color: $dropdownLinkColorHover;
      }
    }

    .x-active > a,
    .current-menu-item > a {
      color: $dropdownLinkColorHover;
    }
  }
}



// Desktop Masthead Positioning: Inline
// =============================================================================

.masthead-inline {
  .x-navbar {
    .desktop .sub-menu {
      left: auto;
      right: 0;

      .sub-menu {
        top: $dropdownTop;
        right: $dropdownOffset;
      }
    }

    &.x-navbar-fixed-left {
      .desktop .sub-menu {
        top: 0;
        left: $dropdownFirstSide;
        right: auto;

        .sub-menu {
          top: $dropdownTop;
          left: $dropdownOffset;
          right: auto;
        }
      }
    }

    &.x-navbar-fixed-right {
      .desktop .sub-menu {
        top: 0;
        left: auto;
        right: $dropdownFirstSide;

        .sub-menu {
          top: $dropdownTop;
          left: auto;
          right: $dropdownOffset;
        }
      }
    }
  }
}



// Desktop Masthead Positioning: Stacked
// =============================================================================

.masthead-stacked {
  .x-navbar {
    .desktop .sub-menu {
      left: 0;
      right: auto;

      .sub-menu {
        top: $dropdownTop;
        left: $dropdownOffset;
      }
    }
  }
}



// Portfolio Filters
// =============================================================================

.x-portfolio-filters-menu {
  display: none;
}

.no-js .x-portfolio-filters-menu {
  display: block;
}