/* Searchable select – progressive enhancement for native <select> */
.ss {
    position: relative;
    width: 100%;
}

.ss-native {
    display: none !important;
}

.ss-trigger {
    display: flex;
    align-items: center;
    width: 100%;
    text-align: left;
    cursor: pointer;
    background-color: #fff;
}

.ss-trigger .ss-value {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ss-trigger:focus-visible {
    border-color: #093d5a;
    box-shadow: 0 0 0 0.25rem rgba(9, 61, 90, 0.2);
}

.ss-panel {
    position: absolute;
    z-index: 1055;
    top: calc(100% + 4px);
    left: 0;
    display: none;
    width: 100%;
    min-width: 220px;
    overflow: hidden;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 6px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
}

.ss--open .ss-panel {
    display: block;
}

.ss--up .ss-panel {
    top: auto;
    bottom: calc(100% + 4px);
}

.ss--end .ss-panel {
    right: 0;
    left: auto;
}

.ss-search {
    padding: 8px;
    border-bottom: 1px solid #e9ecef;
}

.ss-search-input {
    width: 100%;
    padding: 8px 12px;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.4;
    color: #212529;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

.ss-search-input:focus {
    border-color: #093d5a;
    box-shadow: 0 0 0 0.2rem rgba(9, 61, 90, 0.18);
}

.ss-search-input::-webkit-search-cancel-button {
    cursor: pointer;
}

.ss-list {
    max-height: 300px;
    padding: 4px;
    margin: 0;
    overflow-y: auto;
    list-style: none;
}

.ss-option {
    padding: 9px 12px;
    font-size: 16px;
    line-height: 1.45;
    color: #212529;
    white-space: normal;
    cursor: pointer;
    border-radius: 4px;
}

.ss-option:hover,
.ss-option.ss-option--active {
    background-color: #eef3f6;
}

.ss-option[aria-selected="true"] {
    font-weight: 600;
    color: #093d5a;
    background-color: #e4edf2;
}

.ss-option[aria-selected="true"]::after {
    float: right;
    margin-left: 8px;
    content: "\2713";
}

.ss-empty {
    padding: 12px;
    margin: 0;
    font-size: 14px;
    color: #6c757d;
    text-align: center;
}

@media (prefers-reduced-motion: no-preference) {
    .ss--open .ss-panel {
        animation: ss-fade-in 120ms ease-out;
    }

    @keyframes ss-fade-in {
        from {
            opacity: 0;
            transform: translateY(-4px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}
