/* ==========================================================================
   SIDEBAR
   ========================================================================== */

/*
   Default
   ========================================================================== */

.sidebar {
  -webkit-transform: translate3d(0, 0 , 0);
          transform: translate3d(0, 0 , 0);

  @include clearfix();
  background-color: #f7f7f7;

  @include breakpoint($large) {
      display: block;
      float: left;
      width: 220px;
    min-height: -moz-available;
    min-height: -webkit-fill-available;
    margin-bottom: 0;
    -webkit-transition: opacity 0.2s ease-in-out;
            transition: opacity 0.2s ease-in-out;
  }

  @include breakpoint($x-large) {
    padding-right: 0;
    min-height:auto;
  }

  h2, h3, h4, h5, h6 {
    margin-bottom: 0;
    font-family: $sans-serif-narrow;
  }

  p, li {
    font-family: $sans-serif;
    font-size: $type-size-6;
    line-height: 1.5;
  }

  img {
    width: 100%;
  }

  .back-to-home {
      padding-top: 15px;
      padding-bottom: 11px;
      font-size: 14px;
      background-color: #ffffff;
      color: #999999;

      a {
          color: #666666;

          &:hover {
              color: #0063fc;
          }
      }
  }
}

.sidebar__right {
  margin-bottom: 1em;

  @include breakpoint($large) {
    position: relative;
    float: right;
    width: $right-sidebar-width-narrow;
    margin-left: span(0.5 of 12);
    z-index: 10;
  }

  @include breakpoint($x-large) {
    width: $right-sidebar-width;
  }
}

/*
   Author profile and links
   ========================================================================== */

.author__avatar {
  display: table-cell;
  vertical-align: top;
  width: 36px;
  height: 36px;
  margin: 20px 10px 10px;

  @include breakpoint($large) {
    display: block;
    width: auto;
    height: auto;
  }

  img {
    max-width: 110px;
    border-radius: 50%;

    @include breakpoint($large) {
      padding: 5px;
      border: 1px solid $border-color;
    }
  }
}

.author__content {
  display: table-cell;
  vertical-align: top;
  padding-left: 20px;
  padding-right: 20px;
  line-height: 1;

  @include breakpoint($large) {
    display: block;
    width: 100%;
    padding-left: 20px;
    padding-right: 20px;
  }
}

.author__name {
  margin: 0;

  @include breakpoint($large) {
    margin-top: 20px;
    margin-bottom: 10px;
  }
}
.sidebar .author__name {
    font-size: 16px;
}

.author__bio {
  margin: 0;
  font-size: 14px;

  @include breakpoint($large) {
    margin-top: 10px;
    margin-bottom: 20px;
  }
}

.author__urls-wrapper {
  position: relative;
  display: table-cell;
  vertical-align: middle;
  font-family: $sans-serif;
  z-index: 10;
  position: relative;
  cursor: pointer;
  margin-left: 20px;
  margin-right: 20px;
  font-size: 14px;

  li:last-child {
    a {
      margin-bottom: 0;
    }
  }

  @include breakpoint($large) {
    display: block;
  }

  button {
    margin-bottom: 0;

    @include breakpoint($large) {
      display: none;
    }
  }
}

.author__urls {
  display: none;
  position: absolute;
  right: 0;
  margin-top: 15px;
  padding: 10px;
  list-style-type: none;
  border: 1px solid $border-color;
  border-radius: $border-radius;
  background: #fff;
  z-index: -1;
  box-shadow: 0 2px 4px 0 rgba(#000, 0.16), 0 2px 10px 0 rgba(#000, 0.12);
  cursor: default;

  @include breakpoint($large) {
    display: block;
    position: relative;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  &:before {
    display: block;
    content: "";
    position: absolute;
    top: -11px;
    left: calc(50% - 10px);
    width: 0;
    border-style: solid;
    border-width: 0 10px 10px;
    border-color: $border-color transparent;
    z-index: 0;

    @include breakpoint($large) {
      display: none;
    }
  }

  &:after {
    display: block;
    content: "";
    position: absolute;
    top: -10px;
    left: calc(50% - 10px);
    width: 0;
    border-style: solid;
    border-width: 0 10px 10px;
    border-color: #fff transparent;
    z-index: 1;

    @include breakpoint($large) {
      display: none;
    }
  }

  li {
    white-space: nowrap;
  }

  a {
    display: block;
    margin-bottom: 5px;
    padding-right: 5px;
    padding-top: 2px;
    padding-bottom: 2px;
    color: inherit;
    font-size: $type-size-5;
    text-decoration: none;

    &:hover {
      text-decoration: underline;
    }
  }
}
