/* ==================================================================
   searchable-select.css
   Styles for the site-wide searchable dropdown widget built by
   JAVASCRIPTS/searchable-select.js. Kept visually neutral (plain
   white/gray, small font) so it drops into existing page layouts -
   old table-based forms and newer pages alike - without clashing.
   ================================================================== */

.ss-wrapper {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    font-family: inherit;
    font-size: inherit;
}

/* No explicit width was set on the original <select> - size the widget
   to fit its own label + caret instead of stretching to fill. */
.ss-wrapper.ss-auto-width {
    width: auto;
}

.ss-wrapper.ss-auto-width .ss-display {
    width: auto;
}

.ss-wrapper.ss-auto-width .ss-label {
    max-width: 260px;
}

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

.ss-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    min-width: 90px;
    width: 100%;
    height: 22px;
    box-sizing: border-box;
    padding: 2px 6px;
    background: #ffffff;
    border: 1px solid #a0a0a0;
    border-radius: 3px;
    cursor: pointer;
    color: #000000;
    font-family: inherit;
    font-size: inherit;
    line-height: 1.3;
    outline: none;
}

.ss-display:focus,
.ss-display:hover {
    border-color: #4d90fe;
}

.ss-display.ss-disabled {
    background: #eeeeee;
    color: #888888;
    cursor: not-allowed;
    border-color: #cccccc;
}

.ss-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ss-caret {
    flex: 0 0 auto;
    font-size: 10px;
    color: #666666;
}

.ss-panel {
    display: none;
    position: absolute;
    z-index: 10000;
    top: 100%;
    left: 0;
    min-width: 100%;
    width: max-content;
    max-width: 360px;
    background: #ffffff;
    border: 1px solid #a0a0a0;
    border-top: none;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    box-sizing: border-box;
}

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

.ss-search {
    box-sizing: border-box;
    width: 100%;
    padding: 6px 8px;
    border: none;
    border-bottom: 1px solid #dddddd;
    outline: none;
    font-family: inherit;
    font-size: inherit;
}

.ss-options {
    overflow-y: auto;
    max-height: 220px;
}

.ss-option {
    padding: 5px 10px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ss-option.ss-active,
.ss-option:hover {
    background: #2c5aa0;
    color: #ffffff;
}

.ss-option.ss-selected {
    font-weight: bold;
}

.ss-no-results {
    padding: 6px 10px;
    color: #888888;
    font-style: italic;
}
