.autocomplete {
  display: flex;
  flex-direction: column;
  position: relative;

  .autocomplete-search {
    position: relative;

    form {
      display: flex;
      align-items: center;
      background-color: $base-white;
    }

    input {
      padding: $base-spacing;
      padding-right: 44px; // to accommodate glass icon overlaying long text
      width: 100%;
      height: 50px;
      border: 1px solid $boulder-400;
      outline: none;

      &:focus {
        color: $base-black;
        border-color: $sky-blue-500;
      }
    }

    .search-button {
      position: absolute;
      right: 0;
      width: 36px;
      height: 36px;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-right: $base-spacing-half;
      border-radius: 2px;
      cursor: default;
    }
  }

  .autocomplete-menu {
    list-style: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    margin-top: 4px;
    width: 100%;
    padding: 0;
    z-index: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: none;
    opacity: 0;
    transition: opacity ease-out 0.3s;
    max-height: 300px;
    overflow-y: auto;

    li {
      display: flex;
      letter-spacing: 0.5px;
      line-height: 1;
      width: 100%;
      color: #757575;
      font-size: 16px;
      transition: background-color ease-out 0.3s;

      label {
        padding: 16px;
        cursor: pointer;
        width: 100%;
        display: inline-flex;
        align-items: baseline;
        line-height: 1.25;

        input {
          margin-right: 16px;
        }
      }

      &:not(.select-menu-title):hover {
        background-color: #B3B3B3;
        color: #FFFFFF;

        label {
          color: #FFFFFF;
        }
      }

      &.active {
        background-color: #757575;
        color: #FFFFFF;

        label {
          color: #FFFFFF;
        }
      }
    }

    &.showing {
      display: flex;
      flex-wrap: wrap;
    }

    &.show {
      opacity: 1;
    }

    &.right {
      left: unset;
      right: 0;
    }
  }
}
