.autocomplete {
    /*the container must be positioned relative:*/
    position: relative;
    display: inline-block;
}
.autocomplete input[type=text]{
    padding-right: 26px;
}
.autocomplete > .icon {
    content: '';
    display: block;
    position: absolute;
    right: 1px;
    top: 5px;
    bottom: 5px;
    width: 23px;
    /*background: url('icon-search.png') 5px 5px no-repeat;*/
    border-left: 1px solid darkgray;
    cursor: pointer;
}
.autocomplete.has-tip .autocomplete-items::before{
    position: absolute;
    top: -6px;
    left: 11px;
    content: "";
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid darkgray;
    display: inline-block;
}
.autocomplete.has-tip .autocomplete-items::after{
    position: absolute;
    top: -4px;
    left: 12px;
    content: "";
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 4px solid #fff;
    display: inline-block;
}
.autocomplete.has-tip .autocomplete-items.is-above::before{
    top: auto;
    bottom: -6px;
    border-bottom: none;
    border-top: 5px solid darkgray;
}
.autocomplete.has-tip .autocomplete-items.is-above::after{
    top: auto;
    bottom: -4px;
    border-bottom: none;
    border-top: 4px solid #fff;
}
.autocomplete .autocomplete-items {
    position: absolute;
    border: 1px solid #d4d4d4;
    border-bottom: none;
    border-top: none;
    z-index: 99;
    /*position the autocomplete items to be the same width as the container:*/
    top: 100%;
    left: 0;
    right: 0;
    border-bottom: 1px solid lightgray;
    border-top: 1px solid lightgray;
    background-color: white;
    box-shadow: 0 5px 10px rgba(0,0,0,0.2);
}
.autocomplete .autocomplete-items.is-above {
    border-bottom: none;
    border-top: 1px solid lightgray;
    top: 0px;
    transform: translateY(-100%);
    box-shadow: 0 -5px 10px rgba(0,0,0,0.2);
}
.autocomplete .autocomplete-items ul{
    overflow-y: auto;
    max-height: 270px;
    padding: 0;
    margin: 0;
}
.autocomplete .autocomplete-items li {
    padding: 5px 0 5px 6px;
    cursor: pointer;
    background-color: #fff;
    border-bottom: 1px solid #d4d4d4;
    display: block;
}
.autocomplete .autocomplete-items li:last-child {
    border-bottom: none;
}

.autocomplete .autocomplete-items li:hover {
    /*when hovering an item:*/
    background-color: #e9e9e9;
}
.autocomplete.no-wrap .autocomplete-items li {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}
.autocomplete .autocomplete-active {
    /*when navigating through the items using the arrow keys:*/
    background-color: DodgerBlue !important;
    color: #ffffff;
}