.tag {
  height: 20px;
  border-radius: 10px;
  margin-right: 5px;
  margin-bottom: 10px;
  padding: 0px 8px;
  font-size: var(--jp-ui-font-size1);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  max-width: calc(100% - 25px);
  border: 1px solid var(--jp-border-color1);
  color: var(--jp-ui-font-color1);
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.unapplied-tag {
  background-color: var(--jp-layout-color2);
}

.applied-tag {
  background-color: var(--jp-layout-color3);
}

.add-tag {
  white-space: nowrap;
  overflow: hidden;
  border: none;
  outline: none;
  resize: horizontal;
  font-size: var(--jp-ui-font-size1);
  color: var(--jp-ui-font-color1);
  background: var(--jp-layout-color2);
}

.tag-holder {
  display: flex;
  justify-content: center;
  align-items: center;
}

.tag-label {
  flex: 0 0 auto;
  font-size: var(--jp-ui-font-size1);
  color: var(--jp-ui-font-color1);
  padding: 0px 12px;
}

/* Need a more specific selector to override another rule on .jp-NotebookTools children. */
.jp-NotebookTools .tag-label {
  margin: 0px;
}

/* Need a more specific selector to override another rule .jp-NotebookTools children. */
.jp-NotebookTools div.jp-TagTool {
  margin-top: 4px;
}
