.topic-title-outlet.choose-tags {
  margin-left: 25px;
  margin-top: 3px;
}

.tags-list {
  margin-top: 2em;
  padding-bottom: 1em;
  border-bottom: 1px solid var(--primary-low);
}

#list-area .tags-list h3 {
  margin-bottom: 20px;
}

.tags-list .tag-box {
  display: inline-block;
  width: 300px;
  margin-bottom: 1em;
  float: left;
  vertical-align: middle;

  .discourse-tag {
    font-size: $font-0;
  }

  .tag-count {
    font-size: $font-down-1;
    vertical-align: middle;
    line-height: $line-height-small;
  }
}

.topic-category {
  display: flex;
  flex-wrap: wrap;
  align-items: center;

  .topic-header-extra {
    display: inline-flex;
    align-items: center;
  }

  .badge-wrapper {
    margin-top: 0;
  }
}

.discourse-tag-count {
  font-size: $font-down-1;
  color: var(--primary-medium);
}

.discourse-tag {
  max-width: 14em;
  display: inline-block;
  @include ellipsis;
  vertical-align: middle;
}

.discourse-tag {
  margin: 0;
  color: var(--primary-medium);

  &:visited,
  &:hover {
    color: var(--primary-medium);
  }

  .extra-info-wrapper & {
    color: var(--header_primary-high) !important;
  }

  &.large {
    font-size: $font-up-3;
  }

  &.box {
    background-color: var(--primary-low);
    color: var(--primary-high);
    padding: 2px 8px;
    .extra-info-wrapper & {
      background-color: var(--header_primary-low);
      color: var(--header_primary-medium);
    }
  }

  &.simple,
  &.simple:visited,
  &.simple:hover {
    color: var(--primary-high);
  }

  &.bullet {
    margin-right: 0.5em;
    display: inline-flex;
    align-items: center;
    &:before {
      background: var(--primary-low-mid);
      margin-right: 5px;
      position: relative;
      width: 9px;
      height: 9px;
      display: inline-block;
      content: "";
    }
    &.large:before {
      width: 13px;
      height: 13px;
    }
  }
}

.discourse-tags,
.list-tags,
.search-category {
  .discourse-tag.simple:not(:last-child):after {
    content: ", ";
    margin-left: 1px;
  }
}

.d-header .topic-header-extra {
  .discourse-tags {
    font-size: $font-down-1;
  }
  .discourse-tags + .topic-featured-link {
    margin-left: 8px;
  }
}

.discourse-tags {
  display: inline-flex;
  flex-wrap: wrap;
  a {
    margin-right: 0.25em;
  }
}

.fps-result .add-full-page-tags {
  display: inline-block;
}

.topic-list-item {
  .discourse-tags {
    font-weight: normal;
    font-size: $font-down-1;
  }
}

.mobile-view .topic-list-item .discourse-tags {
  display: inline-flex;
  flex-wrap: wrap;
  font-size: $font-down-1;
  margin-top: 0;
  .discourse-tag {
    margin-right: 0.2em;
  }
  .discourse-tag.box {
    position: relative;
    top: 0;
  }
}

header .discourse-tag {
  color: var(--primary-medium);
}

.list-tags {
  display: inline-block;
  margin-right: 3px;
  font-size: $font-down-1;
}

.tag-chooser {
  width: 100%;
  max-width: 100%;
}

.title-wrapper .tag-chooser {
  width: 500px;
}

.tag-sort-options {
  margin-bottom: 20px;
  a {
    text-decoration: underline;
  }
  span.active a {
    font-weight: bold;
  }
}

.autocomplete {
  a {
    color: var(--primary-medium);
  }

  .d-icon-tag {
    padding-right: 5px;
    vertical-align: middle;
    height: 0.9em;
  }
}

.tags-admin-menu {
  margin-top: 20px;
  ul {
    width: 320px;
  }
}

.tag-groups-container {
  margin-top: 20px;
  .content-list {
    width: 20%;
    float: left;
    margin: 20px 0;
    ul {
      margin-bottom: 10px;
    }
    .btn {
      margin-left: 10px;
    }
  }
  .tag-group-content {
    width: 75%;
    float: right;
    section {
      margin-bottom: 20px;
    }
    label {
      font-size: $font-0;
      display: inline-block;
      margin-right: 10px;
    }
    .btn {
      margin-right: 10px;
    }
    h1 input {
      width: 100%;
    }
    .group-access-control {
      margin-left: 44px;
      margin-bottom: 10px;
    }
  }
  .tag-group-controls {
    display: flex;
  }
  .group-tags-list .tag-chooser {
    width: 100%;
  }
  .saving {
    margin-left: 20px;
  }
  .parent-tag-section {
    .tag-chooser {
      width: 200px;
      margin-right: 10px;
    }
  }
}

section.tag-info {
  margin: 1em 0;
  padding: 2em;
  border: 1px solid var(--primary-low);

  .field {
    margin: 0 0 0.5em;
  }

  .btn {
    margin-right: 0.5em;
  }

  .tag-name .discourse-tag {
    display: block;
    margin-bottom: 0.75em;
  }

  .synonyms-list,
  .add-synonyms,
  .tag-associations {
    margin-top: 1em;
    @include clearfix;
  }

  .synonyms-list {
    margin: 2em 0 0;
  }

  .tag-list {
    margin: 1em 0 0 0;
    padding: 0;
    border: none;
    @include clearfix;
    a {
      color: var(--primary-medium);
      margin-left: 0.25em;
    }
  }
}

.tag-navigation {
  .mini-tag-chooser.tags-intersection-chooser {
    margin: 0 0.5em 0 0;
  }
}

body.tags-intersection {
  .category-breadcrumb {
    margin-right: auto;
  }
}

.tags-controls {
  display: flex;
  h2 {
    order: -1;
    margin-right: auto;
  }
}
