/* pickcore - the few things Tom Select's Bootstrap 5 theme does not cover. */

/* The line under a name (an email, a SKU's category): searchable, quieter. */
.pick-sub { font-size: .8em; opacity: .65; line-height: 1.2; }

/* "+ Add new ..." and "+ Add 'typed' ..." read as actions, not records. */
.ts-dropdown .pick-new { font-weight: 600; }
.ts-dropdown .pick-add-head {
  padding: .4rem .75rem; cursor: pointer;
  border-bottom: 1px solid rgba(0, 0, 0, .1);
}
.ts-dropdown .pick-add-head:hover { background: rgba(0, 0, 0, .05); }

/* The dropdown is attached to <body> (so a scrolling table cannot clip it):
   keep it above Bootstrap's sticky bars and below its modals. */
body > .ts-dropdown { z-index: 1050; }
/* ...and above a Bootstrap modal (1055) while one is open, for a picker that
   sits INSIDE a modal. pickcore's own add-new dialog closes the list first. */
body.modal-open > .ts-dropdown { z-index: 1056; }

/* A picker in a table cell fills it, like the control it replaced. */
.ts-wrapper { min-width: 0; }
td .ts-wrapper { width: 100%; }

/* A single-choice box keeps ONE line while it has focus. Tom Select shows the
   chosen item and the typing cursor side by side, and in a narrow cell (a
   document line) they wrapped to two lines: the row grew, and on blur shrank
   back under the pointer - a click on the button below (Add line) then landed
   on nothing. The item gives way (ellipsis), the cursor keeps a little room. */
.ts-wrapper.single .ts-control { flex-wrap: nowrap; overflow: hidden; }
.ts-wrapper.single .ts-control > .item { min-width: 0; flex: 0 1 auto; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.ts-wrapper.single .ts-control > input { flex: 1 1 1.5rem; min-width: 1.5rem; }
