/* ── One dropdown, the whole app (2026-11-14) ───────────────────────────────────────────────────────────────
   Every dropdown, in the portal and on the patients' pages, has the same look and the same compact size: 30px high, small text, a thin border, a fine
   arrow, the brand's focus ring, and the brand's list when it opens (elabs-select.js). Pages set only a dropdown's width. (The Lab pickers below
   match it.) The size and shape win over a page's own rules; the border and text colours do
   not, so a field marked in error (red) or a STAT priority keeps its colour. */
:root {
    --dd-h: 30px;
    --dd-fs: 0.8rem;
    --dd-radius: 8px;
    --dd-border: #cbd5e1;
    --dd-caret: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3e%3cpath fill='none' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M3 4.5l3 3 3-3'/%3e%3c/svg%3e");
}
select.form-select:not([multiple]):not([size]), select.form-field-input:not([multiple]):not([size]), select.usr-filter-select {
    height: var(--dd-h); min-height: var(--dd-h);
    padding: 0 1.7rem 0 0.6rem;
    font-size: var(--dd-fs); line-height: 1.3; font-weight: 500;
    border-width: 1px; border-style: solid; border-radius: var(--dd-radius);
    background-image: var(--dd-caret); background-repeat: no-repeat; background-position: right 0.5rem center; background-size: 12px 12px;
    appearance: none; -webkit-appearance: none; -moz-appearance: none;
    cursor: pointer; text-overflow: ellipsis; box-shadow: none;
    transition: border-color .12s ease, box-shadow .12s ease;
}
/* (the colours: low weight, so a page's error or priority colour stays) */
:where(select.form-select, select.form-field-input, select.usr-filter-select) { border-color: var(--dd-border); color: #1e293b; background-color: #fff; }
select.form-select:not([multiple]):not([size]):hover, select.form-field-input:not([multiple]):not([size]):hover, select.usr-filter-select:hover { border-color: #94a3b8; }
select.form-select:focus, select.form-select:focus-visible, select.form-field-input:focus, select.usr-filter-select:focus {
    border-color: var(--primary-color, #0891b2); box-shadow: 0 0 0 3px rgba(8,145,178,.15); outline: none;
}
select.form-select:disabled, select.form-field-input:disabled { background-color: #f8fafc; color: #64748b; cursor: not-allowed; opacity: 1; }
select.form-select option { font-weight: 400; }
/* a list box (several shown at once) keeps its height, with the same border and text */
select.form-select[multiple], select.form-select[size] { font-size: var(--dd-fs); border-radius: var(--dd-radius); padding: 0.25rem; background-image: none; }

/* The brand's own dropdown list (_brand_select.html; moved out of the page 2026-11-13). */
.bsel-native { position: absolute !important; opacity: 0 !important; pointer-events: none !important; width: 1px !important; height: 1px !important;
    padding: 0 !important; border: 0 !important; margin: 0 !important; overflow: hidden !important; }
.bsel-btn { display: inline-flex !important; align-items: center; gap: 0.4rem; text-align: left; cursor: pointer; white-space: nowrap; min-width: 0;
    background-color: #fff; }
.bsel-btn .bsel-txt { overflow: hidden; text-overflow: ellipsis; flex: 1 1 auto; min-width: 0; }
.bsel-btn .bsel-caret { flex: none; font-size: 0.7rem; color: #64748b; transition: transform .15s; margin-left: auto; }
.bsel-btn.form-select { background-image: none !important; padding-right: 0.6rem !important; }
/* One dropdown everywhere (2026-11-14): the size and look of every other dropdown (elabs-base.css, --dd-*) */
.bsel-btn.form-select, .bsel-btn.bsel-hdr { height: var(--dd-h, 30px); min-height: var(--dd-h, 30px); padding: 0 0.6rem !important;
    font-size: var(--dd-fs, 0.8rem); font-weight: 500; line-height: 1.3; border: 1px solid var(--dd-border, #cbd5e1); border-radius: var(--dd-radius, 8px);
    color: #1e293b; box-shadow: none; }
.bsel-btn.form-select:hover { border-color: #94a3b8; }
.bsel-btn[aria-expanded="true"] { border-color: #0891b2 !important; box-shadow: 0 0 0 3px rgba(8,145,178,.15) !important; }
.bsel-btn[aria-expanded="true"] .bsel-caret { transform: rotate(180deg); color: #0e7490; }
.bsel-btn:disabled { cursor: not-allowed; opacity: .65; }
/* The page's Lab picker (header, hero, dashboard Status card): one compact size everywhere, as on the dashboard (2026-11-11) */
.bsel-btn.bsel-hdr { max-width: 8.5rem; min-width: 0; }
.bsel-btn.bsel-hdr .bsel-caret { font-size: 0.62rem; }
.bsel-btn.bsel-hdr:hover { border-color: #94a3b8; }
.bsel-pop { position: fixed; z-index: 2000; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden;
    box-shadow: 0 8px 24px rgba(15,23,42,.12), 0 1px 3px rgba(15,23,42,.06); animation: bselIn .1s ease-out; display: flex; flex-direction: column; }
@keyframes bselIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.bsel-find { margin: 0.5rem 0.5rem 0.2rem; position: relative; }
.bsel-find input { width: 100%; height: var(--dd-h, 30px); border: 1px solid #cbd5e1; border-radius: 8px; padding: 0 0.6rem 0 1.8rem; font-size: 0.8rem; outline: none; }
.bsel-find input:focus { border-color: #0891b2; box-shadow: 0 0 0 3px rgba(8,145,178,.15); }
.bsel-find i { position: absolute; left: 0.6rem; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: 0.75rem; }
.bsel-list { list-style: none; margin: 0; padding: 0.25rem; overflow-y: auto; max-height: 300px; }
.bsel-opt { display: flex; align-items: center; gap: 0.45rem; padding: 0.35rem 0.55rem; border-radius: 6px; font-size: 0.8rem; font-weight: 400;
    color: #334155; cursor: pointer; white-space: nowrap; }
.bsel-opt .bsel-chk { width: 1rem; flex: none; color: transparent; font-size: 0.85rem; }
.bsel-opt.active { background: #f1f5f9; color: #0f172a; }
/* the chosen one: light, with a check (2026-11-14: was a filled gradient) */
.bsel-opt[aria-selected="true"] { background: #ecfeff; color: #0e7490; font-weight: 600; }
.bsel-opt[aria-selected="true"] .bsel-chk { color: #0891b2; }
.bsel-opt.bsel-none { color: #64748b; }
.bsel-opt[aria-selected="true"].bsel-none { color: #0e7490; }
.bsel-opt.bsel-off { color: #cbd5e1; cursor: not-allowed; }
.bsel-empty { padding: 0.6rem 0.8rem; font-size: 0.8rem; color: #94a3b8; }

/* Any dropdown with its brand list open (2026-11-14), and the list's group headings */
select[aria-expanded="true"] { border-color: var(--primary-color, #0891b2) !important; box-shadow: 0 0 0 3px rgba(8,145,178,.15) !important; }
.bsel-group { padding: 0.45rem 0.55rem 0.2rem; font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #94a3b8; }
.bsel-group:first-child { padding-top: 0.2rem; }
