div.select3 {
    position: relative;
    cursor: pointer;
    display: inline-flex;
    min-width: 180px;
    min-height: 40px;
    line-height: 40px;
    background: #fff;
    overflow: hidden;
    padding-inline: 8px 30px;
    box-sizing: border-box;
}

div.select3 *,
div.select3 *::after,
div.select3 *::before {
    box-sizing: inherit;
}

div.select3::after {
    content: '';
    width: 6px;
    height: 6px;
    position: absolute;
    top: 50%;
    inset-inline-end: 10px;
    transform: translateY(-50%) rotateZ(45deg);
    border-bottom: 2px solid #000;
    border-inline-end: 2px solid #000;
}

div.select3.opened::after {
    transform: translateY(-50%) rotateZ(225deg);
}

div.select3.opened {
    overflow: visible;
}

.select3 .inner {
    position: absolute;
    z-index: 100;
    top: 100%;
    inset-inline-start: 0;
    inset-inline-end: 0;
    background: #fff;
    max-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

.select3 .inner.drop-up {
    top: unset;
    bottom: 100%;
    border-top: none;
    border-bottom: 1px solid #000;
}

.select3 > .selected-top {
    width: 100%;
    height: 40px;
    display: block;
    background: #fff;
    border-radius: inherit;
}

.select3 > .placeholder {
    display: block;
    width: 100%;
    height: 40px;
    color: #666;
    line-height: 40px;
    background: #fff;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.select3.multiple > .placeholder {
    height: 30px;
    line-height: 30px;
}

.select3 .inner div.search-wrapper {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1;
    max-width: 100%;
    background: #fff;
}

.select3 .inner input.search {
    width: calc(100% - 20px);
    font-size: 18px;
    height: 32px;
    padding: 3px;
    margin-top: 5px;
    margin-inline-start: 10px;
}

.select3 .inner .placeholder {
    color: #666;
}

.select3 .inner span {
    width: 100%;
    height: 40px;
    display: block;
    text-align: start;
    padding-inline: 10px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.select3 .inner .optgroup span {
    padding-inline-start: 25px;
}

.select3 .inner span.no-results {
    min-height: 40px;
    height: fit-content;
    padding-inline: 10px; /* Same as search input margin-inline-start */
    white-space: break-spaces;
}

.select3 .inner span.option-hidden,
.select3 .inner .optgroup.option-hidden {
    display: none;
}

.select3 .inner span:not(.title):hover {
    background: #efefef;
}

.select3 .inner span:not(.title).selected {
    background: #e0e0e0;
}

.select3 .inner span.disabled {
    opacity: 0.7;
    background: #c0c0c0;
    pointer-events: none;
}

/* Multiple select */
.select3.multiple {
    display: flex;
    flex-wrap: wrap;
    row-gap: 8px;
    column-gap: 8px;
    padding-block: 5px;
}

.select3.multiple > .selected-top {
    position: relative;
    display: inline-flex;
    column-gap: 5px;
    width: fit-content;
    height: 28px;
    align-self: center;
    font-size: 14px;
    line-height: 28px;
    border-radius: 10px;
    background: #c6c6c6;
    padding-inline-end: 5px;
}

.select3.multiple > .selected-top b.remove {
    display: inline-block;
    width: 25px;
    height: 100%;
    font-size: 16px;
    line-height: 30px;
    text-align: center;
    padding-inline: 8px 5px;
    transition: 0.3s background;
    border-radius: 10px 0 0 10px;
    border-inline-end: 1px solid gray;
}

.select3.multiple > .selected-top b.remove:hover {
    background: #a6a6a6;
}

.select3.multiple .inner {
    width: 100%;
}

.select3 .inner span.title {
    font-size: 90%;
    font-weight: bold;
    font-style: italic;
    padding-inline-start: 10px;
}
/* Multiple select end */