.searchable-select {
    display: inline-block;
    position: relative;
    min-width: min(100%, 12rem);
    max-width: 100%;
    vertical-align: top;
}

.searchable-select.is-full {
    display: block;
    width: 100%;
}

.searchable-select__native {
    position: absolute;
    inset: 0;
    width: 100%;
    min-height: 100%;
    opacity: 0;
    pointer-events: none;
}

.searchable-select__button {
    display: flex;
    min-height: 2.5rem;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
    padding: 0.65rem 0.85rem;
    text-align: left;
    font: inherit;
    color: #334155;
    cursor: pointer;
    transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.searchable-select__button:hover {
    background: #fafafa;
}

.searchable-select__button:focus {
    outline: none;
    border-color: #a06a9c;
    box-shadow: 0 0 0 3px rgba(217, 70, 239, 0.12);
}

.searchable-select__button[aria-disabled="true"] {
    cursor: not-allowed;
    background: #f8fafc;
    color: #94a3b8;
}

.searchable-select__value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.searchable-select__chevron {
    flex: 0 0 auto;
    color: #94a3b8;
    font-size: 0.75rem;
}

.searchable-select__panel {
    position: absolute;
    z-index: 9999;
    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;
    display: none;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
    background: #fff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
}

.searchable-select.is-open .searchable-select__panel {
    display: block;
}

.searchable-select__search {
    width: 100%;
    border: 0;
    border-bottom: 1px solid #f1f5f9;
    padding: 0.75rem 0.85rem;
    font: inherit;
    color: #334155;
    outline: none;
}

.searchable-select__search:focus {
    box-shadow: inset 0 -1px 0 #d946ef;
}

.searchable-select__options {
    max-height: 15rem;
    overflow-y: auto;
    padding: 0.3rem;
}

.searchable-select__option,
.searchable-select__empty {
    width: 100%;
    border: 0;
    border-radius: 0.6rem;
    background: transparent;
    padding: 0.6rem 0.7rem;
    text-align: left;
    font: inherit;
    color: #334155;
}

.searchable-select__option {
    cursor: pointer;
}

.searchable-select__option:hover,
.searchable-select__option.is-active {
    background: #fdf4ff;
    color: #86198f;
}

.searchable-select__option.is-selected {
    background: #fae8ff;
    color: #86198f;
    font-weight: 600;
}

.searchable-select__empty {
    color: #94a3b8;
}

@media (max-width: 640px) {
    .searchable-select__panel {
        position: fixed;
        top: auto;
        right: 1rem;
        bottom: 1rem;
        left: 1rem;
    }

    .searchable-select__options {
        max-height: 45vh;
    }
}
