.search {
    display: block;
    width: 300px;
    margin: 15px auto;
}

.search-bar {
    width: 100%;
    position: relative;
    margin-bottom: 5px;
}

.search-bar>input {
    width: calc(100% - 40px);
    height: 40px;
    line-height: 40px;
    padding: 1px 6px;
    box-sizing: border-box;
    font-size: 1em;
    border: 1px solid #d5d5d5;
    border-right: none;
}

.search-bar>input:focus {
    outline: 0;
    padding: 0 5px;
    border: 2px solid #65bcd4;
    border-right: none;
}

.search-bar>button {
    position: absolute;
    right: 0;
    top: 0;
    width: 40px;
    height: 40px;
    border: none;
    padding: 0;
    margin: 0;
    font-size: 20px;
    background-color: #65bcd4;
    cursor: pointer;
}

.search-bar>button:hover {
    background-color: #4c91a4;
}

.search-results {
    position: relative;
    width: 100%;
    height: 150px;
    overflow-y: scroll;
    box-sizing: border-box;
    background-color: white;
    border: 1px solid #d5d5d5;
}

.search-results-none {
    display: none;
}

.search-results-state-no-results .search-results-none {
    display: block;
    padding: 8px;
    text-align: center;
}

.search-results-error {
    display: none;
}

.search-results-state-failed .search-results-error {
    display: block;
    padding: 8px;
    color: red;
    text-align: center;
}

.search-results .loader {
    display: none;
}

.search-results-state-loading .loader {
    display: block;
}

.search-results .search-results-items {
    display: none;
}

.search-results-state-some-results .search-results-items {
    display: block;
}

.search-result {
    padding: 8px;
    display: block;
    border-bottom: 1px solid #d5d5d5;
    cursor: pointer;
}

.search-result:hover {
    background-color: #f0f0f0;
}

.search-result>* {
    pointer-events: none;
}

.search-result-extra {
    font-size: 0.8em;
    color: #999;
    display: block;
}