.author {
  align-items: flex-start;
  display: flex;
  margin-bottom: 2.4rem;

  &:last-child {
    margin-bottom: 0;
  }

  @include media-breakpoint-down(lg) {
    flex-wrap: wrap;
  }
}

.authorDetails {
  display: flex;
  flex: 1;
  width: max-content;

  // padding-right: 1.2rem;

  @include media-breakpoint-down(sm) {
    flex-wrap: wrap;
  }
}

.authorDetailsWrapper {
  flex: 1 100%;

  @include media-breakpoint-up(sm) {
    flex: 1;
  }

  @include media-breakpoint-up(md) {
    padding-right: 1.2rem;
  }
}

.authorName {
  border: none !important;
  font-size: 1.7rem;
  font-weight: 500;
  margin-bottom: 0.8rem;
}

.authorAbout {
  font-size: 1.5rem;
  color: rgb(0 0 0 / 60%);
  word-break: break-word;
}

.authorSubscribe {
  align-items: center;
  display: flex;
  padding: 0 0 0 42px;

  a {
    background: #f7f7f7;
    border: none;
    display: inline-block;
    height: 32px;
    margin-right: 0.4rem;
    position: relative;
    transition: background-color 0.2s;
    vertical-align: middle;
    width: 32px;

    &::before {
      background-image: url(/icons/user-link-default.svg);
      background-repeat: no-repeat;
      background-position: 50% 50%;
      background-size: contain;
      content: '';
      filter: invert(1);
      height: 18px;
      left: 50%;
      position: absolute;
      top: 50%;
      transform: translate(-50%, -50%);
      transition: filter 0.2s;
      width: 18px;
    }

    &:hover {
      background: #000;

      &::before {
        filter: invert(0);
      }
    }
  }

  a[href*='facebook.com/'] {
    &::before {
      background-image: url(/icons/facebook-white.svg);
    }
  }

  a[href*='twitter.com/'] {
    &::before {
      background-image: url(/icons/twitter-white.svg);
    }
  }

  a[href*='telegram.com/'] {
    &::before {
      background-image: url(/icons/telegram-white.svg);
    }
  }

  a[href*='vk.cc/'],
  a[href*='vk.com/'] {
    &::before {
      background-image: url(/icons/vk-white.svg);
    }
  }

  a[href*='tumblr.com/'] {
    &::before {
      background-image: url(/icons/tumblr-white.svg);
    }
  }

  a[href*='instagram.com/'] {
    &::before {
      background-image: url(/icons/instagram-white.svg);
    }
  }

  button {
    margin-right: 0.5em;

    &:last-child {
      margin-right: 0;
    }
  }
}

.buttonSubscribe {
  align-items: center;
  aspect-ratio: 1/1;
  border-radius: 100%;
  display: inline-flex;
  float: right;

  img {
    display: block;
  }
}

.buttonLabel {
  display: none;
}

.buttonWrite {
  color: #000;
  display: inline-flex;
  transition: background-color 0.3s, color 0.3s;

  @include font-size(1.5rem);

  &:hover {
    background: #000;
    color: #fff;

    img {
      filter: invert(1);
    }
  }

  .icon {
    margin-right: 0.5em;
  }

  img {
    height: 15px;
    transition: filter 0.3s;
  }
}

.authorPage {
  .authorName {
    @include font-size(3.4rem);

    font-weight: 500;
    margin-bottom: 0.2em;
  }

  .authorAbout {
    color: #696969;
    @include font-size(1.7rem);
  }

  .authorSubscribe {
    margin-top: 2rem;
  }

  .authorDetails {
    display: block;
  }

  .buttonLabel {
    display: block;
  }

  .buttonSubscribe {
    aspect-ratio: auto;
    background-color: #000;
    border-color: #000;
    border-radius: 0.8rem;
    float: none;
    padding-bottom: 0.6rem;
    padding-top: 0.6rem;

    .icon {
      margin-right: 0.5em;

      img {
        filter: invert(1);
      }
    }

    &:hover {
      .icon img {
        filter: invert(0.7);
      }
    }
  }

  .buttonSubscribe img {
    vertical-align: text-top;
  }

  .button {
    margin-right: 1.6rem;
    vertical-align: middle;
  }
}

.authorsListItem {
  .authorName {
    @include font-size(2.2rem);

    font-weight: bold;
  }

  .authorSubscribe {
    align-items: baseline;

    @include media-breakpoint-down(sm) {
      padding: 1rem 0 0;
    }
  }

  .buttonLabel {
    display: block;
  }
}
