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

.tags-list {
  margin-top: 2em;
  padding-bottom: 1em;
  border-bottom: 1px solid $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;
  }
}

.tag-show-heading {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: hidden;
  @include breakpoint(mobile-large) {
    width: 100%;
  }
  .d-icon {
    margin: 0 0.25em;
  }
}

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

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

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

$tag-color: $primary-medium;

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

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

.discourse-tag {
  margin: 0;
  color: $tag-color;

  &:visited,
  &:hover {
    color: $tag-color;
  }

  .extra-info-wrapper & {
    color: $header-primary_high !important;
  }

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

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

  &.simple,
  &.simple:visited,
  &.simple:hover {
    margin-right: 0;
    color: $primary-high;
  }

  &.bullet {
    margin-right: 0.5em;
    display: inline-flex;
    align-items: center;
    &:before {
      background: $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 {
  .discourse-tag.simple:not(:last-child):after {
    content: ", ";
    margin-left: 1px;
  }
}

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

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

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

.categories-list .topic-list-latest .discourse-tags {
  display: inline-block;
}

.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: $tag-color;
}

.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 {
  .d-icon-tag {
    color: dark-light-choose($primary, $primary-low-mid);
    padding-right: 5px;
  }

  a {
    color: $tag-color;
  }
}

.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-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 $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: $primary-medium;
      margin-left: 0.25em;
    }
  }
}
