/* One searchable popover for native selects and existing people radio pickers. */
.crm-choice-control{display:inline-flex;position:relative;vertical-align:middle;min-width:0;max-width:100%;width:100%;flex-direction:column}
:root .crm-choice-native{position:absolute!important;width:1px!important;height:1px!important;min-width:0!important;min-height:0!important;max-height:1px!important;padding:0!important;margin:0!important;overflow:hidden!important;clip-path:inset(50%)!important;opacity:0!important;pointer-events:none!important;white-space:nowrap!important}
:root button.crm-choice-trigger{display:flex;align-items:center;gap:9px;width:100%;height:40px;min-height:40px;padding:6px 11px;margin:0;border:1px solid var(--theme-input);border-radius:8px;background:var(--theme-popover);color:var(--theme-foreground);font:inherit;font-size:14px;line-height:1.3;text-align:left;box-shadow:none;cursor:pointer;min-width:0}
:root button.crm-choice-trigger:hover{border-color:var(--theme-muted-foreground)}
:root button.crm-choice-trigger[aria-expanded=true],:root button.crm-choice-trigger:focus-visible{border-color:var(--theme-primary);outline:none;box-shadow:0 0 0 3px color-mix(in srgb,var(--theme-primary) 16%,transparent)}
:root button.crm-choice-trigger:disabled{opacity:.6;cursor:default}
.crm-choice-trigger-text{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.crm-choice-icon{width:18px;height:18px;flex:0 0 18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.crm-choice-chevron{width:14px;height:14px;flex-basis:14px;margin-left:auto;color:var(--theme-muted-foreground)}
.crm-choice-trigger[aria-expanded=true] .crm-choice-chevron{transform:rotate(180deg)}
.crm-choice-popover{inset:auto;margin:0;position:fixed;z-index:10050;display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--theme-border);border-radius:12px;background:var(--theme-popover);color:var(--theme-foreground);box-shadow:0 15px 44px #0002,0 3px 9px #0001;text-align:left;font-family:var(--theme-font-sans);font-size:14px;line-height:1.4;box-sizing:border-box}
.crm-choice-popover[hidden]{display:none!important}
:root .crm-choice-search{display:flex;align-items:center;gap:9px;padding:0 10px;margin:10px 10px 6px;border:1px solid var(--theme-border);border-radius:7px;color:var(--theme-muted-foreground);background:var(--theme-background);font-weight:400;flex-shrink:0}
:root .crm-choice-search input{width:100%;min-width:0;height:38px!important;min-height:38px!important;margin:0!important;padding:0!important;background:none!important;color:var(--theme-foreground);border:0!important;box-shadow:none!important;outline:0!important;font-size:16px!important;line-height:1.3}
.crm-choice-search:focus-within{border-color:var(--theme-primary)}
.crm-choice-options{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:5px 6px;scrollbar-width:thin;scrollbar-color:var(--theme-border) transparent}
:root button.crm-choice-option{display:flex;align-items:center;gap:10px;width:100%;min-height:43px;padding:7px 9px;margin:1px 0;border:0;border-radius:7px;background:transparent;color:var(--theme-foreground);text-align:left;font:inherit;box-shadow:none;white-space:normal;cursor:pointer}
:root button.crm-choice-option:hover,:root button.crm-choice-option:focus-visible{background:var(--theme-muted);color:var(--theme-foreground)}
:root button.crm-choice-option:focus-visible{outline:2px solid var(--theme-primary);outline-offset:-2px}
:root button.crm-choice-option[aria-selected=true]{background:color-mix(in srgb,var(--theme-primary) 10%,var(--theme-popover))}
:root button.crm-choice-option:disabled{opacity:.45;cursor:not-allowed}
.crm-choice-copy{min-width:0;flex:1;display:flex;flex-direction:column;gap:2px}
.crm-choice-title{font-size:13px;line-height:1.4;font-weight:550;overflow-wrap:anywhere}
.crm-choice-description{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:11px;line-height:1.4;color:var(--theme-muted-foreground)}
.crm-choice-item-number{font-size:.9em;color:var(--theme-muted-foreground);font-weight:400;font-variant-numeric:tabular-nums;margin-right:3px}
.crm-choice-cover{position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden;width:44px;height:33px;flex:0 0 44px;border-radius:5px;background:var(--theme-muted);color:var(--theme-muted-foreground)}
.crm-choice-cover img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.crm-choice-trigger .crm-choice-cover{width:29px;height:24px;flex-basis:29px}
.crm-choice-avatar{--choice-avatar-size:34px;position:relative;display:inline-flex;align-items:center;justify-content:center;width:var(--choice-avatar-size);height:var(--choice-avatar-size);flex:0 0 var(--choice-avatar-size);margin-bottom:3px;border-radius:50%;background:var(--theme-muted);color:var(--theme-muted-foreground);font-size:calc(var(--choice-avatar-size)*.33);line-height:1}
.crm-choice-avatar>img{width:100%;height:100%;object-fit:cover;border-radius:50%}
.crm-choice-number{position:absolute;bottom:calc(var(--choice-avatar-size)*-.12);left:50%;transform:translateX(-50%);background:#fff;color:#171717;border:1px solid #ddd;border-radius:50%;min-width:calc(var(--choice-avatar-size)*.44);height:calc(var(--choice-avatar-size)*.44);padding:0 2px;display:flex;align-items:center;justify-content:center;font-size:calc(var(--choice-avatar-size)*.25);font-weight:550;font-variant-numeric:tabular-nums;line-height:1}
.crm-choice-trigger .crm-choice-avatar{--choice-avatar-size:26px}
.crm-choice-symbol{display:flex;align-items:center;justify-content:center;width:28px;height:28px;flex:0 0 28px;background:var(--theme-muted);color:var(--theme-muted-foreground);border-radius:6px}
.crm-choice-symbol .crm-choice-icon{width:17px;height:17px}
.crm-choice-trigger .crm-choice-symbol{width:18px;height:20px;flex-basis:18px;background:none}
.crm-choice-check{width:16px;height:16px;flex-basis:16px;color:var(--theme-primary);opacity:0}
[aria-selected=true]>.crm-choice-check{opacity:1}
.crm-choice-group{display:flex;align-items:center;gap:8px;padding:11px 9px 5px;font-size:10px;font-weight:600;letter-spacing:.5px;text-transform:uppercase;color:var(--theme-muted-foreground)}
.crm-choice-group:after{content:"";flex:1;height:1px;background:var(--theme-border)}
.crm-choice-status{font-size:10px;white-space:nowrap;border-radius:4px;padding:3px 6px;background:var(--theme-muted);color:var(--theme-muted-foreground)}
.crm-choice-status.active{background:color-mix(in srgb,#36815e 12%,var(--theme-popover));color:light-dark(#28704c,#9ad2ad)}
.crm-choice-status.new{background:color-mix(in srgb,var(--theme-primary) 10%,var(--theme-popover));color:var(--theme-primary)}
.crm-choice-status.considering{background:color-mix(in srgb,#ae862b 12%,var(--theme-popover));color:light-dark(#85621d,#d5b46c)}
.crm-choice-status.declined{background:color-mix(in srgb,#b55858 10%,var(--theme-popover));color:light-dark(#9e4a4a,#dfa1a1)}
.crm-choice-dot{width:7px;height:7px;border-radius:50%;background:var(--theme-muted-foreground)}
.crm-choice-dot.active{background:light-dark(#36815e,#9ad2ad)}.crm-choice-dot.new{background:var(--theme-primary)}.crm-choice-dot.considering{background:#b08a37}.crm-choice-dot.declined{background:#b65f5f}
.crm-choice-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 14px;border-top:1px solid var(--theme-border);color:var(--theme-muted-foreground);font-size:11px;flex-shrink:0}
:root .crm-choice-done{padding:4px 9px;margin:0;border:0;border-radius:4px;background:var(--theme-primary);color:var(--theme-primary-foreground);font:inherit;cursor:pointer}
.crm-choice-empty{padding:20px;text-align:center;color:var(--theme-muted-foreground)}
.crm-choice-error{display:block;color:var(--theme-primary);font-size:12px;margin-top:6px}
/* Mirror select sizing in filter bars without changing the source input. */
:root :is(.filterbar,.task-filters,.project-task-filters,.telegram-request-filters,form.filters)>.crm-choice-control{flex:1;min-width:145px;width:auto}
:root .people-picker>.crm-choice-control{width:100%}
:root :is(.filterbar,.task-filters,.project-task-filters,.telegram-request-filters) .crm-choice-trigger{margin:0}
@media(max-width:1024px),(any-pointer:coarse){:root button.crm-choice-trigger{font-size:16px}.crm-choice-title{font-size:14px}.crm-choice-description{font-size:12px}.crm-choice-option{min-height:46px!important}}

[data-theme=dark] :is(.crm-choice-control,.crm-choice-popover){color-scheme:dark}
[data-theme=light] :is(.crm-choice-control,.crm-choice-popover){color-scheme:light}

.crm-choice-popover{max-width:520px}
