.fixture {
  min-width: 0;
}

.wrapper {
  position: relative;
  display: inline-grid;
  width: max-content;
  max-width: 100%;
  min-width: 160px;
}

.wrapper[data-stretch="true"] {
  width: 100%;
}

.trigger {
  display: inline-flex;
  width: 100%;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 0 34px 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: color-mix(in srgb, var(--surface-raised) 92%, transparent);
  color: var(--text-primary);
  font: inherit;
  line-height: 1;
  pointer-events: none;
}

.trigger[data-size="sm"] {
  min-height: 30px;
  border-radius: min(var(--radius-control), 10px);
}

.value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  opacity: 0;
  cursor: pointer;
}

.icon {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 16px;
  height: 16px;
  color: var(--text-tertiary);
  pointer-events: none;
  transform: translateY(-50%);
}

.select:focus-visible + .icon,
.wrapper:focus-within .trigger {
  border-color: color-mix(in srgb, var(--accent) 52%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent);
}
