@dorpdown-name: m-dropdown;


.@{dorpdown-name}{
  display: inline-block;
  position: relative;
  user-select: none;

  & .caret {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 2px;
    vertical-align: middle;
    border-top: 4px solid;
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
  }

  & &-panel{
    display: none;
    min-width: 100%;
    margin: 0;
    padding: 5px 10px;
    list-style: none;
    position: absolute;
    z-index: 1000;
    background: #fff;
    border-radius: 3px;
    box-shadow: 0px 2px 3px 1px rgba(0, 0, 0, 0.09);
    border: solid 1px #D9D9D9;
    box-sizing: border-box;
  }
  
  &.left &-panel{
    left: 0;
  }
  &.right &-panel{
    right: 0;
  }
  &.bottom &-panel{
    bottom: 100%;
  }
  &.top &-panel{
    top: 0;
  }
  &.open{
    background-color: rgba(0,0,0,0.05);
  }
  &.open &-panel{
    display: block;
  }
}

.@{dorpdown-name}-item {
  min-width: 100px;
  height: 35px;
  margin-left: -10px;
  margin-right: -10px;
  list-style: none;
  line-height: 35px;
  padding: 0px 10px;
  color: #282C34;
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;

  & > a {
    display: inline-block;
    width: 100%;
    color: inherit;
    margin-left: -10px;
    margin-right: -10px;
    padding: 0 10px;
  }
  &.active,
  &:hover {
    background: #f3f3f5;
    font-weight: 500;
    color: #212529;
  }
  &.disabled{
    cursor: not-allowed;
    color: #b3b3b3;
    background: inherit;
  }
}
