.ts-wrapper {
  --ts-control-height: 2.5rem;
  --ts-control-padding-x: 0.75rem;

  height: auto !important;
  overflow: visible !important;
}

.ts-wrapper.loading {
  & {
    aspect-ratio: unset !important;
    mask-image: unset !important;
  }
}

.ts-wrapper.select {
  display: flex !important;
  align-items: center;
  width: min(100%, 20rem);
  height: var(--ts-control-height);
  min-height: var(--ts-control-height);
  padding: 0 !important;
  color: inherit;
  cursor: pointer;
}

.ts-wrapper.dropdown-active {
  z-index: 50;
}

.ts-wrapper.select.disabled {
  color: color-mix(in oklab, var(--color-base-content) 40%, transparent);
  cursor: not-allowed;
}

.ts-wrapper.disabled .ts-control,
.ts-wrapper.disabled .ts-control * {
  cursor: not-allowed !important;
  opacity: 1;
}

.ts-wrapper.disabled .ts-control > input,
.ts-wrapper.disabled .ts-control > input::placeholder,
.ts-wrapper.disabled .item {
  color: inherit !important;
  -webkit-text-fill-color: currentColor;
}

.ts-wrapper.single .ts-control {
  padding: 0 calc(var(--ts-control-padding-x) + 1rem) 0 var(--ts-control-padding-x) !important;
}

.ts-wrapper.multi.select {
  height: auto;
  min-height: var(--ts-control-height);
}

.ts-wrapper.multi .ts-control {
  max-height: 8rem;
  overflow-y: auto;
}

.ts-control {
  border: 0 !important;
  background-color: transparent !important;
  color: inherit;
  font: inherit;
}

.ts-control > input {
  color: inherit;
  font: inherit;
}

.ts-dropdown {
  z-index: 60;
  left: -1px;
  width: calc(100% + 2px);
  margin-top: 0.5rem;
  border: 0;
  border-radius: inherit !important;
  background-color: inherit;
  color: inherit;
  font: inherit;
  box-shadow:
    0 12px 28px color-mix(in oklab, #000 12%, transparent),
    0 2px 8px color-mix(in oklab, #000 7%, transparent);
  overflow: hidden;
}

.ts-wrapper.ts-dropdown-up .ts-dropdown {
  top: auto;
  bottom: 100%;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.ts-dropdown-content {
  padding: 0.5rem 0.625rem;
}

.ts-dropdown .option {
  padding: 0.375rem 0.75rem 0.375rem 1.75rem;
  font: inherit;
  border-radius: 0.375rem !important;
}

.ts-dropdown [data-selectable].option {
  position: relative;
  color: inherit;
}

.ts-dropdown .option.selected::before {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 0.5rem;
  line-height: 1;
  transform: translateY(-50%);
}

.ts-dropdown .active:not(.selected) {
  border-radius: inherit;
  background-color: color-mix(
    in oklab,
    var(--color-base-content) 10%,
    transparent
  );
  color: var(--color-base-content);
}

.ts-dropdown .option.selected {
  background-color: transparent;
}

.ts-hidden-accessible {
  height: 1px !important;
  max-height: 1px !important;
}

.form-inputs > .fieldset {
  min-width: 0;
}

.ts-wrapper.select {
  min-width: 0;
}

.ts-wrapper.single .ts-control > .item {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

.ts-dropdown [data-selectable] {
  overflow: visible !important;
  white-space: normal !important;
}
