.tag {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 0;
  min-height: 30px;
  color: var(--theme-color, #1370b5);
  background: var(--theme-surface, #fff);
  border: 1px solid var(--theme-color, #1370b5);
  font-size: 15px;
  line-height: 1;
  font-weight: 650;
  text-decoration: none;
  transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s ease;
}

.tag:hover,
.tag:focus-visible,
.tag.is-active {
  color: var(--theme-on-color, #fff);
  background: var(--theme-color, #1370b5);
  text-decoration: none;
  transform: translateY(-1px);
}

.tag--arrow {
  padding: 0 18px 0 14px;
  border-right: 0;
  border-radius: 5px 0 0 5px;
}

.tag--arrow::before,
.tag--arrow::after {
  content: "";
  position: absolute;
  top: 50%;
  transition: inherit;
}

.tag--arrow::before {
  left: 100%;
  width: 21px;
  height: 21px;
  border: 1px solid var(--theme-color, #1370b5);
  border-left: 0;
  border-bottom: 0;
  border-radius: 0 4px 0 0;
  background: var(--theme-surface, #fff);
  transform: translate(-50%, -50%) rotate(45deg);
}

.tag--arrow::after {
  left: 8px;
  width: 7px;
  height: 7px;
  border: 1px solid var(--theme-color, #1370b5);
  border-radius: 50%;
  background: var(--theme-surface, #fff);
  transform: translateY(-50%);
}

.tag--arrow:hover::before,
.tag--arrow:focus-visible::before,
.tag--arrow.is-active::before {
  background: var(--theme-color, #1370b5);
}

.tag--arrow:hover::after,
.tag--arrow:focus-visible::after,
.tag--arrow.is-active::after {
  border-color: var(--theme-on-color, #fff);
  background: var(--theme-on-color, #fff);
}

.tag--pill {
  padding: 0 12px;
  border-radius: 999px;
}

.tag--compact {
  min-height: 24px;
  padding: 0 10px;
  border-radius: var(--theme-radius-xs, 4px);
  font-size: 13px;
}

.tag__label {
  position: relative;
  z-index: 1;
}

.tag--arrow .tag__label {
  margin-left: 10px;
}

.tag__count {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  min-height: 18px;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: var(--theme-radius-xs, 4px);
  color: var(--theme-on-color, #fff);
  background: var(--theme-color, #1370b5);
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  transition: inherit;
}

.tag:hover .tag__count,
.tag:focus-visible .tag__count,
.tag.is-active .tag__count {
  color: var(--theme-color, #1370b5);
  background: var(--theme-on-color, #fff);
}
