/**
 * Blog.
 */

// Node.
.blog-content #block-commerce-2-demo-mainpagecontent {
  padding-bottom: 0;
}

.page-title--blog-post {
  margin: 0 0 10px 0;
  padding: 0;
}

.blog-post-image {
  margin: 0 0 15px 0;

  img {
    max-width: 100%;
    height: auto;
  }
}

.blog-post-meta {
  margin: 15px 0;
  padding: 10px 15px;
  font-size: 14px;
  background-color: $gray-light;

  .blog-post-meta__date {
    display: inline-block;
    vertical-align: top;
    font-weight: bold;
  }

  .blog-post-meta__author {
    position: relative;
    display: inline-block;
    vertical-align: top;
  }

  .blog-post-meta__tags {
    display: inline-block;
    vertical-align: top;
  }

  .blog-post-meta__tags__list {
    display: inline-block;
    vertical-align: top;
    margin: 0;
    padding: 0;
    list-style: none;
    text-transform: lowercase;

    li {
      display: inline-block;
      margin: 0;
      padding: 0;
      vertical-align: top;
      background: none;

      a {
        &:after {
          content: ', ';
        }
      }
      &:last-child a:after {
        content: '';
      }
    }
  }

  .blog-post-meta__tags__label {
    text-transform: none;
    font-style: normal;
  }

  i {
    position: relative;
    display: inline-block;
    top: -1px;
    margin: 0;
    padding: 0 5px;
    vertical-align: top;
    color: $gray-dark;
  }

  @media (max-width: $screen-xs-max) {
    .blog-post-meta__date,
    .blog-post-meta__author,
    .blog-post-meta__tags {
      display: block;
      text-align: center;

      i {
        display: none;
      }
    }
  }
}

.blog-post-footer {
  clear: both;
  margin: 30px 0 0 0;
  padding: 20px 0 0 0;
  border-top: 5px solid $gray-light;
}

.blog-author__body {
  margin: 0;
  padding: 7px 0 0 0;

  h3 {
    margin: 0 0 21px 0;
    padding: 0;
    font-size: 20px;
    line-height: 22px;
  }
  .blog-author-name {
    font-weight: normal;
  }
}
.blog-author__image {
  position: absolute;
  top: 0;
  left: 0;

  img {
    display: block;
    border: 1px solid #E6E6E6;
  }
}

// Hide default page title on node pages.
.page-node-type-blog-post .page-title {
  display: none;
}

// Comments.
.blog-post-comments {
  margin-top: 30px;
  padding: 15px;
  border: 1px solid $gray;

  @media (min-width: $screen-sm-min) {
    padding: 30px;
  }
}

// Listing.
.view-display-id-blog_listing .item-list > ul {
  margin: 0;
  padding: 0;
  list-style: none;

  li {
    margin: 0;
    padding: 0;
    background: none;
  }
}

.blog-listing-item {
  margin: 0 0 30px 0;
  padding: 0 0 10px 0;
  border-bottom: 1px solid #E6E6E6;
}

.blog-listing-item__image {
  margin: 0 0 20px 0;
  padding: 0;

  a {
    position: relative;
    display: block;
    opacity: 1;
    transition: opacity .2s ease-in-out;

    &:hover {
      opacity: 0.75;
    }
  }
  img {
    display: block;
    max-width: 100%;
    height: auto;
  }
}

.blog-listing-item__title {
  margin: 0 0 12px 0;
  padding: 0;

  a {
    display: inline-block;

    &:hover {
      text-decoration: none;
    }
  }
  h3 {
    margin-top: 0;
  }
}

.blog-listing-item {
  .blog-post-meta {
    @media (max-width: $screen-sm-max) {
      .blog-post-meta__date,
      .blog-post-meta__author,
      .blog-post-meta__tags {
        display: block;
        text-align: center;

        i {
          display: none;
        }
      }
    }
  }
}

.blog-listing-item__body {
  margin: 0 0 23px 0;
  padding: 0;

  p {
    margin: 0;
    padding: 0;
  }
}

.blog-listing-item__footer {
  position: relative;
  clear: both;

  .btn {
    margin-right: 10px;
    margin-bottom: 20px;
  }
}

// Recent Posts.
.blog-listing-item--teaser {
  margin: 0 0 20px 0;
  padding: 0 0 20px 0;

  .blog-listing-item__image {
    margin: 0 0 10px 0;
  }
  .blog-listing-item__title {
    margin: 0;
    padding: 0;
    font-size: 20px;
  }
}

// Blog Sidebar.
.site-sidebar--blog {
  h2 {
    margin-top: 0;
    font-size: 30px;
  }
  .blog-content-sidebar__listing {
    margin: 10px 0;
    padding: 10px 0;
    border-bottom: 1px solid #E6E6E6;
  }
  .views-field-created {
    font-size: 14px;
  }
  .region {
    margin-bottom: 20px;
  }
}
