.tandem-search {
    position: relative;
    z-index: 100000;
}

.tandem-select {
    position: relative;
    display: inline-block;
    z-index: 100001;
}

.tandem-select.open {
    z-index: 100002;
}

.tandem-select > select {
    display: none !important;
}

.tandem-select-button {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tandem-select-dropdown {
    display: none;
    position: fixed !important;
    z-index: 999999 !important;
    top: calc(100% + 3px);
    left: 0;
    width: 100%;
    min-width: 180px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 3px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    padding: 5px;
    overflow: visible;
}

.tandem-select-dropdown {
    display: none !important;
    position: fixed !important;
    z-index: 999999 !important;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 3px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    padding: 5px;
    box-sizing: border-box;
}

.tandem-select-search {
    display: block;
    width: 100%;
    height: 34px;
    padding: 5px 8px;
    margin: 0 0 5px 0;
    background: #fff;
    border: 1px solid #999;
    border-radius: 2px;
    box-sizing: border-box;
    outline: none;
    font-size: 14px;
    color: #333;
}

.tandem-select-search:focus {
    border-color: #777;
}

.tandem-select-list {
    max-height: 230px;
    overflow-y: auto;
    overflow-x: hidden;
}

.tandem-select-option {
    display: block;
    padding: 8px 7px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.3;
    color: #333;
    background: #fff;
}

.tandem-select-option:hover,
.tandem-select-option.selected {
    background: #f1f1f1;
}

.tandem-select.disabled {
    opacity: 0.6;
}

.tandem-select.disabled .tandem-select-button {
    cursor: not-allowed;
}

.tandem-select-button:after {
    content: "▼";
    float: right;
    font-size: 10px;
    margin-top: 4px;
}

.tandem-select.open .tandem-select-button:after {
    content: "▲";
}

/* Чтобы выпадающий список не обрезался контейнером поиска */
.tandem-search,
.tandem-search * {
    overflow: visible;
}

/* Но скролл самого списка сохраняем */
.tandem-select-list {
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* На всякий случай поднимаем поиск над соседними блоками темы */
.tandem-search {
    isolation: isolate;
}