@import "settings.colors";

@import "mixins/settings.fonts";
@import "mixins/objects.author-header";
@import "mixins/tools.functions";
@import "mixins/tools.mixins";

.o-author-header__content {
  background: $color-stone-200;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  margin-top: rem(20);
  padding: rem(10) 0;
  @include display-grid;
  @include grid-template-columns(rem(20) 1fr rem(20));
  @include grid-template-rows(grid-repeat(2, auto));
  &> * {
    @include grid-column(2, 3);
  }
}

.o-author-image {
  padding-bottom: rem(20);
  @include grid-row(1, 2);
}

.o-author-meta {
  @include grid-row(2, 3);
}

.o-author-meta__details,
.o-author-meta__contact {
  margin-bottom: rem(15);
  padding-top: 0;
}

.o-author-meta__details {
  @include font-gm-sans-bold;
  font-size: rem(14);
  color: $color-grey-900;
  letter-spacing: rem(1);
  line-height: line-height(14, 14);
  text-transform: uppercase;
}

.o-author-meta__contact-link {
  @include font-pratt;
  color: $color-grey-900;
  font-size: rem(16);
  line-height: line-height(16, 22);
  text-decoration: none;
  border-bottom: 1px solid $color-grey-900;
  &:hover {
    color: $color-red-500;
    border-bottom: 1px solid $color-red-500;
  }
  &:focus {
    color: $color-red-bright;
    border-bottom: 1px solid $color-red-bright;
  }
}

.o-author-meta__social__list {
  list-style-type: none;
  padding: 0;
  margin: 0;

  li {
    display: inline-block;
  }
}

.o-author-meta__social-link {
  display: block;
  width: rem(44);
  height: rem(44);
  text-align: center;
  padding: rem(12);

  &:visited {
    .o-author-meta__social-icon {
      fill: $color-grey-500;
    }
  }
  &:hover {
    .o-author-meta__social-icon {
      fill: $color-grey-700;
    }
  }
  &:focus,
  &:active {
    .o-author-meta__social-icon {
      fill: $color-grey-900;
    }
  }
}

.o-author-meta__social-icon {
  width: rem(20);
  height: rem(20);
  fill: $color-grey-500;
}

// Media queries

@include mq($from: tablet) {
  @include author-image-sm;
}

@include mq($from: tabletMedium) {
  @include author-image-md;
}

@include mq($from: desktop) {
  @include author-image-lg;
}
