/* Searchable native-select enhancement. Menus are viewport-positioned portals. */
.searchable-select{display:inline-flex;position:relative;flex:0 1 240px;width:240px;min-width:0;max-width:100%;vertical-align:middle}
.searchable-select-native{display:none!important}
.searchable-select-trigger{display:flex;align-items:center;gap:14px;width:100%;min-width:0;min-height:42px;padding:10px 13px;background:#fff;border:1px solid var(--border);border-radius:9px;color:var(--text);font:500 12px var(--font-body);text-align:left;cursor:pointer;transition:border-color .15s,box-shadow .15s}
.searchable-select-trigger:hover{border-color:#a8d7cf;background:#fcfefd}
.searchable-select-trigger:disabled{opacity:.5;cursor:not-allowed}
.searchable-select-trigger>svg{width:20px;height:20px;flex-shrink:0;color:#6f829e;transition:transform .15s}
.searchable-select.is-open .searchable-select-trigger{border-color:var(--gold);box-shadow:0 0 0 3px #009f8710}
.searchable-select.is-open .searchable-select-trigger>svg{transform:rotate(180deg);color:var(--gold)}
.searchable-select.has-value .searchable-select-trigger{background:#f2fbf7;color:#008b78;border-color:#c3e6db}
.searchable-select-value{flex:1;min-width:0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
.searchable-select-panel{position:fixed;z-index:80;display:flex;flex-direction:column;box-sizing:border-box;min-width:0;max-width:calc(100vw - 24px);padding:8px;background:#fff;border:1px solid #dbe7ed;border-radius:13px;box-shadow:0 12px 40px #0d204722;overflow:hidden;font-family:var(--font-body);color:var(--text)}
.searchable-select-panel[hidden],.searchable-select-clear[hidden]{display:none}
.searchable-select-search{display:flex;align-items:center;gap:9px;flex-shrink:0;width:100%;min-width:0;min-height:46px;padding:7px 10px;border:1px solid #dce8ed;border-radius:8px;background:#f5f9fb;margin-bottom:7px}
.searchable-select-search:focus-within{border-color:#81cdbd;background:#f8fcfa}
.searchable-select-search>svg{width:18px;height:18px;flex-shrink:0;color:#6c819b}
/* 16px prevents iOS focus zoom; min-width:0 stops intrinsic input overflow. */
.searchable-select-input{display:block;flex:1;width:0;min-width:0;max-width:100%;padding:3px 0;margin:0;border:0!important;outline:0!important;background:transparent;color:var(--text);font-family:var(--font-body);font-size:16px!important;line-height:24px;box-sizing:border-box;box-shadow:none!important;-webkit-appearance:none;appearance:none}
.searchable-select-input::placeholder{color:#75879f}
.searchable-select-input::-webkit-search-cancel-button{-webkit-appearance:none}
.searchable-select-clear{display:grid;place-items:center;flex-shrink:0;width:30px;height:30px;padding:0;border:0;border-radius:6px;background:#e7eef2;color:#526982;font-size:22px;cursor:pointer}
.searchable-select-list{position:relative;flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scrollbar-width:thin;scrollbar-color:#c4d9d4 transparent}
.searchable-select-option{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:43px;padding:10px 11px;margin:2px 0;border-radius:7px;font-size:13px;line-height:1.4;cursor:pointer;overflow-wrap:anywhere;touch-action:pan-y}
.searchable-select-option>span:first-child{min-width:0;flex:1}
.searchable-select-option.is-active{background:#f0f6f8}
.searchable-select-option[aria-selected=true]{background:#e8f8f1;color:#008975;font-weight:600}
.searchable-select-option:hover{background:#e8f8f1}
.searchable-select-check{width:17px;flex-shrink:0;color:var(--gold);font-size:16px}
.searchable-select-status{flex-shrink:0;padding:9px 10px 3px;margin-top:5px;border-top:1px solid var(--border);font-size:11px;line-height:1.5;color:var(--text-muted)}
.searchable-select-empty{padding:23px 12px;text-align:center;color:var(--text-secondary);font-size:13px}
@media(max-width:600px){
    .searchable-select--filter{flex:1 1 130px;width:0;max-width:100%}
    .searchable-select-trigger{min-height:46px;padding:10px 11px;gap:7px;font-size:13px}
    .searchable-select-option{min-height:46px;font-size:14px}
    /* Keep the native fallback and other form fields from triggering iPhone zoom. */
    select.filter-select,#cal-version-select,.form-input,.form-textarea{font-size:16px!important;min-width:0;max-width:100%}
}
