//// <reference path="../../_color-definitions.scss" />
/// <reference path="../../_variables.scss" />
/// <reference path="../../_mixins.scss" />


.dropdown__menu {
  display: none;
  margin: 0;
  padding: 5px 0px 5px 30px;
  position: relative;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-pack: start;
  -ms-flex-pack: start;
  justify-content: flex-start;
  width: 100%;
  font-family: var(--base-font-family, $base-font-family);
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  list-style: none;
  z-index: 1000;

  @media only screen and (min-width: 768px) {
    padding: 5px 0;
    position: absolute;
    top: 100%;
    left: 0;
    width: auto;
    min-width: 160px;
    background-clip: padding-box;
    box-shadow: 0 2px 2px 0 rgba(0,0,0,.14), 0 3px 1px -2px rgba(0,0,0,.2), 0 1px 5px 0 rgba(0,0,0,.12);
    border-radius: 2px;
  }
}

.open .dropdown__menu {
  display: flex;
}

.dropdown__item {
  position: relative;

  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-negative: 0;
  flex-shrink: 0;
}

.dropdown__link {
  padding: 10px 15px;

  -webkit-box-flex: 1;
  -ms-flex-positive: 1;
  flex-grow: 1;

  font-size: 0.875rem;
  font-weight: 400;
  white-space: nowrap;
  text-decoration: none;

  -webkit-transition: background-color 200ms ease-out;
  transition: background-color 200ms ease-out;

  &:disabled,
  &[disabled] {
    color: #797979;
    cursor: not-allowed;
    user-select: none;
    pointer-events: none;

    &:hover,
    &:focus {
      background: none;
    }
  }


  @media only screen and (min-width: 768px) {
    padding: 15px 20px;
  }
}

/**** Nested dropdown styles ****/
.dropdown--nested {
  margin-left: 10px;

  @media only screen and (min-width: 768px) {
    margin-left: 0;
    top: 0;
    left: 101%;
  }
}

.dropdown__item.dropdown {
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;

  @media only screen and (min-width: 768px) {
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row;
  }

  & > .dropdown__link::after {
    display: inline-block;
    content: " ";
    float: right;
    width: 0;
    height: 0;
    border-color: transparent;
    border-style: solid;
    border-width: 5px 0 5px 5px;
    border-left-color: #cccccc;
    margin-top: 5px;
    margin-right: -10px;
  }

  &:not(.open) {
    .dropdown--nested {
      display: none;
    }
  }

}

.divider {
  height: 1px;
  margin: 1px 0;
  overflow: hidden;
  background-color: #797979;

  @media only screen and (min-width: 768px) {
    background-color: #e5e5e5;
  }
}
