.xmd-thread-ref-line {
  align-items: center;
  display: flex;
  gap: 8px;
  line-height: 1.55;
  margin: 6px 0;
  min-width: 0;
}

.xmd-thread-ref-line > i,
.xmd-backlinks-list li > i {
  color: #92979d;
  flex: 0 0 auto;
  font-size: 13px;
}

.xmd-thread-ref-line > a,
.xmd-backlinks-list a {
  color: #85898e;
  font-size: 15px;
  font-weight: 400;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xmd-thread-ref-line > a:hover,
.xmd-backlinks-list a:hover {
  color: #53585e;
  text-decoration: underline;
}

.xmd-thread-ref-line.is-missing {
  color: #999da2;
}

.xmd-thread-ref-count {
  background: #eceeef;
  border-radius: 9px;
  color: #999da2;
  flex: 0 0 auto;
  font-size: 12px;
  line-height: 18px;
  min-width: 24px;
  padding: 0 6px;
  text-align: center;
}

.xmd-backlinks {
  border-bottom: 1px solid #eceeef;
  border-top: 1px solid #eceeef;
  margin-top: 18px;
  padding: 14px 0 12px;
}

.xmd-backlinks-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.xmd-backlinks-list li {
  align-items: center;
  display: flex;
  gap: 8px;
  line-height: 1.55;
  min-width: 0;
  padding: 3px 0;
}

.xmd-backlinks-more {
  align-items: center;
  background: transparent;
  border: 0;
  color: #92979d;
  display: flex;
  font-size: 13px;
  gap: 6px;
  justify-content: center;
  margin: 4px 0 0;
  padding: 4px;
  width: 100%;
}

.xmd-ref-tabs {
  border-bottom: 1px solid #dee2e6;
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
}

.xmd-ref-tab {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: #646b74;
  font-size: 14px;
  padding: 8px 10px;
}

.xmd-ref-tab.is-active {
  border-bottom-color: #246bfd;
  color: #1f2933;
  font-weight: 700;
}

.xmd-ref-results {
  max-height: min(52vh, 460px);
  min-height: 210px;
  overflow-y: auto;
}

.xmd-ref-result {
  align-items: center;
  border-bottom: 1px solid #eceff2;
  display: flex;
  gap: 12px;
  padding: 11px 2px;
}

.xmd-ref-result-main {
  min-width: 0;
}

.xmd-ref-result-title {
  color: #1f2933;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
  margin: 0;
  overflow-wrap: anywhere;
}

.xmd-ref-result-meta {
  color: #7b828b;
  font-size: 12px;
  margin: 3px 0 0;
}

.xmd-ref-insert {
  flex: 0 0 auto;
  margin-left: auto;
}

.xmd-ref-empty {
  color: #737a83;
  padding: 64px 16px;
  text-align: center;
}

.xmd-ref-load-more {
  margin-top: 12px;
  width: 100%;
}

@media (max-width: 575.98px) {
  .xmd-ref-tabs {
    overflow-x: auto;
  }

  .xmd-ref-tab {
    flex: 0 0 auto;
  }
}
