/* Tom Select, drawn with the desk tokens. The vendor file is the structure.
   Native select chrome is not used. See selects.js.
   These forms are display:inline, so the control has to stay inline and
   shrink to its label. A block wrapper stretches into a wide empty field. */
.ts-wrapper {
  display: inline-flex;
  vertical-align: middle;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
}
.ts-wrapper .ts-control {
  flex: 0 0 auto;
  width: auto;
}
.ts-wrapper.single .ts-control {
  box-sizing: content-box;
  height: 38px;
  min-height: 38px;
  min-width: 4.5rem;
  padding: 0 28px 0 12px;
  border: 1px solid var(--input);
  border-radius: calc(var(--radius) - 2px);
  background: #fff !important;
  background-image: none !important;
  box-shadow: none;
  color: var(--foreground);
  font: inherit;
}
select.ts-hidden-accessible {
  height: 1px !important;
  min-height: 0 !important;
  border: 0 !important;
}
.ts-wrapper.single .ts-control:after { border-top-color: var(--muted-foreground); }
.ts-wrapper.focus .ts-control,
.ts-wrapper.dropdown-active .ts-control {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px hsl(200 80% 50% / 0.16);
}
.ts-wrapper.single .ts-control .item {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  line-height: 38px;
  max-width: 18rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ts-dropdown {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 24px hsl(20 14.3% 4.1% / 0.12);
  z-index: 80;
  margin-top: 4px;
  height: auto;
}
body > .ts-dropdown {
  width: max-content !important;
  min-width: 7.5rem;
  max-width: min(24rem, calc(100vw - 24px));
}
.ts-dropdown-content { height: auto; max-height: 280px; }
.ts-dropdown .option { padding: 8px 12px; white-space: nowrap; }
.ts-dropdown .active { background: var(--muted); color: var(--foreground); }
.ts-dropdown .selected { background: hsl(200 80% 50% / 0.12); color: var(--foreground); }
.stack .ts-wrapper { display: flex; width: 100%; }
.stack .ts-wrapper .ts-control { width: 100%; }
.stack .ts-wrapper.single .ts-control .item { max-width: 100%; }
