.ts-wrapper {
  position: relative;
  width: 100%;
}

.tom-select-field {
  width: 100%;
}

.tom-select-placeholder,
.ts-wrapper.single .ts-control,
.ts-wrapper.multi .ts-control {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.125rem;
  min-height: 2.75rem;
  border-radius: 0.375rem;
  border: 1px solid color-mix(in srgb, var(--color-input-border, #d6d3d1) 25%, transparent);
  background-color: #fff;
  padding: 0.375rem 0.75rem;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.tom-select-placeholder-text {
  color: #a8a29e;
}

.tom-select-placeholder-chip,
.ts-wrapper.multi .ts-control > div {
  margin: 0.125rem 0.25rem 0.125rem 0;
  border-radius: 9999px;
  background-color: #f5f5f4;
  color: #44403c;
  border: 1px solid #e7e5e4;
  padding: 0.125rem 0.5rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.tom-select-placeholder-value {
  flex: 1 1 auto;
  min-width: 0;
}

.ts-wrapper.single.has-items .ts-control {
  flex-wrap: nowrap;
}

.ts-wrapper.single.has-items .ts-control > div {
  flex: 0 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #1c1917;
  font-size: 1rem;
  line-height: 1.5rem;
}

.ts-wrapper.single.has-items .ts-control > input {
  flex: 1 1 auto;
  min-width: 1rem;
}

.tom-select-placeholder-value,
.tom-select-option,
.tom-select-single-value {
  display: flex;
  align-items: center;

  .highlight {
    font-weight: 600;
  }

  .tom-select-recent-badge {
    margin-left: 0.5rem;
  }
}

.tom-select-single-value {
  white-space: nowrap;
}

.tom-select-option-label,
.tom-select-single-value-label {
  min-width: 0;
}

.tom-select-recent-badge {
  flex-shrink: 0;
  border-radius: 9999px;
  background-color: #f5f5f4;
  color: #78716c;
  border: 1px solid #e7e5e4;
  padding: 0.0625rem 0.375rem;
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
  line-height: 1.125rem;
}

.ts-wrapper.single .ts-control {
  cursor: pointer;
}

.tom-select-field.tom-select-ready .tom-select-placeholder {
  display: none;
}

select.tom-select-source,
.ts-hidden-accessible {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.ts-wrapper.single .ts-control,
.ts-wrapper.multi .ts-control {
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ts-wrapper.focus .ts-control {
  border-color: color-mix(in srgb, var(--color-artesian, #b91c1c) 50%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-artesian, #b91c1c) 20%, transparent);
  outline: none;
}

.ts-wrapper.multi .ts-control > div.active {
  background-color: #e7e5e4;
}

.ts-wrapper.multi .ts-control > div .remove {
  border-left: 0;
  margin-left: 0.25rem;
  padding-left: 0.25rem;
  color: #78716c;
}

.ts-wrapper.multi .ts-control > div .remove:hover {
  background: transparent;
  color: #44403c;
}

.ts-wrapper .ts-control > input {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  max-width: 100%;
  color: #1c1917;
  border: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
}

.ts-wrapper .ts-control > input:focus,
.ts-wrapper .ts-control > input:focus-visible {
  border: 0;
  box-shadow: none;
  outline: none;
}

.ts-wrapper.multi:not(.has-items) .ts-control > input {
  flex: 1 1 100%;
  width: 100%;
}

.ts-wrapper.multi.has-items .ts-control > input {
  min-width: 8rem;
}

.ts-wrapper:not(.has-items) .ts-control > input::placeholder {
  color: #a8a29e;
}

.ts-wrapper.single.has-items .ts-control > input::placeholder {
  color: transparent;
}

.ts-wrapper.input-hidden .ts-control > input {
  position: absolute;
  left: -10000px;
  opacity: 0;
}

.ts-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  margin-top: 0.25rem;
  border-radius: 0.375rem;
  border: 1px solid #e7e5e4;
  background-color: #fff;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  overflow: hidden;
  z-index: 50;
}

.ts-dropdown-content {
  max-height: min(16rem, 50vh);
  overflow-y: auto;
}

.ts-dropdown .option {
  padding: 0.5rem 0.75rem;
  color: #44403c;
  cursor: pointer;
}

.ts-dropdown .option.active {
  background-color: #fef2f2;
  color: #991b1b;
}

.ts-dropdown .no-results {
  padding: 0.5rem 0.75rem;
  color: #78716c;
}

.ts-dropdown .optgroup-header {
  padding: 0.375rem 0.75rem 0.25rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #78716c;
  cursor: default;
  pointer-events: none;
}
