//  ---------------------------------------------------------------------------
//  This file contains all styles related to the author book component.
//  ---------------------------------------------------------------------------

/**
 * Author Book Snippet
 */
.author-book {
  display: flex;
  flex-flow: row nowrap;
  align-items: flex-start;
  text-align: left;
}

.author-profile .author-book {
  margin-bottom: 24px;
}

/**
 * Author Book Cover:
 * 1. Give the cover container a min-width so it doesn't overlap with
 *    the text in Safari. @docs http://goo.gl/TRwgiV
 */
.author-book__cover {
  min-width: 141px;
  margin-right: 24px;
  flex-shrink: 1;
}

.author-book__cover img {
  border: 1px solid #ccc;
}

.author-book__description {
  font-size: 14px;
  line-height: 24px;
}

.author-book__description h2 {
  margin-top: 6px;
  margin-bottom: 3px;
  font-family: $sans-serif;
  font-size: 18px;
}

.author-profile .author-book__description h2 {
  margin-top: 0;
}

h2 .author-book__purchase-url {
  color: $text;
}

.author-book__purchase-url,
.author-profile .author-book__purchase-url {
  color: $link;
}

.author-book__purchase-url--cta {
  font-family: $sans-serif;
}

.author-book__purchase-url--cta span {
  font-size: 21px;
  display: inline-block;
  vertical-align: bottom;
}

.author-book__purchase-url:focus {
  text-decoration: none;
}

.author-book mark {
  border-radius: 4px;
  padding: 1px 4px;
  background-color: $accent-primary;
  font-family: $sans-serif;
  font-weight: bold;
  text-transform: uppercase;
  color: $white;
  font-style: normal;
  line-height: 1;
}

.author-book__author-name {
  font-family: $sans-serif-light;
  font-weight: normal;
}

/**
 *  Author book snippet in article
 *  1. Adjust container size
 *  2. Align book cover with author image - author image is rounded with border
 */
.entry-footer .author-book {
  width: 696px; /*1*/
  max-width: 100%;
  margin: 0 auto;
  margin-top: 24px;
} 

.entry-footer .author-book__cover {
  min-width: 120px;
  margin-left: 9px;   /*2*/
  margin-right: 22px; /*2*/
} 

.entry-footer .author-book__description h2 {
  padding: 0;
}
 
@media only screen and (max-width: 61.5em) { /* 984px */
  .entry-footer .author-book {
    width: auto; /*1*/
    max-width: 100%;
    margin: 0 auto;
    margin-top: 24px;
  } 

  .entry-footer .author-book__cover {
    margin-right: 30px; 
  } 
}

@media only screen and (max-width: 767px) { 
  .author-book__cover  {
    max-width: 15%;
  }
}

@media only screen and (max-width: 37.5em) { /*600px*/
  /**
   * Author Book Snippet
   */
  .author-book {
    display: block;
  }

  .author-book__cover  {
    float: left;
    max-width: 30%;
    min-width: 80px;
    margin-right: 24px;
    margin-bottom: 6px;
  }

  .author-book__description {
    max-width: 100%;
  }

  .entry-footer .author-book__cover {
    min-width: 120px;
    margin-left: 0;   /*2*/
    margin-right: 24px; /*2*/
  } 

}

@media only screen and (max-width: 390px) { 
  .author-book__cover,
  .entry-footer .author-book__cover  {
    margin-right: 12px;
  }
}

@media only screen and (max-width: 20em) { /* 320px */
  /**
   * Author Book Snippet
   */
  .author-book__purchase-url span::before {
    content: "";
    display: table;
    height: 1px;
  }
}