.autocomplete {
    position: relative;
}

.autocomplete [type=text] {
    -webkit-appearance: none;
    border-radius: 0;
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    width: 100%;
    font-size: inherit;
    font-family: inherit;
    line-height: 1.25;
    padding: 0.5em;
    border: 2px solid $colour-gray-600;
}

.autocomplete-isFocused {
    outline-offset: 0;
    outline: 3px solid $colour-yellow-500;
}

.autocomplete-button {
    position: absolute;
    right: .1em;
    top: .1em;
    -webkit-appearance: none;
    border: none;
    background-color: $colour-gray-100;
    font-size: 2em;
    line-height: 0.8em;
    padding: .1em .35em;
    overflow: hidden;
}

.autocomplete svg {
    position: absolute;
    right: 0.6em;
    width: 1.5em;
    height: 1.5em;
    top: 0.8em;
    fill: $colour-gray-700;
}

.autocomplete [role=listbox] {
    margin: 0;
    max-height: 12em;
    overflow-y: auto;
    overflow-y: scroll; /* has to be scroll, not auto */
  	-webkit-overflow-scrolling: touch;
    position: relative;
    font-size: 100%;
    padding: 0;
    position: absolute;
    top: 2.3em;
    width: 100%;
    background-color: $colour-gray-100;
    border-radius: 0;
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    z-index: 2;
    border: 2px solid $colour-gray-600;
}

.autocomplete [role=option] {
    line-height: 22px;
    padding: 0.5em;
    display: block;
    border-bottom: 2px solid $colour-gray-600;
    outline: none;
    margin: 0;
}

.autocomplete-optionNoResults {
    line-height: 22px;
    padding: 0.5em;
    display: block;
    border-bottom: 2px solid $colour-gray-600;
    cursor: not-allowed;
}

.autocomplete [role=option]:hover,
.autocomplete [role=option][aria-selected="true"] {
    background-color: $colour-green-600;
    border-color: $colour-green-600;
    color: $colour-gray-100;
}