.c-search-result {
  background: $white;
  padding: 0 0 $spacing 0;
  margin-bottom: $spacing--large;
  border: 1px solid $brand-grey--light;

  @include mq(desktop) {
    padding: $spacing--medium;
  }

  &__heading-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    .c-button--link {
      @include font-size(16px, 18px);
      box-shadow: inset 0 0;
      &:hover, &:focus {
        box-shadow: inset 0 -1px;
      }
    }
  }

  &__heading {
    display: none;
    margin: 0;
    @include font-size(24px, 32px);
    font-weight: 400;

    @include mq(desktop) {
      display: block;
    }

    span {
      font-weight: 600;
    }
  }

  & > h2 {
    @include visually-hidden();
  }

  &__narrow-result {
    @include mq(desktop) {
      display: none;
    }
  }

  .c-tabs {
    display: none;

    @include mq(desktop) {
      display: block;
    }
  }

  .c-search-filter {
    display: none;

    @include mq(desktop) {
      display: block;
    }
  }

  &__current-goal {
    margin: $spacing--medium $spacing 0 $spacing--small*1.4;

    li {
      &:last-child {
        margin-bottom: 0;
      }
    }
  }

  &__current-goal-info {
    margin: $spacing--small 0 $spacing--large $spacing--large + 2;
    @include font-size(16px, 20px);
    @include mq(desktop) {
      margin-left: $spacing--small + 4px;
    }
  }

  &__competence-goals {
    background: $brand-color--lighter;
    padding: $spacing + $spacing--large $spacing $spacing;
    margin-top: -24px - $spacing--large;
    margin-bottom: -$spacing;
    @include mq(desktop) {
      margin-top: $spacing;
      margin-bottom: $spacing;
    }
  }

  &__close-competencegoals-btn {
    @include mq($until: desktop) {
      margin-top: $spacing--large;
      margin-left: $spacing + $spacing--small;
    }
    @include mq($until: mobileWide) {
      margin-left: $spacing;
    }
  }
}

.c-search-result-list {
  list-style: none;
  margin: 0;
  padding: 0;

  @include mq(desktop) {
    margin: $spacing--medium 0 0 0;
  }

  &__empty {
    margin-top: $spacing--large;
    h1 {
      @include font-size(22px, 32px);
      font-weight: $font-weight-bold;
      margin: 0 0 $spacing--small;
    }

    p {
      @include font-size(16px, 22px);
      margin: 0;
      font-family: $font-serif;

      @include mq(desktop) {
        @include font-size(18px, 32px);
      }
    }
  }
}

.c-search-result-item {
  border-bottom: 1px solid $brand-grey--light;
  padding: 0 $spacing 0 $spacing;

  @include mq(desktop) {
    padding: 0;
  }

  margin: 0 0 $spacing;

  &:first-child {
    margin-top: $spacing;
  }

  &:last-child {
    border-bottom: 0;
    margin-bottom: 0;
  }

  &__content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    & > img {
      width: 75px;
      height: auto;
      flex-shrink: 0;
      margin: 0 0 $spacing--small $spacing--small;

      @include mq(tabletWide) {
        width: 80px;
        margin-left: $spacing;
        margin-right: $spacing--small;
      }
    }
  }

  &__ingress {
    margin: 0 0 $spacing 0;
    max-width: 600px;
    @include font-size(14px, 22px);
    flex-grow: 1;
    font-family: $font-serif;

    @include mq(desktop) {
      @include font-size(16px, 24px);
    }
  }

  &__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;

    .c-content-type-badge {
      margin: 0 $spacing--small / 2 0 0;
    }

    > * {
      margin: 0 $spacing--small $spacing--small 0;
    }

    @include mq($until: tablet) {
      h1 {
        width: 100%;
      }
    }
  }

  &__content-type-wrapper {
      margin: 0 $spacing--small $spacing--small 0;
      display: flex;
      align-items: center;
  }

  &__additional {
    display: flex;
    align-items: center;
  }

  &__content-type-label {
    color: $text-light-color;
    text-transform: uppercase;
    @include font-size(14px, 18px);
    // display: none;
    margin-top: 2px;
    /*
    @include mq(desktop) {
      display: inline;
    }
    */
  }

  &__pills {
    background: $brand-grey--lightest;
    margin-right: $spacing--small;
    padding: 0 $spacing--small / 3;
    border-radius: $border-radius;
    @include font-size(12px, 20px);
    font-weight: $font-weight-semibold;
  }

  &__breadcrumb {
    list-style: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    color: $text-light-color;
    margin-bottom: $spacing--small;

    @include font-size(14px, 18px);

    @include mq(desktop) {
      @include font-size(16px, 24px);
    }

    .c-icon {
      width: 12px;
      height: 12px;
      margin: 0 $spacing--small/3;

      @include mq(desktop) {
        margin: 0 $spacing--small/2;
      }
    }
  }

  &__subjects {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: $spacing;
    @include font-size(14px, 16px);

    @include mq(desktop) {
      @include font-size(16px, 18px);
    }

    & > span {
      text-transform: uppercase;
      color: $text-light-color;
      padding-right: $spacing--small;
      @include font-size(14px, 16px);
    }

    ul {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      list-style: none;
      margin: 0;
      padding: 0;
    }

    li {
      margin: 0;
      position: relative;
      line-height: 1rem;

      padding: 0 $spacing--small/2 0 0;
      margin-right: $spacing--small/2;

      @include mq(desktop) {
        padding: 0 $spacing--small 0 0;
        margin-right: $spacing--small;
      }

      &:after {
        content: '';
        width: 1px;
        height: 15px;
        background: $brand-grey--light;
        display: block;
        position: absolute;
        right: 0;
        top: 3px;
      }

      &:first-child {
        font-weight: 600;
      }

      &:last-child {
        &:after {
          display: none;
        }

        margin-right: 0;
      }
    }
  }

  h1 {
    font-weight: 600;
    @include font-size(16px, 20px);

    @include mq(desktop) {
      @include font-size(22px, 28px);
    }

    a {
      color: $brand-color--dark;

      &:hover,
      &:focus,
      &:active {
        color: $brand-color--dark;
      }
    }
  }
}
