.su-searchable-select {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    width: 100%;
    min-width: 0;
}

.su-searchable-select__label,
.su-field__label {
    display: block;
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #687c94;
}

button.su-searchable-select__trigger,
.su-searchable-select__trigger {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    width: 100%;
    min-height: 2.5rem;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--su-border, #dce4ef);
    border-radius: 0.55rem;
    background: #fff;
    background-image: none;
    color: #2a3c53;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: normal;
    text-transform: none;
    text-align: left;
    cursor: pointer;
    box-sizing: border-box;
    box-shadow: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.su-searchable-select__trigger:hover {
    border-color: hsl(210, 18%, 78%);
}

.su-searchable-select--open {
    z-index: 20;
}

.su-searchable-select--open .su-searchable-select__trigger,
button.su-searchable-select__trigger:focus,
button.su-searchable-select__trigger:focus-visible,
.su-searchable-select__trigger:focus,
.su-searchable-select__trigger:focus-visible {
    outline: none;
    border-color: #18334f;
    box-shadow: 0 0 0 3px rgba(24, 51, 79, 0.12);
}

.su-searchable-select__value {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #2a3c53;
}

.su-searchable-select__placeholder {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #8ea1b7;
}

.su-searchable-select__trigger-actions {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 0.25rem;
    color: #8ea1b7;
}

.su-searchable-select__clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 9999px;
    color: #8ea1b7;
    cursor: pointer;
}

.su-searchable-select__clear:hover {
    background: #f1f5f9;
    color: #2a3c53;
}

.su-searchable-select__chevron {
    display: block;
    transition: transform 0.15s ease;
}

.su-searchable-select--open .su-searchable-select__chevron {
    transform: rotate(180deg);
}

.su-searchable-select__backdrop {
    position: fixed;
    inset: 0;
    z-index: 1090;
    background: transparent;
}

.su-searchable-select--fixed-panel .su-searchable-select__backdrop {
    z-index: 1090;
}

.su-searchable-select__panel {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--su-border, #dce4ef);
    border-radius: 0.65rem;
    background: #fff;
    box-shadow: 0 10px 28px rgba(18, 38, 63, 0.14);
}

.su-searchable-select--fixed-panel .su-searchable-select__panel {
    position: fixed;
    top: auto;
    left: auto;
    right: auto;
    z-index: 1100;
}

/* Search bar — matches shared _searchInput default styling */
.su-searchable-select__search {
    flex: 0 0 auto;
    padding: 0.55rem 0.65rem;
    margin-top: 10px;
}

.su-searchable-select__search-shell {
    display: inline-flex;
    width: 100%;
    min-width: 0;
    align-items: center;
    gap: 0.375rem;
    padding: 0.625rem 0.75rem;
    border: 1px solid #dce4ef;
    border-radius: 0.5rem;
    background: #fff;
    color: #8ea1b7;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.su-searchable-select__search-shell:focus-within {
    border-color: #18334f;
    box-shadow: 0 0 0 1px rgba(24, 51, 79, 0.1);
}

.su-searchable-select__search-icon {
    flex-shrink: 0;
    color: #8ea1b7;
}

.su-searchable-select__search-input {
    width: 100%;
    min-width: 0;
    border: 0;
    background: transparent;
    color: #2a3c53;
    font-size: 0.875rem;
    outline: none;
}

.su-searchable-select__search-input::placeholder {
    color: #8ea1b7;
}

.su-searchable-select__search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    width: 0.9rem;
    height: 0.9rem;
    margin: 0;
    cursor: pointer;
    background: center / contain no-repeat
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238ea1b7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18'/%3E%3Cpath d='m6 6 12 12'/%3E%3C/svg%3E");
}

.su-searchable-select__search-input::-webkit-search-cancel-button:hover {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23687c94' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18'/%3E%3Cpath d='m6 6 12 12'/%3E%3C/svg%3E");
}

/* Shared scrollbar — apply to any overflow-y scroll container */
.su-scrollbar,
.tc-sidebar__nav,
.su-sidebar__nav {
    --sb-track-color: transparent;
    --sb-thumb-color: #a0acbd;
    --sb-size: 12px;
    --sb-radius: 5px;
    overflow-x: hidden;
    overflow-y: auto;
}

.su-scrollbar::-webkit-scrollbar,
.tc-sidebar__nav::-webkit-scrollbar,
.su-sidebar__nav::-webkit-scrollbar {
    width: var(--sb-size);
}

.su-scrollbar::-webkit-scrollbar-track,
.tc-sidebar__nav::-webkit-scrollbar-track,
.su-sidebar__nav::-webkit-scrollbar-track {
    background: var(--sb-track-color);
    border-radius: var(--sb-radius);
}

.su-scrollbar::-webkit-scrollbar-thumb,
.tc-sidebar__nav::-webkit-scrollbar-thumb,
.su-sidebar__nav::-webkit-scrollbar-thumb {
    background: var(--sb-thumb-color);
    border-radius: var(--sb-radius);
}

.su-scrollbar::-webkit-scrollbar-button,
.tc-sidebar__nav::-webkit-scrollbar-button,
.su-sidebar__nav::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}

@supports not selector(::-webkit-scrollbar) {
    .su-scrollbar,
    .tc-sidebar__nav,
    .su-sidebar__nav {
        scrollbar-width: auto;
        scrollbar-color: var(--sb-thumb-color) var(--sb-track-color);
    }
}

/* Scroll lives only on the items list */
.su-searchable-select__items {
    flex: 1 1 auto;
    max-height: var(--su-select-max-height, 14rem);
    margin: 10px;
    padding: 0;
    list-style: none;
}

.su-searchable-select__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 0.4rem;
    padding: 0.5rem 0.65rem;
    font-size: 0.88rem;
    color: #2a3c53;
    cursor: pointer;
}

.su-searchable-select__item:hover {
    background: hsl(209, 55%, 95%);
    color: #18334f;
}

.su-searchable-select__item--selected {
    background: hsl(209, 55%, 92%);
    color: #18334f;
    font-weight: 600;
}

.su-searchable-select__item--select-all {
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 0.25rem;
    padding-bottom: 0.55rem;
    font-weight: 600;
}

.su-searchable-select__check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 1rem;
    height: 1rem;
    border: 1.5px solid #94a3b8;
    border-radius: 0.25rem;
    color: #18334f;
    background: #fff;
}

.su-searchable-select__item--selected .su-searchable-select__check {
    border-color: #18334f;
    background: #fff;
}

.su-searchable-select__empty {
    padding: 0.75rem 0.65rem;
    color: #8ea1b7;
    font-size: 0.86rem;
}

.su-searchable-select--disabled {
    opacity: 0.85;
    pointer-events: none;
}

.su-searchable-select--disabled .su-searchable-select__trigger {
    background: #f8fafc;
    cursor: not-allowed;
}

.su-searchable-select--invalid .su-searchable-select__trigger {
    border-color: #e11d48;
}

.su-searchable-select--invalid .su-searchable-select__trigger:hover,
.su-searchable-select--invalid .su-searchable-select__trigger:focus,
.su-searchable-select--invalid .su-searchable-select__trigger:focus-visible,
.su-searchable-select--invalid.su-searchable-select--open .su-searchable-select__trigger {
    border-color: #e11d48;
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.14);
}
