/* Shared Tailwind-equivalent Tom Select skin. Loaded after the pinned vendor CSS.
   Also skins purpose-built Tom Select instances without replacing their data loaders. */
.ts-wrapper,.ts-dropdown{
 --vr-select-bg:#f9fafb;--vr-select-paper:#fff;--vr-select-ink:#111827;
 --vr-select-muted:#6b7280;--vr-select-border:#d1d5db;--vr-select-menu-border:#e5e7eb;
 --vr-select-hover:#eff6ff;--vr-select-active:#1d4ed8;--vr-select-focus:#3b82f6;
 --vr-select-ring:rgb(59 130 246 / .24);
 font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;
 text-transform:none;letter-spacing:normal;text-align:left;box-sizing:border-box;
}
html[data-theme=dark] :is(.ts-wrapper,.ts-dropdown),html.dark :is(.ts-wrapper,.ts-dropdown){
 --vr-select-bg:#111827;--vr-select-paper:#1f2937;--vr-select-ink:#f3f4f6;
 --vr-select-muted:#9ca3af;--vr-select-border:#4b5563;--vr-select-menu-border:#374151;
 --vr-select-hover:#1e3a5f;--vr-select-active:#bfdbfe;--vr-select-focus:#60a5fa;
 color-scheme:dark;
}
.ts-wrapper{
 --vr-select-control-height:var(--ui-control-height,44px);
 position:relative;box-sizing:border-box;width:100%;min-width:0;max-width:100%;
 height:var(--vr-select-control-height);min-height:var(--vr-select-control-height);
 margin:0;padding:0;border:0;align-self:stretch;
}
.ts-wrapper .ts-control{
 display:flex;align-items:center;gap:5px;flex-wrap:wrap;width:100%;min-width:0;
 box-sizing:border-box;height:var(--vr-select-control-height)!important;
 min-height:var(--vr-select-control-height)!important;max-height:var(--vr-select-control-height)!important;
 padding:calc((var(--vr-select-control-height) - 1.5em - 2px) / 2) 16px!important;border:1px solid var(--vr-select-border)!important;
 border-radius:12px!important;background:var(--vr-select-bg)!important;
 color:var(--vr-select-ink)!important;box-shadow:none;font:inherit;line-height:1.5;
 transition:border-color 160ms ease,box-shadow 160ms ease,background-color 160ms ease;
}
.ts-wrapper.single .ts-control{flex-wrap:nowrap;padding-right:38px!important}
.ts-wrapper.single .ts-control::after{
 content:"";position:absolute;right:16px;top:calc(50% - 4px);width:6px;height:6px;
 border:solid var(--vr-select-muted);border-width:0 1.5px 1.5px 0;transform:rotate(45deg);pointer-events:none;
}
.ts-wrapper .ts-control>.item{max-width:100%;min-width:0;white-space:normal;overflow-wrap:anywhere;color:inherit}
/* A searchable single choice must not grow when its search input receives focus. */
.ts-wrapper.single .ts-control>.item{
 flex:0 1 auto;max-width:calc(100% - 20px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.ts-wrapper .ts-control>input,.unified-admin .ts-wrapper .ts-control>input{
 min-width:30px!important;min-height:0!important;height:1.5em!important;max-width:100%!important;
 padding:0!important;margin:0!important;border:0!important;border-radius:0!important;
 background:transparent!important;color:var(--vr-select-ink)!important;
 box-shadow:none!important;outline:0!important;font:inherit!important;line-height:1.5!important;
}
.ts-wrapper .ts-control>input::placeholder{color:var(--vr-select-muted);opacity:1}
.ts-wrapper.focus .ts-control,.ts-wrapper .ts-control:focus-within{
 border-color:var(--vr-select-focus)!important;background:var(--vr-select-paper)!important;
 box-shadow:0 0 0 2px var(--vr-select-ring)!important;
}
.ts-wrapper.multi .ts-control>.item{
 display:inline-flex;align-items:center;gap:4px;margin:0;padding:2px 7px;border:0;
 border-radius:6px;background:var(--vr-select-hover)!important;color:var(--vr-select-active)!important;
}
.ts-wrapper.plugin-remove_button .item .remove{border-left:1px solid var(--vr-select-border);margin-left:3px;padding:0 4px;color:inherit}
.ts-wrapper.disabled,.ts-wrapper.vr-select-disabled{opacity:.6}
.ts-wrapper:is(.disabled,.locked,.vr-select-disabled) .ts-control{cursor:not-allowed!important}
.ts-wrapper:is(.disabled,.vr-select-disabled) .ts-control>input{cursor:not-allowed!important}
.ts-dropdown,.ts-wrapper .ts-dropdown{
 /* Inline fixed placement remains authoritative for body/dialog-mounted menus. */
 position:absolute;top:100%;left:0;width:100%;z-index:10020;box-sizing:border-box;max-width:calc(100vw - 16px);margin:4px 0 0;
 border:1px solid var(--vr-select-menu-border)!important;border-radius:12px!important;
 background:var(--vr-select-paper)!important;color:var(--vr-select-ink)!important;
 box-shadow:0 18px 38px rgb(15 23 42 / .18);overflow:hidden;
}
.ts-dropdown.vr-global-select-dropdown{margin:0}
.ts-dropdown .ts-dropdown-content{max-height:min(260px,40dvh);overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;padding:4px}
.ts-dropdown .option,.ts-dropdown .no-results,.ts-dropdown .optgroup-header{
 padding:10px 12px;white-space:normal;overflow-wrap:anywhere;line-height:1.5;
 background:var(--vr-select-paper)!important;color:var(--vr-select-ink)!important;
}
.ts-dropdown .option{border-radius:8px}
.ts-dropdown .optgroup-header{font-size:12px;font-weight:700;color:var(--vr-select-muted)!important}
.ts-dropdown .no-results{color:var(--vr-select-muted)!important}
.ts-dropdown .option.active,.ts-dropdown .option.selected,.ts-dropdown .option[data-selectable]:hover,
html[data-theme=dark] .ts-dropdown .option.active,html[data-theme=dark] .ts-dropdown .option.selected,
html[data-theme=dark] .ts-dropdown .option[data-selectable]:hover{
 background:var(--vr-select-hover)!important;color:var(--vr-select-active)!important;
}
.ts-dropdown .option[aria-disabled=true]{opacity:.5;cursor:not-allowed}
.ts-dropdown .highlight{background:transparent;color:inherit;font-weight:700}
.ts-wrapper.vr-select-compact{--vr-select-control-height:34px;width:auto;min-width:86px;display:inline-block;vertical-align:middle}
.ts-wrapper.vr-select-compact .ts-control{min-height:34px;padding:6px 32px 6px 10px!important;font-size:12px}
.ts-wrapper.vr-select-compact.single .ts-control::after{right:12px}
@media(prefers-reduced-motion:reduce){.ts-wrapper .ts-control{transition:none}}

/* All crew-assignment fields, including native fallbacks and portalled options.
   The semantic marker is shared by dynamically created Tom Select controls. */
select:is([name="employee_id"],[name="assigned_employee_id"],[data-assigned-crew]),
select:is([name="employee_id"],[name="assigned_employee_id"],[data-assigned-crew]) option{
 text-align:left!important;text-align-last:left!important;
}
.ts-wrapper.vr-assigned-crew-select .ts-control,
.ts-wrapper.vr-assigned-crew-select .ts-control>.item,
.ts-wrapper.vr-assigned-crew-select .ts-control>input,
.ts-dropdown.vr-assigned-crew-select :is(.option,.no-results,.optgroup-header){
 text-align:left!important;
}
.ts-wrapper.vr-assigned-crew-select .ts-control,
.ts-dropdown.vr-assigned-crew-select .option{justify-content:flex-start!important}

/* Geometry uses the same height as the native field; colors and loaders stay shared.
   Multi-choice tags scroll inside the field instead of stretching neighbouring rows. */
.ts-wrapper.multi .ts-control{
 padding-block:6px!important;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;
 scrollbar-width:thin;scroll-padding-block:6px;
}
.ts-wrapper.vr-select-compact .ts-control{
 padding-block:calc((var(--vr-select-control-height) - 1.5em - 2px) / 2)!important;
}
.field .ts-wrapper{--vr-select-control-height:46px}
.unified-admin .ts-wrapper{--vr-select-control-height:var(--ui-control-height,44px)}
.unified-admin .ts-wrapper.vr-select-compact{--vr-select-control-height:34px}
:is(.unified-admin .tabulator-paginator,.cp-collection-pager) .ts-wrapper.tabulator-page-size{
 --vr-select-control-height:36px;
}
.cp-sort-label>.ts-wrapper{--vr-select-control-height:40px}
.finance-page .finance-filters .ts-wrapper{--vr-select-control-height:var(--finance-control-height,48px)}
:is(#employee-form,#crm-edit-form).vr-contact-form .employee-address-grid .ts-wrapper{
 --vr-select-control-height:40px;
}
.console #studio-dialog :is(#employee-form,#employee-view) .employee-panels .ops-field .ts-wrapper{
 --vr-select-control-height:36px;
}
#gallery-edit-form .ts-wrapper{--vr-select-control-height:36px}
#studio-dialog.crm-action-dialog .crm-quote-view .quote-status-controls .ts-wrapper{
 --vr-select-control-height:44px;
}
.gps-workspace-toolbar .ts-wrapper{--vr-select-control-height:var(--ui-control-height,44px)}
.gps-share-field .ts-wrapper{--vr-select-control-height:48px}
.kb-card-actions .ts-wrapper{--vr-select-control-height:var(--ui-control-height,38px)}
.mobile-wizard .mobile-icon-field .ts-wrapper{--vr-select-control-height:49px}
@media(pointer:coarse),(max-width:700px){
 :is(#employee-form,#crm-edit-form).vr-contact-form .employee-address-grid .ts-wrapper,
 .console #studio-dialog :is(#employee-form,#employee-view) .employee-panels .ops-field .ts-wrapper{
  --vr-select-control-height:44px;
 }
}
@media(pointer:coarse),(max-width:600px){
 #gallery-edit-form .ts-wrapper{--vr-select-control-height:40px}
}
