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

@import "mixins/settings.fonts";
@import "mixins/objects.member-feature";
@import "mixins/tools.mixins";

.o-member-feature {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
}

.o-member-feature__label,
.o-member-feature__content {
  @include display-grid;
  @include grid-template-columns(0, rem(20) 1fr rem(20));
  &> * {
    @include grid-column(2, 3);
  }
}

.o-member-feature__label-heading {
  @include font-gm-sans-bold;
  color: $color-white;
  font-size: rem(14);
  letter-spacing: rem(1);
  line-height: line-height(14, 14);
  text-transform: uppercase;
  padding: rem(14) 0;
  margin: 0;
}

.o-member-feature__label-link {
  color: $color-white;
  text-decoration: underline;
  &:visited {
    color: $color-white;
  }
  &:hover,
  &:focus {
    color: $color-grey-300;
  }
  &:active {
    color: $color-grey-500;
  }
}

.o-member-feature__content {
  padding: rem(20) 0 rem(25) 0;
}

.o-member-feature__title {
  margin: 0 0 rem(25);
  @include font-pratt-italic;
  font-weight: normal;
  color: $color-white;
  font-size: rem(32);
  line-height: 1;
  letter-spacing: 0;
  text-align: left;
}

// Background colours

.o-member-feature,
.o-member-feature--grey {
  .o-member-feature__label {
    background-color: #000;
  }
  .o-member-feature__content {
    @include gradient-background(to bottom, $color-grey-700, $color-grey-900);
  }
}

.o-member-feature--gold {
  .o-member-feature__label {
    background-color: #886132;
  }
  .o-member-feature__label-link {
    &:hover,
    &:focus {
      color: $color-stone-100;
    }
    &:active {
      color: $color-stone-200;
    }
  }
  .o-member-feature__content {
    @include gradient-background(to bottom, $color-gold-900, #6e502d);
  }
}

.o-member-feature--jade {
  .o-member-feature__label {
    background-color: #274745;
  }
  .o-member-feature__content {
    @include gradient-background(to bottom, #005E5D, #002323);
  }
}

.o-member-feature--purple {
  .o-member-feature__label {
    background-color: #31282C;
  }
  .o-member-feature__content {
    @include gradient-background(to bottom, #524349, #201a1d);
  }
}

.o-member-feature--red {
  .o-member-feature__label {
    background-color: $color-red-900;
  }
  .o-member-feature__label-link:active {
    color: $color-grey-300;
  }
  .o-member-feature__content {
    @include gradient-background(to bottom, $color-red-800, #5e090d);
  }
}

// 4 column items
.o-member-feature-4columns-item {
  border-top: 1px solid rgba($color-white, .45);
  border-left: none;
  padding: rem(25) 0;
  color: $color-white;
  &:nth-of-type(1) {
    border-top: none;
    padding-top: 0;
  }
}

.o-member-feature-4columns-item--no-link {
  @include display-grid;
}

.o-member-feature-4columns-link {
  @include display-grid;
  color: $color-white;
  text-decoration: none;
  &:visited {
    .o-member-feature-4columns-item__title {
      text-decoration: underline;
      color: $color-white;
    }
  }
  &:hover,
  &:focus {
    .o-member-feature-4columns-item__title {
      text-decoration: underline;
      color: $color-grey-200;
    }
  }
  &:active {
    .o-member-feature-4columns-item__title {
      text-decoration: underline;
      color: $color-grey-100;
    }
  }
}

.o-member-feature__link-icon {
  width: rem(10);
  height: rem(10);
  margin: 0;
  fill: $color-white;
}

.o-member-feature__icon {
  @include grid-column(1, 2);
  @include grid-align-self(start);
  fill: $color-white;
}

.o-member-feature-4columns-item__content-container {
  @include grid-column(2, 3);
  // If the item is not linked, hide the link arrow on the title
  .o-member-feature-4columns-item > & {
    .o-member-feature__link-icon {
      display: none;
    }
  }
}

.o-member-feature-4columns-item__title {
  @include font-gm-sans-bold;
  font-size: rem(14);
  line-height: line-height(14, 14);
  letter-spacing: rem(1);
  text-transform: uppercase;
  margin: 0 0 rem(10) rem(20);
}

.o-member-feature-4columns-item__text {
  @include font-gm-sans;
  font-size: rem(14);
  line-height: line-height(14, 18);
  letter-spacing: rem(0.3);
  padding: 0;
  margin: 0 0 0 rem(20);
}

// Media queries

@include mq($from: tablet) {
  @include member-feature-sm;
}

@include mq($from: tabletWide) {
  @include member-feature-md;
}

@include mq($from: desktop) {
  @include member-feature-lg;
}
