/* searchable-select.css — type-to-search upgrade for <select class="ss-search"> */

.ss-wrap {
    position: relative;
    display: block;
    width: 100%;
}

.ss-input {
    width: 100%;
    box-sizing: border-box;
    cursor: text;
    padding-right: 30px;
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236c757d'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 9px center;
    background-size: 12px 12px;
}

.ss-wrap.ss-open .ss-input {
    background-image: none;
}

/* the original <select> stays in the DOM (it carries the form value) but is
   visually replaced by the search box */
.ss-native {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: -1;
}

.ss-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: 4px;
    z-index: 1070;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .15);
    border-radius: .375rem;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .14);
    max-height: 264px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.ss-list {
    list-style: none;
    margin: 0;
    padding: 4px;
}

.ss-item {
    padding: 7px 10px;
    font-size: .9rem;
    line-height: 1.3;
    border-radius: .25rem;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ss-item:hover,
.ss-item.ss-active {
    background: #0d6efd;
    color: #fff;
}

.ss-item.ss-selected {
    font-weight: 600;
}

.ss-item.ss-selected::after {
    content: "\2713";
    float: right;
    margin-left: 10px;
    font-weight: 700;
}

.ss-item.ss-off {
    opacity: .45;
    cursor: default;
}

.ss-empty {
    padding: 8px 10px;
    font-size: .85rem;
    color: #888;
}

.ss-count {
    padding: 5px 10px;
    font-size: .72rem;
    color: #999;
    border-bottom: 1px solid rgba(0, 0, 0, .07);
    position: sticky;
    top: 0;
    background: #fff;
}

.ss-wrap.ss-error .ss-input {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 .18rem rgba(220, 53, 69, .25) !important;
}

.ss-msg {
    display: none;
    font-size: .72rem;
    color: #dc3545;
    margin-top: 3px;
}

.ss-wrap.ss-error .ss-msg {
    display: block;
}
