/* Search controls share an anchored overlay, with a bounded list that scrolls independently. */
.search-picker { min-width: 0; position: relative; }
.picker-trigger { width: 100%; min-height: var(--control-height); text-align: left; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid var(--control-border); border-radius: var(--control-radius); padding: var(--control-padding); background: #100a17; color: var(--text); font: inherit; cursor: pointer; overflow-wrap: anywhere; }
.search-picker > .picker-trigger::after { content: ''; flex: 0 0 7px; width: 7px; height: 7px; border: solid #c7a5dc; border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); }
.picker-trigger[aria-expanded=true] { border-color: #ca9bec; box-shadow: 0 0 0 2px #aa74cb25; }
.picker-panel { display: flex; flex-direction: column; }
.picker-results { min-height: 0; max-height: 240px; overflow-y: auto; overscroll-behavior: contain; margin-top: 6px; }
.picker-results button { display: block; width: 100%; min-height: var(--control-height); padding: var(--control-padding); border: 0; border-radius: var(--control-radius); background: transparent; color: var(--text); text-align: left; font: inherit; overflow-wrap: anywhere; cursor: pointer; }
.picker-results button:hover, .picker-results button:focus-visible, .picker-results button[aria-selected=true] { background: #4e2b64; }
.picker-hint:empty { display: none; }
.role-chips { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.role-chips:empty { display: none; }
/* A single chip row matches ordinary fields; additional selections can still wrap. */
.role-chips:not(:empty) { min-height: var(--control-height); background: #100a17; border: 1px solid var(--control-border); border-radius: var(--control-radius); padding: 4px 6px; }
.role-chip { display: inline-flex; align-items: center; gap: 3px; min-width: 0; max-width: 100%; border-radius: 8px; background: #241a30; padding: 1px 1px 1px 6px; font-size: 13px; line-height: 1.25; }
.role-chip > span:not(.role-dot) { overflow-wrap: anywhere; min-width: 0; }
.role-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; }
.role-chip button { display: inline-grid; place-items: center; width: 24px; min-height: 24px; height: 24px; flex: 0 0 24px; padding: 0; border-radius: 50%; border: 0; color: #e7c8fa; background: transparent; font-size: 16px; line-height: 1; cursor: pointer; }
.role-chip button:hover { background: #6a4381; }
.role-count { margin-left: auto; color: #bba0cf; white-space: nowrap; }
.role-chips .picker-trigger { flex: 0 0 32px; width: 32px; min-height: 32px; height: 32px; padding: 0; border-radius: 50%; justify-content: center; font-size: 23px; color: #cfacdf; border-color: #765687; }
/* Geometric strokes keep the plus centred independently of font baseline metrics. */
.role-chips .picker-trigger { position: relative; }
.role-chips .picker-trigger::before, .role-chips .picker-trigger::after { content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: currentColor; border-radius: 1px; }
.role-chips .picker-trigger::before { width: 12px; height: 2px; }
.role-chips .picker-trigger::after { width: 2px; height: 12px; }
.picker-results button small { display: block; margin-top: 4px; font-size: 12px; }
/* Own search inputs and feedback so standalone dialogs and dashboard panels match. */
.search-picker .picker-panel input[type=search] { display: block; flex-shrink: 0; width: 100%; max-width: 100%; min-height: var(--control-height); margin: 0; border: 1px solid var(--control-border); border-radius: var(--control-radius); padding: var(--control-padding); background: var(--ink); color: var(--text); font: inherit; }
.picker-panel input[type=search]::placeholder { color: var(--muted); opacity: 1; }
.picker-hint { color: var(--muted); line-height: 1.6; }
.search-picker :focus-visible { outline: 2px solid #d6a4f3; outline-offset: 3px; }
.search-picker button:disabled { opacity: .55; cursor: not-allowed; }

/* Shared selector finish; native values and bounded searches stay with the picker controller. */
.picker-trigger { border-radius: var(--control-radius); background: #15101e; border-color: var(--control-border); box-shadow: inset 0 1px 3px #0003; gap: 12px; }
.picker-trigger:hover:not(:disabled), .picker-trigger[aria-expanded=true] { background: #241b31; border-color: #bd9bdc; }
.picker-panel { background: var(--surface-overlay); border-color: #9c85b3; border-radius: 12px; padding: 12px; box-shadow: var(--ui-shadow), inset 0 1px #ffffff12; }
.picker-panel input[type=search] { border-radius: 8px; margin-bottom: 10px; }
.picker-results button { min-height: 44px; border-radius: 7px; padding: 10px 12px; margin-block: 2px; text-align: left; }
.picker-results button:hover, .picker-results button:focus-visible { background: #b58ae523; }
.picker-results [aria-selected=true] { box-shadow: inset 3px 0 var(--accent); background: #b58ae51a; }
.picker-hint { padding: 12px 4px 4px; color: var(--muted); }
