/*EBOOK CSS STRUCTURE*/

.ebook-articles {
    position: relative;
    width: 90%;
    max-width: 650px;
    margin: 0 auto 3em;
}
/* .ebook-articles img.alignright,
.ebook-articles img.alignleft  {
    max-height: 380px;
    margin-left: 20px !important;
    margin-right: 20px !important;
} */
.ebook-articles img.alignright {
    margin-left: 20px !important;
}
.ebook-articles img.alignleft  {
    margin-right: 20px !important;
}
.ebook-articles::before {
    /* never visible - this is used in jQuery to check the current MQ */
    
    content: 'mobile';
    display: none;
}
.ebook-section-container {
    padding: 20px;
    border: 1px solid #ebebeb;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
    background-color: #fbfbfb;
}
.ebook-articles article {
    padding-bottom: 7em;
    border-bottom: 1px solid #e6e6e6;
}
.ebook-articles article h2 {
    padding-top: 3em;
}
.ebook-articles article:last-of-type {
    border-bottom: none;
}
.ebook-section-container ul {
    margin-top: 1em;
}
.ebook-articles p:last-of-type {
    padding-bottom: 0;
}
.ebook-articles .ebook-section-container:last-of-type {
    margin-top: 20px;
}
@media only screen and (min-width: 1100px) {
    .ebook-articles {
        width: calc(100% - 40px);
        max-width: none;
        padding-right: 100px;
    }
    .ebook-articles::before {
        /* never visible - this is used in jQuery to check the current MQ */
        
        content: 'desktop';
    }
}
.ebook-read-more {
    /* hide on mobile */
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
    display: none;
    width: 290px;
    background-color: #f2f2f2;
}
.ebook-read-more li:not(:first-child),
.ebook-read-more li:first-child {
    list-style: none;
    margin: 0;
}
.ebook-read-more li:not(:first-child) {
    counter-increment: articles;
}
.ebook-read-more li:first-child > a:before {
    content: 'i';
}
.ebook-read-more a {
    display: block;
    position: relative;
    line-height: 0;
    padding: 1.2em 1.1em 1.2em 4.3em !important;
    border-bottom: 0 !important;
}
.ebook-read-more a::before,
.ebook-read-more a::after {
    position: absolute;
}
.ebook-read-more a::before {
    /* article number */
    
    content: counter(articles);
    top: 50%;
    bottom: auto;
    -webkit-transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    -o-transform: translateY(-50%);
    transform: translateY(-50%);
    left: 1.1em;
    width: 36px;
    height: 36px;
    line-height: 34px;
    border-radius: 50%;
    color: #b3b3b3;
    font-family: inherit;
    text-align: center;
    box-shadow: inset 0 0 0 1px #d9d9d9;
    -webkit-transition: background-color 0.3s, color 0.3s;
    -moz-transition: background-color 0.3s, color 0.3s;
    transition: background-color 0.3s, color 0.3s;
}
.ebook-read-more a::after {
    /* bottom separation - line */
    
    content: '';
    left: 50%;
    right: auto;
    -webkit-transform: translateX(-50%);
    -moz-transform: translateX(-50%);
    -ms-transform: translateX(-50%);
    -o-transform: translateX(-50%);
    transform: translateX(-50%);
    bottom: 0;
    height: 1px;
    /*width: 260px;*/
    width: 100%;
    background-color: #d9d9d9;
}
.ebook-read-more a.read em {
    color: #a6a6a6;
}
.ebook-read-more a.read::before {
    background-color: #d9d9d9;
}
.ebook-read-more a.reading em {
    color: #2a76e8;
}
.ebook-read-more a.reading svg {
    display: block;
}
.ebook-read-more a.reading::before {
    background-color: #ffffff;
    color: #141414;
}
.ebook-read-more li:last-of-type a::after {
    display: none;
}
.ebook-read-more ul {
    margin: 0 !important;
}
.ebook-read-more em {
    display: block;
    line-height: 1.3;
    color: #141414;
    /* truncate text with ellipsis */
    font-style: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-transition: color 0.3s;
    -moz-transition: color 0.3s;
    transition: color 0.3s;
}
.ebook-read-more em:hover {
    white-space: normal !important;
}
.ebook-articles table {
    border: 0 !important;
/*    display: block;*/
    max-width: 100%;
/*    width: auto;*/
    overflow-x: auto;
}
.ebook-read-more b {
    color: #a6a6a6;
    font-size: 15px;
    font-family: inherit;
}
.ebook-read-more svg {
    /* this is the filling circle around the article number */
    display: none;
    position: absolute;
    top: 50%;
    bottom: auto;
    -webkit-transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    -o-transform: translateY(-50%);
    transform: translateY(-50%);
    left: 1.1em;
    stroke: #2a76e8;
}
body.ebook #content {
    display: block;
    width: 100%;
}
/*CHANGES FOR IPAD AND MOBILE DEVICES FOR NO PADDING AND ALIGN RIGHT IMAGES*/
@media only screen and (max-width: 1024px) {
    .ebook-articles{
       max-width: none;
    }
}
@media only screen and (max-width: 414px) {
    .ebook-articles article {
        padding: 0;
    }
}
/*CHANGES END HERE*/
@media only screen and (min-width: 1100px) {
    .ebook-articles {
        max-width: none;
    }
    body.ebook #layout {
        width: auto !important;
        max-width: 100%;
    }
    .ebook-read-more {
        display: block;
        /*position: absolute;*/
        /*top: 0;*/
        /*right: 0;*/
        margin: 0 auto;
        width: auto;
    }
    .ebook-read-more.fixed {
        position: fixed;
        width: 290px;
/*        height: 450px;
        overflow-y: auto;*/
        top: 1em;
        right: calc(50% - 485px);
    }
/*    body[class*=" themify-"] .ebook-read-more.fixed {
        right: calc(50% - 485px) !important;
    }*/
}
@media only screen and (max-width: 1099px) {
    .ebook-articles {
        width: 100%;
    }
    .ebook-read-more {
        display: none !important;
    }
    .ebook-read-more.fixed {
        opacity: 0.9;
        display: block !important;
        position: fixed;
        left: 0;
        top: 0;
    }
    .ebook-read-more a::before,
    .ebook-read-more svg {
        left: 0;
        right: 0;
        margin: 0 auto;
    }
    .ebook-read-more {
        display: inline-block;
        position: absolute;
        top: 1em;
        width: 100%;
        text-align: center;
        height: auto;
    }
    .ebook-read-more a::after {
        display: none;
    }
    .ebook-read-more li {
        display: inline-block;
        vertical-align: middle;
        width: 50px;
    }
    .ebook-read-more li:first-child {
        padding-left: 0;
    }
    .ebook-read-more li:last-child {
        padding-right: 0;
    }
    .ebook-read-more li > a {
        padding: 0;
    }
    .ebook-read-more ul {
        padding-bottom: 5px !important;
        padding-top: 5px;
    }
    .ebook-read-more a {
        height: 36px;
        padding: 5px 0 0 !important;
    }
    .ebook-read-more em,
    .ebook-read-more b {
        display: none;
    }
}
/*ebook table of content - MCMASTERS ONLY (to be deprecated)*/

.ebook-toc .loops-wrapper.list-post .post-title{
  font-size: 1.1em;
  text-align: left;
}
.ebook-toc .post {
    margin-bottom: 2em;
}
.ebook-toc .list-post .post-content {
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}
.ebook-toc .post-title a:hover:before{
  content: "\e628";
  margin-right: 20px;
  transition: all 0.2s;
}
.ebook-toc .post-title a:before{
  content: "\e61a";
  font-family: "themify";
  margin-right: 10px;
  font-size: 0.7em;
  transition: all 0.2s;
}
.single .post-content .ebook-toc .post-title a,
.single .post-content .ebook-toc .post-title a:hover{
  border-bottom: none;
}

/*ebook table of content - display_post shortcode*/
.champion-toc{
    margin-top: 1em;    
    border: 1px solid #f2f2f2;
    border-radius: 4px;
}
.champion-toc .display-posts-title{
    background-color: #f2f2f2;
    padding: 1em;
    border-radius: 4px;
    text-align: center;
    margin-bottom: 0;
}
.champion-toc .listing-item{
    display: block;
}
.champion-toc .listing-item a{
    padding: 1em 0 1em 1em !important;
    box-sizing: border-box;
    border-bottom: 1px solid #eee !important;
    display: block;
    width: 100%;
}
.champion-toc .listing-item a:hover{
    background-color: #f9f9f9;
    text-decoration: none;
}
.champion-toc .listing-item a:hover:before{
  content: "\e628";
  margin-right: 20px;
  transition: margin-right 0.1s;
}
.champion-toc .listing-item a:before{
  content: "\e61a";
  font-family: "themify";
  margin-right: 10px;
  font-size: 0.7em;
  transition: margin-right 0.1s;
}
/*minimisable ebook toc*/
.champion-toc.minimised{
    border: 1px solid #f2f2f2;
    border-radius: 4px;
    max-width: 1290px;
    margin: 0 auto;
}
.champion-toc.minimised .display-posts-title:before{
    content: "\f078";
    font-family: "FontAwesome";
    float: right;
    opacity: 1;
    transition: all 0.2s;
}
.champion-toc.minimised:hover .display-posts-title:before{
    opacity: 0;
    transition: all 0.2s;
}
.champion-toc.minimised .listing-item{
    max-height: 0;
    opacity: 0;
    padding: 0;
    transition: all 0.3s ease-out;
}
.champion-toc.minimised:hover .listing-item{
    max-height: 200px;
    opacity: 1;
    transition: max-height 0.3s ease-in, opacity 0.3s 0.2s;
/*    transition: opacity 0.2s 0.1s;*/
}
.champion-toc.minimised .listing-item a{
    padding: 0 !important;
    max-height: 0;
}
.champion-toc.minimised:hover .listing-item a{
    padding: 1em 0 1em 1em !important;
    max-height: 200px;
}

/*hide cateogory, meta display, post navigation*/
.ebook .post-category,
.ebook .post-meta{
    display: none;
}
.ebook-read-more a:hover{
  text-decoration: none; 
}

/*post-nav*/
.ebook .post-nav .prev a{
	padding-right: 5px;
}
.ebook .post-nav .next a{
	padding-left: 5px;
}
@media screen and (max-width: 412px){
	.ebook .post-nav a{
	    max-width: 300px;	
	}
}

@media only screen and (min-width: 1100px){
  .ebook-articles .ebook-read-more.fixed {
    position: fixed;
    top: 150px;
    right: -230px;
    transition: right 0.3s;
    z-index: 1;
    border-radius: 10px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
  }
    .ebook-articles .ebook-read-more.fixed:hover {
    right: 0;
    transition: all 0.3s;
  }
}

.ebook-articles .snippet{
    padding: 20px;
    background: #f9f9f9;
    border-radius: 5px;
    font-size: 90%;
    border-left: 4px solid #ccc;
    margin-bottom: 1em;
}
.ebook-articles .good.snippet{
    border-left-color: #2196f3;
}
.ebook-articles .bad.snippet{
    border-left-color: #f44336;
}
.ebook-articles .snippet p{
    margin-bottom: 0;
}
