@import '../../../../colors.scss';

$select-icon-radius: 4px;

.dropdown {
  width: max-content;
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;

  button {
    padding-right: 35px;
    border: none;
    margin: 0;
    box-shadow: 0px 1px 2px 1px rgba(0,0,0,0.1);
    width: 100%;
    justify-content: left;

    &:focus {
      outline: 2px solid $blue;
    }
  }

  .icon {
    position: absolute;
    top: 0;
    right: 0;
    width: 1.5rem;
    background-image: linear-gradient($btn-primary-background-top, $btn-primary-background-bottom);
    color: white;
    height: 21px;
    right: 0;
    border-radius: 0 $select-icon-radius $select-icon-radius 0;
    display: flex;
    justify-content: center;
    align-items: center;

    mat-icon {
      font-size: 19px;
      display: flex;
      justify-content: center;
      align-items: center;
      padding-right: 2px;

      &:hover {
        cursor: default;
      }
    }
  }

  ul {
    position: absolute;
    top: 24px;
    background-color: #fff;
    border-radius: 4px;
    margin: 0;
    padding: .3rem 0;
    min-width: 150px;
    border: 1px solid #eee;
    display: none;
    flex-direction: column;

    &.show {
      display: flex;
    }

    li {
      list-style: none;
      padding: .2rem 1rem;
      
      &:hover {
        background-image: linear-gradient($btn-primary-background-top, $btn-primary-background-bottom);
        color: white;
        cursor: pointer;
      }
    }
  }
}
