.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  &:focus {
    outline: 0;
  }
}

.dropdown.active {
  > .dropdown-picker {
    display: block;
  }

  > a {
    outline: 0;
  }
  .dropdown-caret {
    transform: rotate(180deg);
  }
}

.dropdown-picker {
  position: absolute;
  z-index: $zindex-dropdown;
  top: 100%;
  left: 0;
  display: none;
  min-width: 100%;
  transform-origin: center 0;
  animation: scaleIn .36s ease;
}

//menu
.dropdown-menu {
  @include scroll-reset();

  max-height: $dropdown-selection-max-height;
  padding: rem(8px) 0;
  overflow-y: auto;
  list-style: none;
  text-align: left;
  background-color: $dropdown-bg;
  box-shadow: $dropdown-box-shadow;
}

// Gap
.dropdown-gap {
  height: $dropdown-margin-top;
}

// Dividers
.dropdown-divider {
  height: 1px;
  overflow: hidden;
  background: $dropdown-divider-bg;
}

// Links, buttons, and more within the dropdown menu
.dropdown-item {
  display: block;
  width: 100%;
  padding: $dropdown-item-padding-y $dropdown-item-padding-x;
  line-height: $dropdown-item-line-height;
  cursor: pointer;
  white-space: nowrap;
  color: $dropdown-normal-color;
  border: 0;
  background: none;

  &:hover {
    text-decoration: none;
    color: $dropdown-link-hover-color;
    background-color: $dropdown-link-hover-bg;
  }

  // Disabled
  &.disabled {
    color: $dropdown-link-disabled-color;

    &:hover {
      cursor: not-allowed;
      text-decoration: none;
      color: $dropdown-link-disabled-color;
      background-color: transparent;
      background-image: none;
    }
  }
}

// Menu positioning
.dropdown-menu-right {
  right: 0;
  left: auto;
}

// Caret
.dropdown-caret {
  transition: $dropdown-caret-transition;
}
