/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/

* {
    box-sizing: border-box;
}

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
        margin-bottom: 15px;
}

/* 
  Our styles
*/

body {
    width: 100%;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 1em;
    margin: 0px;
}

p {
    color: #555;
    margin: 0.8em 0;
    line-height: 1.7em;
    text-align: justify;
}

a {
    color: #0087cc;
    text-decoration: none;
}

a:hover {
    color: #ff7b29;
}

a:visited {
    color: rgb(85, 26, 139);
}

h1 {
    font-size: 2em;
    font-weight: bold;
    margin-top: 1em;
    margin-bottom: 1em;
}

h2 {
    font-size: 1.7em;
    font-weight: bold;
    margin-top: 1em;
    margin-bottom: 1em;
}

h3 {
    font-size: 1.5em;
    font-weight: bold;
    margin-top: 1em;
    margin-bottom: 1em;
}

h4 {
    font-size: 1.2em;
    font-weight: bold;
    margin-top: 1em;
    margin-bottom: 1em;
}

h5 {
    font-size: 1.1em;
    font-weight: bold;
    margin-top: 1em;
    margin-bottom: 1em;
}

ul {
    color: #555;
    line-height: 25px;
    list-style-type: disc; 
    list-style-position: outside;
    margin-left: 40px;
    margin-top: 1em;
    margin-bottom: 1em;
}

ul ol, ul ul, ol ul, ol ol {
    margin-top: 0;
    margin-bottom: 0;
}

ol {
    color: #555;
    line-height: 25px;
    list-style-type: decimal; 
    list-style-position: outside; 
    margin-left: 40px;
    margin-bottom: 15px;
}

strong {
    font-weight: bold;
}

em {
    font-style: italic;
}

code {
    font-family: monospace;
}

pre {
    margin-bottom: 1em;
    border: 1px solid #aaaaaa;
    padding: 0.3em;
    line-height: 1.2em;
    font-family: monospace;
}

table {
    color: #555;
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1em;
}

table, th, td {
    border: 1px solid #aaaaaa;
    padding: 0.7em;
}

sup {
    vertical-align: super;
    font-size: 0.8em;
}

blockquote {
    border-radius: 5px;
    padding: 5px 50px;
    margin: 5px 0 5px 0;
    background-repeat: no-repeat;
    background-position: 10px 14px;
}

blockquote.tip {
    background-color: #d2ffc1;
    background-image: url(../images/tip.png);    
}

blockquote.information {
    background-color: #e8f0ff;
    background-image: url('../images/info.png');
}

blockquote.question {
    background-color: #ffc1f0;
    background-image: url('../images/question.png');
}

blockquote.warning {
    background-color: lemonchiffon;
    background-image: url('../images/warning.png');
}

footnotes {
    font-size: 0.9em;    
}

.header {
    margin: 0 auto;
    background-color: #E8EEF5;
    text-align: center;
}

.header-body {
    max-width: 1000px;
    width: 100%;
    display: inline-block;
    padding: 10px 5px;
    text-align: left;
}

.menu div {
    display: inline-block;
    padding: 0.8em 0.8em 0.1em 0em;
    font-size: 1em;
    font-weight: bold;
}

.menu a {
    color: #a67f59;
}

.book-title {
    font-size: 2em;
    padding: 5px 0px;
}

.book-title a {
    font-family: Arial;
    font-weight: bold;
    color: #555;
}

.book-subtitle {
    font-size: 1.2em;
    padding: 0px 10px 0px 0px;
    color: #999;
}

.navigation {
    max-width: 1000px;
    margin: 5px auto 25px auto;
    border-radius: 5px;
}

.navigation div {
    display: inline-block;
    width: 32%;    
}

.navigation div img {
    vertical-align: middle;
}

.navigation div span {
    padding-left: 5px;
    padding-right: 5px;
    vertical-align: middle;
}

.navigation .contents {
    text-align: center;
}

.navigation .next-chapter {
    text-align: right;
}

.navigation .current-chapter
{
    padding: 0.5em;
    text-align: center;
    display: block;
    width: 100%;
}

#container {
   max-width: 1000px;
   margin: 0 auto;
   padding: 10px;
}

#disqus_thread {
    max-width: 1000px;
    margin: 0 auto;
}

.footer {
    margin: 0 auto;
    text-align: center;
    background-color: #E8EEF5;    
}

.footer-body {
    max-width: 1000px;
    width: 100%;
    display: inline-block;
    padding: 10px 10px;
    text-align: left;
    background-color: #E8EEF5;
    font-size: 0.8em;
}

div.copyright {
    padding: 0.5em;
    float: left;
    color: #999;
}

div.generated-by {
    padding: 0.5em;
    float: right;
    color: #999;
}

span.image-wrapper a {
    display: inline-block;
    width: 100%;
    text-align: center;
}

span.image-wrapper a img {
    max-width: 100%; 
    display:inline-block; 
    height: auto;
}

.image-caption {
    display: inline-block;
    width: 100%;
    margin: auto;
    text-align: center;
    padding: 5px 5px;
    font-size: 0.8em;
}

.table-wrapper {
    overflow-x: auto;
}

.table-caption {
    padding: 5px 5px;
    font-size: 0.8em;
}

div.language-selection {
    float: left;
    width: 50%;
}

.language-list {
    font-size: 1.5em;
}

.language-list li {
    padding: 10px;
}

div.book-cover {
    width: 50%;
    float: left;
    text-align: center;
}

img#book-cover {
    width: 100%;
    max-width: 450px;
    border: 1px solid black;
}

div#toc {
    width: 70%;
    float: left;
    overflow-x: auto;
    white-space: nowrap;
    padding: 1em;
}

div.language-selection-small {
    padding: 0.5em;
    font-size: 1em;
    background-color: #E8EEF5;
    border: 1px solid gray;
}

span.lang-name {
    padding-left: 0.2em;
}

span.lang-name-active a {
    font-weight: bold;
}

div.incomplete-translation {
    background-color: #E8EEF5;
    border: 1px solid green;
    margin: 1.5em 0;
    padding: 0.5em;
    font-size: 0.9em;
}

#toc-ads {
    width: 30%;
    float: left;
    text-align: center;
}

#ads-chapter-bottom {
    width: 100%;
    text-align: center;
}

#ads-chapter-bottom div {
    display: inline-block;
    width: 50%;
}

@media screen and (max-width: 800px) {
    
    .book-subtitle {
        display: none;
    }
    
    .nav-btn-text {
        display: none;
    }
    
    .menu {
        display: none;
    }
    
    div.generated-by {
        display: none;
    }

    div.language-selection {
        width: 100%;
    }
    
    div.book-cover {
        width: 100%;
    }
    
    div#toc {
        width: 100%;
    }
    
    #toc-ads {
        width: 100%;
    }
    
    #ads-chapter-bottom div {
        width: 100%;
    }
}

.clear {
    clear: both;
}

.cd-top {
    display: inline-block;
    height: 40px;
    width: 40px;
    position: fixed;
    bottom: 40px;
    right: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    /* image replacement properties */
    overflow: hidden;
    text-indent: 100%;
    white-space: nowrap;
    background: rgba(232, 98, 86, 0.8) url(../images/cd-top-arrow.svg) no-repeat center 50%;
    visibility: hidden;
    opacity: 0;
    -webkit-transition: opacity .3s 0s, visibility 0s .3s;
    -moz-transition: opacity .3s 0s, visibility 0s .3s;
    transition: opacity .3s 0s, visibility 0s .3s;
}
.cd-top.cd-is-visible, .cd-top.cd-fade-out, .no-touch .cd-top:hover {
    -webkit-transition: opacity .3s 0s, visibility 0s 0s;
    -moz-transition: opacity .3s 0s, visibility 0s 0s;
    transition: opacity .3s 0s, visibility 0s 0s;
}
.cd-top.cd-is-visible {
    /* the button becomes visible */
    visibility: visible;
    opacity: 1;
}
.cd-top.cd-fade-out {
    /* if the user keeps scrolling down, the button is out of focus and becomes less visible */
    opacity: .5;
}
.no-touch .cd-top:hover {
    background-color: #e86256;
    opacity: 1;
}
@media only screen and (min-width: 768px) {
    .cd-top {
        right: 20px;
        bottom: 20px;
    }
}
@media only screen and (min-width: 1024px) {
    .cd-top {
        height: 60px;
        width: 60px;
        right: 30px;
        bottom: 30px;
    }
}

.file-tree {
    margin-left: -25px;
    font-size: 1.2em;
    color: #aaaaaa;
}

.directory {
    margin-left: 25px;
}

.directory .directory, .directory .file {
    display: none;
}

.directory .dir-name {
    cursor:pointer;
    margin: 10px 0;
    padding-left: 25px;
    background-image: url(../images/folder.png);
    background-repeat: no-repeat;
    background-position: 5px 0px;
}

.file {
    margin: 10px 0 10px 25px;
    padding-left: 25px;
    background-image: url(../images/file2.png);
    background-repeat: no-repeat;
    background-position: 5px 0px;
}

.breadcrumbs {
    margin: 0.6em 0;
}

.breadcrumbs a {
    font-size: 1.2em;
    color: green;
}