/* Type-to-filter combobox that progressively enhances a plain <select>.
   The native select stays in the DOM (hidden) so it keeps carrying the value
   into the form submit and keeps working when this stylesheet/script fails. */

.searchable-select {
    position: relative;
    display: block;
    width: 100%;
}

select.searchable-select__native {
    display: none !important;
}

.searchable-select__input {
    width: 100%;
    cursor: pointer;
    text-overflow: ellipsis;
}

.searchable-select__input:focus {
    cursor: text;
}

.searchable-select.is-disabled .searchable-select__input {
    background-color: #f3f1ee;
    cursor: not-allowed;
}

.searchable-select__panel {
    position: absolute;
    top: calc(100% + 0.3rem);
    left: 0;
    right: 0;
    z-index: 30;
    background: #fff;
    border: 1px solid rgba(36, 35, 33, 0.12);
    border-radius: 0.55rem;
    box-shadow: 0 14px 34px rgba(36, 35, 33, 0.14);
    overflow: hidden;
}

.searchable-select__list {
    list-style: none;
    margin: 0;
    padding: 0.25rem;
    max-height: 240px;
    overflow-y: auto;
}

.searchable-select__option {
    padding: 0.45rem 0.65rem;
    border-radius: 0.4rem;
    font-size: 0.86rem;
    color: #3a3733;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.searchable-select__option.is-active {
    background: rgba(185, 133, 73, 0.12);
    color: #8d6334;
}

.searchable-select__option.is-selected {
    font-weight: 700;
    color: #8d6334;
}

.searchable-select__empty {
    margin: 0;
    padding: 0.65rem;
    font-size: 0.82rem;
    color: #8a7a63;
    text-align: center;
}
