.category-list {
  margin-bottom: 10px;
  width: 100%;

  td,
  th {
    @extend .list-cell;
  }

  td {
    vertical-align: top;
  }

  th {
    vertical-align: middle;
  }

  td:first-of-type {
    padding-left: 10px;
  }

  &.with-topics {
    margin-left: 3px;
    .category {
      width: 45%;
    }
  }

  .topics .badge-notification,
  .category .badge-notification {
    background-color: transparent;
    color: dark-light-choose($primary-medium, $secondary-high);
  }

  .topics {
    width: 80px;
    text-align: right;

    .value {
      font-size: $font-up-1;
    }
    .unit {
      font-size: $font-down-1;
    }
    .badge-notification {
      display: block;
      text-align: right;
      padding-right: 0;
      margin-top: 5px;
    }
  }

  .subcategories {
    margin-top: 0.25em;
    clear: both;
    .subcategory {
      display: inline-flex;
      align-items: baseline;
      margin-right: 0.3em;
    }
    .badge-wrapper {
      margin-right: 0.5em;
    }
    .badge-notification.new-posts {
      display: block;
      padding: 0;
    }
  }

  .featured-topic {
    margin: 10px 0 0;
    display: flex;
    align-items: baseline;
    &:first-of-type {
      margin-top: 13px;
    }
    a.last-posted-at,
    a.last-posted-at:visited {
      font-size: $font-down-1;
      color: dark-light-choose($primary-medium, $secondary-high);
    }
    .title {
      @include ellipsis;
      flex: 0 1 auto;
    }
    .topic-statuses {
      margin-right: 0.15em;
    }
    .topic-post-badges .badge.new-posts,
    .title {
      margin-right: 5px;
    }
  }

  tbody {
    .category {
      border-left: 6px solid;
      h3,
      h4 {
        line-height: $line-height-medium;
        a[href] {
          color: $primary;
        }
      }

      h3 {
        font-size: $font-up-2;
      }

      h4 {
        font-size: $font-up-1;
      }
    }

    .latest {
      padding: 0 0 10px 10px;
    }
  }
}

.categories-and-latest,
.categories-and-top {
  display: flex;
  flex-flow: row wrap;

  div.column {
    flex: 1 0 0px;
    flex-direction: row;
    min-width: 300px;
  }

  div.column.categories {
    @media all and (max-width: 600px) {
      margin-right: 0;
    }
    @media all and (min-width: 600px) {
      margin-right: 1em;
    }
    @media all and (min-width: 700px) {
      margin-right: 2em;
    }
  }

  .discourse-tags {
    display: inline-block;
    .discourse-tag {
      font-size: $font-down-1;
    }
  }

  .topic-featured-link {
    padding-left: 8px;
  }

  .subcategories-with-subcategories {
    .category-description {
      display: none;
    }
  }
}
