.search-select-wrapper {
    position: relative;
}

.search-select-input {
    cursor: text;
    padding-right: 36px !important;
}

/* Native search-cancel rendering is inconsistent across browsers (e.g. not shown
   in Safari), so it's suppressed everywhere in favor of .search-select-clear below. */
.search-select-input::-webkit-search-cancel-button,
.search-select-input::-webkit-search-decoration {
    -webkit-appearance: none;
    display: none;
}

.search-select-wrapper::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid #75758b;
    border-bottom: 2px solid #75758b;
    transform: translateY(-60%) rotate(45deg);
    pointer-events: none;
}

.search-select-wrapper.has-value::after {
    display: none;
}

.search-select-clear {
    display: none;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 10px;
    top: 42%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    padding: 0;
    border: none;
    background: transparent;
    color: #75758b;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.search-select-wrapper.has-value .search-select-clear {
    display: flex;
}

.search-select-clear:hover {
    color: #7438ff;
}

.search-select-options {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 1px;
    background-color: #fff;
    border-radius: 2px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    max-height: 220px;
    overflow-y: auto;
    z-index: 20;
    text-align: left;
}

.search-select-wrapper.open .search-select-options {
    display: block;
}

.search-select-option {
    padding: 10px 16px;
    font-size: 14px;
    color: #75758b;
    cursor: pointer;
}

.search-select-option:hover,
.search-select-option.active {
    background-color: #f4f0ff;
    color: #7438ff;
}

.search-select-option.no-results {
    cursor: default;
    color: #aaa;
}

.search-select-option.no-results:hover {
    background-color: transparent;
    color: #aaa;
}

.search-select-option.selected {
    color: #7438ff;
    font-weight: 600;
}

.search-select-option.selected::after {
    content: '\2713';
    float: right;
}

.search-select-option.disabled {
    color: #ccc;
    cursor: not-allowed;
    pointer-events: none;
}

.search-select-option.disabled:hover {
    background-color: transparent;
    color: #ccc;
}

.search-select-wrapper.search-select-multi::after {
    display: none;
}

.search-select-control {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    cursor: text;
    box-sizing: border-box;
    width: 100%;
    background-color: #fff;
    padding: 4px 16px;
    font-size: 14px;
    color: #75758b;
    height: 37px;
    overflow-x: hidden;
    overflow-y: auto;
}

.search-select-control::-webkit-scrollbar {
    width: 4px;
}

.search-select-control::-webkit-scrollbar-track {
    background: transparent;
}

.search-select-control::-webkit-scrollbar-thumb {
    background-color: #7438ffbb;
    border-radius: 2px;
}

.search-select-tags {
    display: contents;
}

.search-select-multi .search-select-input {
    flex: 1 1 60px;
    min-width: 60px;
    width: auto;
    padding: 4px 0 !important;
    margin: 0;
    background: transparent !important;
    border: none;
    outline: none;
}

.search-select-tag {
    display: inline-flex;
    align-items: center;
    background-color: #f4f0ff;
    color: #7438ff;
    border-radius: 12px;
    padding: 2px 6px 2px 10px;
    font-size: 12px;
    line-height: 1.6;
    max-width: 100%;
}

.search-select-tag-remove {
    background: none;
    border: none;
    color: inherit;
    font-size: 14px;
    line-height: 1;
    margin-left: 4px;
    padding: 0 2px;
    cursor: pointer;
}

.search-select-tag-remove:hover {
    color: #4b1fb3;
}

@media (max-width: 767px) {
    .search-select-input,
    .search-select-control {
        font-size: 16px;
    }
}
