.ms-wrapper {
  position: relative;
  width: 100%;            /* adjust as needed */
  font-family: Arial, sans-serif;
}

/* Display: space for badge (left) + text (center) + caret (right) */
.ms-display {
  position: relative;
  padding: 8px;   /* right padding for caret, left padding for badge */
  border: 1px solid #aaa;
  background: #fff;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 10px;                    /* space between badge and text */
}

/* Put the text in the middle, allow it to truncate if long */
.ms-text {
  flex: 1 1 auto;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

/* Caret stays on the far right */
.ms-caret {
  flex: 0 0 auto;
  font-size: 14px;
  margin-left: 4px;
}

/* Badge now on the LEFT */
.ms-badge {
  display: none;                /* only shown when count > 0 */
  flex: 0 0 auto;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;               /* allows 2+ digits; remove for strict circle */
  border-radius: 999px;         /* circle/pill */
  background: #2563eb;          /* theme color */
  color: #fff;
  font-size: 12px;
  line-height: 22px;
  text-align: center;
  font-weight: 600;
  align-items: center;
  justify-content: center;
}

/* Dropdown (unchanged) */
.ms-dropdown {
  position: absolute;
  width: 100%;
  background: #fff;
  border: 1px solid #aaa;
  border-radius: 4px;
  margin-top: 3px;
  display: none;
  max-height: 250px;
  overflow-y: auto;
  z-index: 999;
}
.ms-dropdown.show { display: block; }

.ms-search {
  width: 95% !important;
  margin: 8px;
  padding: 15px 5px !important;
  border-radius: 2px;
}

.ms-option {
  padding: 6px 10px;
  cursor: pointer;
  display: flex;
  gap: 10px;
}
.ms-option:hover { background: #f3f3f3; }