@import "settings.breakpoints";
@import "settings.colors";

@import "mixins/tools.mixins";

.o-package-feed {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid $color-stone-200;
  background-color: $color-white;
  margin-bottom: rem(26);
  @include mq($from: mobileWide) {
    border: 1px solid $color-stone-200;
  }
  .o-package-feed__col {
    flex: 100%;
    @include mq($from: mobileWide) {
      flex: 1;
    }
    @include mq($from: tabletWide) {
      flex: 2;
    }
    .o-card {
      @include mq($from: mobileWide) {
        border: none;
      }
    }
    .c-image-container {
      margin-bottom: rem(10);
    }
    &:first-of-type {
      @include mq($from: tabletWide) {
        flex: 1;
      }
      .o-card__content-text {
        font-size: rem(24);
        margin-bottom: 0;
        margin-top: 0;
      }
      .o-card__content {
        display: block;
      }

    }
  }

  .o-card {
    margin-top: 0;
    margin-bottom: 0;
    border-bottom: none;
  }
}

// This is used for the Template #2 package at the top of the page. The second column contains nested rows and columns  depending on the breakpoint so this 'subpackage' modifier allows for that to happen
.o-package-feed--subpackage {
  border: none;
  margin-bottom: 0;

  .o-package-feed__col {
    @include mq($from: mobileWide) {
      flex: 100%;
    }
    @include mq($from: tabletWide) {
      flex: 1;
    }

    .c-image-container {
      display: none;
      @include mq($from: $max-container-width-desktop) {
        display: block;
      }
    }
    // Secord story card
    &:first-of-type {
      .o-card {
        border-bottom: none;
        @include mq($from: mobileWide) {
          border-bottom: 1px solid $color-stone-200;
        }
        @include mq($from: tabletWide) {
          border-bottom: none;
        }
      }

      .c-image-container {
        @include mq($from: tabletWide) {
          display: block;
        }
      }
      .o-card__content-group {
        margin-top: 0;
        margin-bottom: rem(2);
        @include mq($from: tabletWide) {
          margin-bottom: 0;
          margin-top: 0;
        }
      }
      .o-card__content-text {
        font-size: rem(17);
        @include mq($from: tabletWide) {
          font-size: rem(24);
        }
      }
    }
    .o-card {
      @include mq($from: mobileWide) {
        border-bottom: 1px solid $color-stone-200;
      }
    }
    // Last 4 story cards in the package feed
    &:last-of-type {
      .o-card {
        &:last-of-type {
          border-bottom: none;
        }
      }
      .o-card__col {
        flex: 3;
        &:last-of-type {
          display: none;
          flex: 1;
          @include mq($from: $max-container-width-desktop) {
            display: block;
          }
        }
      }
    }
  }
}
