$action-finder-bp: 900px;

.ma__action-finder {
  background-size: cover;
  background-position: top center;
  position: relative;

  &:after {
    content: "";
    height: 100%;
    position: absolute;
      top: 0;
      left: 0;
    width: 100%;
    z-index: 1;
  }

  &--no-background {
    overflow: hidden;

    &:after {
      display: none;
    }
  }

  &__container {

    @include ma-container;
    padding-top: 60px;
    padding-bottom: 60px;
    position: relative;
    z-index: 2;
  }

  &--no-background &__container {
    padding-top: 0;
  }

  &__header {
    font-size: 0;
    margin-bottom: 60px;
  }

  &--no-background &__header {
    position: relative;
    transform: skew(-30deg);
    width: calc(100% - 20px);

    &:before {
      content: '';
      height: 100%;
      position: absolute;
        top: 0;
        right: 99%;
      width: 50vw;
    }
  }

  &__title {

    @include ma-border-decorative;
    padding-bottom: 15px;

    @media ($bp-large-min) {
      display: inline-block;
      margin-bottom: 0;
      margin-right: 1.6129%; // $gutter in % form
      vertical-align: middle;
      width: 66.12903%; // @include span-columns(8 of 12);
    }
  }

  &--no-background &__title {
    margin-right: 0;
    padding: 25px 20px 20px 0;
    transform: skew(30deg);
    width: 100%;
  }

  &__category {

    @include ma-h5;
  }

  h3.ma__action-finder__category {

    @include ma-h3;
  }

  &__search {

    @media ($bp-large-min) {
      display: inline-block;
      vertical-align: middle;
      width: 32.25806%; // @include span-columns(4 of 12);
    }
  }

  &--no-background &__search {
    margin-top: 25px;
    padding-right: 20px;
    position: absolute;
      top: 100%;
      left: 30px;
    transform: skew(30deg);

    @media ($bp-large-min) {
      top: 0;
      right: 0;
      left: inherit;
    }
  }

  &__items {

    @include ma-reset-list;
    display: flex;
      flex-wrap: wrap;
      justify-content: stretch;
  }

  &__items:not(&__items--all) {
    padding-bottom: 25px;

    @media ($bp-medium-min) {
      padding-bottom: 45px;
    }
  }

  .ma__illustrated-link,
  .ma__callout-link {
    display: flex;
    margin-bottom: 20px;
    height: auto;
    width: 100%;
    flex-grow: 0;
    flex-shrink: 1;
    flex-basis: auto;

    @media screen and ($bp-small-min) and ($bp-large-max) {

      @include span-columns(4 of 8);

      @include omega(2n);
      display: flex;
    }

    @media ($bp-large-min) {

      @include span-columns(4 of 12);

      @include omega(3n);
      display: flex;
    }
  }

  &__items--all {

    .ma__callout-link {
      border-width: 0;
    }

    .ma__illustrated-link {
      border-width: 0;
    }
  }

  &--no-background &__items--all {

    .ma__callout-link {
      border-width: 3px;
    }

    .ma__illustrated-link {
      border-width: 3px;
    }
  }

  &__see-all {
    margin-top: -10px;
    position: relative;
    z-index: 2;
  }

  &--no-background &__see-all {
    margin-top: -40px;
  }

  &__see-all-container {

    @include ma-container;
    padding-top: 14px;
    padding-bottom: 14px;
    text-align: right;
  }

  &--no-background &__see-all-container {
    padding-top: 0;
    padding-bottom: 48px;
    text-align: left;
  }

}

//theme
$action-finder-bg-color: tint($c-primary,89%);
$action-finder-border-color: tint($c-primary,50%);

.ma__action-finder {

  &:after {
    background-image: linear-gradient(180deg, rgba(#000,.6), transparent 90%, transparent);
  }

  &--no-background {
    background-image: linear-gradient(180deg, $c-white 50px, $c-bg-section 51px);
  }

  &--no-background &__header {
    background-color: $c-primary;

    &:before {
      background-color: $c-primary;
    }
  }

  &--green &__header {
    background-color: $c-primary-alt;

    &:before {
      background-color: $c-primary-alt;
    }
  }

  &__title {
    color: $c-font-inverse;
  }

  &:not(&--no-background) &__title {

    @include ma-border-decorative($c-highlight,1);
  }

  &__category {
    color: $c-font-inverse;
    font-weight: 500;
  }

  &--no-background &__category {
    color: $c-font-base;
  }

  &__search {

    button {
      color: $c-font-inverse;

      svg {
        fill: $c-font-inverse;
      }
    }
  }

  &__items--all {

    .ma__callout-link {
      background-color: $c-white;
      box-shadow: none;
    }

    .ma__illustrated-link {
      box-shadow: none;

      &__content {
        background-color: $c-white;

        &:after {
          background-color: $c-white;
        }
      }
    }
  }

  &__see-all {
    background-color: $c-primary;

    .ma__decorative-link {

      a {
        color: $c-font-inverse;

        &:hover {
          border-color: rgba($c-font-inverse, .5);
        }
      }

      svg {
        fill: rgba($c-font-inverse, .5);
      }
    }
  }

  &--no-background &__see-all {
    background-color: $c-bg-section;

    .ma__decorative-link {

      a {
        color: $c-font-link;

        &:hover {
          border-color: rgba($c-font-link, .5);
        }
      }

      svg {
        fill: rgba($c-font-link, .5);
      }
    }
  }
}
