.dropdown_menu {
  display: inline-block;
}

.dropdown_menu_button {
  background-color: $white;
  border: 1px solid $silver;
  border-radius: $radius;
  display: block;
  font-size: 14px;
  font-weight: bold;
  padding: 12px 16px;
  text-decoration: none;
  transition: all 250ms;

  &:after {
    border-color: currentColor transparent;
    border-style: solid;
    border-width: 3px 3px 0;
    content: '';
    display: inline-block;
    height: 0;
    margin-left: 10px;
    position: relative;
    top: -3px;
    width: 0;
  }

  &.disabled {
    color: $silver;
    cursor: not-allowed;
    opacity: 0.5;
  }

  &:not(.disabled) {
    @extend %button;

    + .dropdown_menu_list_wrapper {
      animation: scale-up 250ms forwards;
    }
  }
}

.dropdown_menu_list_wrapper {
  font-size: 14px;
  opacity: 0;
  position: absolute;
  transform-origin: center top;
  z-index: 20;
}

.dropdown_menu_nipple {
  background-color: $primary-color;
  height: 6px;
  position: absolute;
  top: -2px;
  transform: rotate(45deg);
  width: 6px;
  z-index: 21;
}

.dropdown_menu_list {
  background-color: $white;
  border: 2px solid $primary-color;
  border-radius: $radius;
  box-shadow: 1px 1px 3px rgba($silver, 0.75);
  list-style: none;
  overflow: hidden;
  position: relative;
  z-index: 22;

  li + li {
    border-top: 1px solid $silver;
  }

  a {
    display: block;
    padding: 10px 15px;
    text-align: center;
    text-decoration: none;
    transition: background-color 250ms;
    white-space: nowrap;

    &:hover {
      background-color: shade($white, 5%);
    }
  }
}
