/* One Sneat-style searchable dropdown. The backing select is for form submission only. */
.ref-field{position:relative;min-width:0;width:100%;isolation:isolate}
.ref-field>.ref-native-select{position:absolute!important;left:0!important;top:0!important;width:1px!important;height:1px!important;opacity:0!important;padding:0!important;margin:0!important;border:0!important;pointer-events:none!important;z-index:-1!important}
.ref-field>.ref-combobox{width:100%;min-height:39px;padding:.45rem 2.4rem .45rem .875rem;cursor:text;border-radius:.375rem;background-color:var(--bs-body-bg,#fff);color:var(--bs-body-color,#566a7f)}
.ref-field>.ref-combobox:focus,.ref-field.ref-open>.ref-combobox{border-color:#696cff;outline:none;box-shadow:0 0 0 .2rem rgba(105,108,255,.15)}
.ref-field>.ref-combobox:disabled{background:var(--bs-secondary-bg,#f4f4f8);cursor:not-allowed;opacity:.8}
.ref-field>.ref-toggle{position:absolute;right:2px;top:2px;bottom:2px;width:36px;display:flex;align-items:center;justify-content:center;border:0;border-radius:0 .375rem .375rem 0;background:transparent;color:var(--bs-secondary-color,#8592a3);font-size:23px;line-height:1;cursor:pointer;transition:transform .15s ease}
.ref-field.ref-open>.ref-toggle{color:#696cff}
.ref-field>.ref-toggle:disabled{cursor:not-allowed;opacity:.5}
.ref-options{box-sizing:border-box;position:absolute;top:calc(100% + 5px);left:0;right:0;margin:0;padding:5px;max-height:min(310px,45vh);overflow-y:auto;overscroll-behavior:contain;z-index:1100;background:var(--bs-body-bg,#fff);color:var(--bs-body-color,#566a7f);border:1px solid rgba(67,89,113,.2);border-radius:.5rem;box-shadow:0 10px 28px rgba(67,89,113,.17)}
.ref-options[hidden]{display:none!important}
.ref-options.ref-options-up{top:auto;bottom:calc(100% + 5px)}
.ref-options[popover]{inset:auto;overflow-y:auto}
.ref-options[popover]:not(:popover-open){display:none}
.ref-option{padding:.6rem .75rem;border-radius:.375rem;line-height:1.3;min-height:37px;display:flex;align-items:center;cursor:pointer;user-select:none;overflow-wrap:anywhere}
.ref-option:hover,.ref-option.ref-active{background:rgba(105,108,255,.1);color:#696cff}
.ref-option.ref-selected{font-weight:600}
.ref-option.ref-selected::after{content:'✓';margin-left:auto;color:#696cff;padding-left:.8rem}
.ref-empty,.ref-more{padding:.75rem;color:var(--bs-secondary-color,#8592a3);font-size:.85rem}
@media(max-width:575px){.ref-field>.ref-combobox{font-size:16px}.ref-options{max-height:min(260px,45vh)}}

/* Independent of surrounding report/form CSS and dialog relocation. */
.ref-field > select.ref-native-select[hidden]{display:none!important}
.ref-field > .ref-toggle{margin:0!important;padding:0!important;min-height:0!important;box-shadow:none!important}
.ref-field > .ref-combobox{margin:0!important;padding-right:2.6rem!important}
