@font-face {
    font-family: 'fontello';
    src: url('../font/fontello.woff?60518104') format('woff');
    font-weight: normal;
    font-style: normal;
}

body {
    overflow: hidden;
    margin: 0;
    padding: 0;
}

#main {
    position: absolute;
    width: 100%;
    height: 100%;
    right: 0;

    background: var(--theme-bg);
    overflow: hidden;
    transition: transform .4s, width .2s;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, .1);
}


#titlebar {
    height: 44px;
    display: flex;
    align-items: center;
    position: relative;
    font-weight: 100;
    text-align: center;
    z-index: 10;
}

#titlebar a,
#panels a {
    width: 18px;
    height: 19px;
    line-height: 20px;
    overflow: hidden;
    display: inline-block;
    padding: 4px;
    border-radius: var(--sBr);
}

#titlebar a::before,
#panels a::before {
    visibility: visible;
}

#titlebar a:hover,
#panels a:hover {
    text-decoration: none;
    background-color: var(--theme-menu-highlight);
}

#titlebar a:active,
#panels a:active,
#panels a.active {
    box-shadow: inset 0 0 6px rgba(155, 155, 155, .8);
}

#book-title {
    font-weight: 600;
}

#title-seperator {
    display: none;
}

#viewer {
    width: 80%;
    height: 80%;
    margin: 0 auto;
    max-width: 1250px;
    z-index: 2;
    position: relative;
    overflow: hidden;
}

#viewer iframe {
    border: none;
}

#prev {
    left: 40px;
}

#next {
    right: 40px;
}

.arrow {
    position: absolute;
    top: 50%;
    margin-top: -44px;
    font-size: 64px;
    color: var(--sBCol);
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.arrow:hover {
    color: var(--hBCol);
}

.arrow:active,
.arrow.active {
    color: var(--theme-main);
}

#sidebar {
    position: absolute;
    top: 0;
    min-width: 300px;
    width: 25%;
    height: 100%;
    transition: transform .5s;
    overflow: hidden;
    border-right: 1px solid var(--hBCol);
}

#sidebar.open {}
#main.closed {
    transform: translate(300px, 0);
}

#main.single {
    width: 75%;
}

#main.single #viewer {}

#panels {
    display: flex;
    height: 44px;
    background: var(--theme-filelist-bg);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    align-items: center;
    user-select: none;
}

#panels a {
    margin-left: 6px;
}


#opener {
    flex: 0 0 44px;
    user-select: none;
}

#metainfo {
    flex: 1;
    display: inline-block;
    text-align: center;
}

#title-controls {
    flex: 0 0 88px;
    margin-left: auto;
    user-select: none;
}


#searchBox {
    width: 165px;
    float: left;
    margin-left: 10px;
    margin-top: -1px;
}


#divider {
    position: absolute;
    width: 1px;
    border-right: 1px solid var(--hBCol);
    height: 80%;
    z-index: 1;
    left: 50%;
    margin-left: -1px;
    top: 10%;
    opacity: .15;
    display: none;
}

#divider.show {
    display: block;
}

#loader {
    position: absolute;
    z-index: 10;
    left: 50%;
    top: 50%;
    margin: -33px 0 0 -33px;
}

#tocView,
#bookmarksView {
    overflow-x: hidden;
    overflow-y: hidden;
    min-width: 300px;
    width: 25%;
    height: 100%;
    visibility: hidden;
}


#sidebar.open #tocView,
#sidebar.open #bookmarksView {
    overflow-y: auto;
    visibility: visible;
}

#sidebar.open #tocView {
    display: block;
}

#tocView > ul,
#bookmarksView > ul {
    margin-top: 15px;
    margin-bottom: 50px;
    padding-left: 20px;
    display: block;
}

#tocView li,
#bookmarksView li {
    margin-bottom: 10px;
    width: 225px;
    list-style: none;
    text-transform: capitalize;
}

#tocView li:active,
#tocView li.currentChapter {
    list-style: none;
}

.list_item a.chapter {
    font-size: 1em;
}

.list_item a.section {
    font-size: .8em;
}


.list_item ul {
    padding-left: 10px;
    margin-top: 8px;
    display: none;
}

.list_item.currentChapter > ul,
.list_item.openChapter > ul {
    display: block;
}

#tocView.hidden {
    display: none;
}

.toc_toggle {
    display: inline-block;
    width: 14px;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.toc_toggle:before {
    content: '▸';
    color: #fff;
    margin-right: -4px;
}

.currentChapter > .toc_toggle:before,
.openChapter > .toc_toggle:before {
    content: '▾';
}

.view {
    width: 300px;
    height: 100%;
    display: none;
    padding-top: 50px;
    overflow-y: auto;
}

#searchResults {
    margin-bottom: 50px;
    padding-left: 20px;
    display: block;
}

#searchResults li {
    margin-bottom: 10px;
    width: 225px;
    list-style: none;
}

#searchResults p {
    text-decoration: none;
    font-size: 12px;
    line-height: 16px;
}

#searchResults p .match {
    background: var(--theme-main);
    color: var(--theme-textOnMain);
}
/*
#searchResults li > p {
    color: #AAA;
}

#searchResults li a:hover {
    color: #E2E2E2;
}
*/
#searchView.shown {
    display: block;
    overflow-y: scroll;
}
/*
#notes {
    padding: 0 0 0 34px;
}

#notes li {
    color: #eee;
    font-size: 12px;
    width: 240px;
    border-top: 1px #fff solid;
    padding-top: 6px;
    margin-bottom: 6px;
}

#notes li a {
    color: #fff;
    display: inline-block;
    margin-left: 6px;
}

#notes li a:hover {
    text-decoration: underline;
}

#notes li img {
    max-width: 240px;
}

#note-text {
    display: block;
    width: 260px;
    height: 80px;
    margin: 0 auto;
    padding: 5px;
    border-radius: 5px;
}

#note-text[disabled], #note-text[disabled="disabled"] {
    opacity: .5;
}

#note-anchor {
    margin-left: 218px;
    margin-top: 5px;
}
*/

#settingsPanel {
    display: none;
}

#settingsPanel h3 {
    margin-bottom: 10px;
}

#settingsPanel ul {
    margin-top: 60px;
    list-style-type: none;
}

#settingsPanel li {
    font-size: 1em;
}

#settingsPanel .xsmall {
    font-size: x-small;
}

#settingsPanel .small {
    font-size: small;
}

#settingsPanel .medium {
    font-size: medium;
}

#settingsPanel .large {
    font-size: large;
}

#settingsPanel .xlarge {
    font-size: x-large;
}

.highlight {
    background-color: yellow
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 630px;

    height: auto;
    z-index: 2000;
    visibility: hidden;
    margin-left: -320px;
    margin-top: -160px;

}

.overlay {
    position: fixed;
    width: 100%;
    height: 100%;
    visibility: hidden;
    top: 0;
    left: 0;
    z-index: 1000;
    opacity: 0;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s;
}

.md-show {
    visibility: visible;
}

.md-show ~ .overlay {
    opacity: 1;
    visibility: visible;
}

/* Content styles */
.md-content {
    color: #fff;
    background: #6b6b6b;
    position: relative;
    border-radius: 3px;
    margin: 0 auto;
    height: 320px;
}

.md-content h3 {
    margin: 0;
    padding: 6px;
    text-align: center;
    font-size: 22px;
    font-weight: 300;
    opacity: 0.8;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px 3px 0 0;
}

.md-content > div {
    padding: 15px 40px 30px;
    margin: 0;
    font-weight: 300;
    font-size: 14px;
}

.md-content > div p {
    margin: 0;
    padding: 10px 0;
}

.md-content > div ul {
    margin: 0;
    padding: 0 0 30px 20px;
}

.md-content > div ul li {
    padding: 5px 0;
}

.md-content button {
    display: block;
    margin: 0 auto;
    font-size: 0.8em;
}

/* Effect 1: Fade in and scale up */
.md-effect-1 .md-content {
    transform: scale(0.7);
    opacity: 0;
    -webkit-transition: all 0.3s;
    -moz-transition: all 0.3s;
    -ms-transition: all 0.3s;
    transition: all 0.3s;
}

.md-show.md-effect-1 .md-content {
    transform: scale(1);
    opacity: 1;
}

.md-content > .closer {
    position: absolute;
    right: 0;
    top: 0;
    font-size: 24px;
    padding: 4px;
}

@media only screen and (max-width: 1040px) {
    #viewer {
        width: 50%;
        margin-left: 25%;
    }

    #divider,
    #divider.show {
        display: none;
    }
}

@media only screen and (max-width: 900px) {
    #viewer {
        width: 60%;
        margin-left: 20%;
    }

    #prev {
        left: 20px;
    }

    #next {
        right: 20px;
    }
}

@media only screen and (max-width: 550px) {
    #viewer {
        width: 80%;
        margin-left: 10%;
    }

    #prev {
        left: 0;
    }

    #next {
        right: 0;
    }

    .arrow {
        height: 100%;
        top: 45px;
        width: 10%;
    }

    #main {
        transition: transform .3s;
    }

    #main.closed {
        transform: translate(260px, 0);
    }

    #metainfo {
        font-size: 12px;
    }

    #tocView {
        width: 260px;
    }

    #tocView li {
        font-size: 12px;
    }

    #tocView > ul {
        padding-left: 10px;
    }
}


/* For iPad portrait layouts only */
@media only screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation: portrait) {
    #viewer iframe {
        width: 460px;
        height: 740px;
    }
}

/*For iPad landscape layouts only */
@media only screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation: landscape) {
    #viewer iframe {
        width: 460px;
        height: 415px;
    }
}

/* For iPhone portrait layouts only */
@media only screen and (max-device-width: 480px) and (orientation: portrait) {
    #viewer {
        width: 256px;
        height: 432px;
    }

    #viewer iframe {
        width: 256px;
        height: 432px;
    }
}

/* For iPhone landscape layouts only */
@media only screen and (max-device-width: 480px) and (orientation: landscape) {
    #viewer iframe {
        width: 256px;
        height: 124px;
    }
}

[class^="icon-"]:before, [class*=" icon-"]:before {
    font-family: "fontello";
    font-style: normal;
    font-weight: normal;
    speak: none;

    display: inline-block;
    text-decoration: inherit;
    width: 1em;
    margin-right: .2em;
    text-align: center;
    /* opacity: .8; */

    /* For safety - reset parent styles, that can break glyph codes*/
    font-variant: normal;
    text-transform: none;

    /* you can be more comfortable with increased icons size */
    font-size: 112%;
}


.icon-search:before {
    content: '\e807';
}

/* '' */
.icon-resize-full-1:before {
    content: '\e804';
}

/* '' */
.icon-cancel-circled2:before {
    content: '\e80f';
}

/* '' */
.icon-link:before {
    content: '\e80d';
}

/* '' */
.icon-bookmark:before {
    content: '\e805';
}

/* '' */
.icon-bookmark-empty:before {
    content: '\e806';
}

/* '' */
.icon-download-cloud:before {
    content: '\e811';
}

/* '' */
.icon-edit:before {
    content: '\e814';
}

/* '' */
.icon-menu:before {
    content: '\e802';
}

/* '' */
.icon-cog:before {
    content: '\e813';
}

/* '' */
.icon-resize-full:before {
    content: '\e812';
}

/* '' */
.icon-cancel-circled:before {
    content: '\e80e';
}

/* '' */
.icon-up-dir:before {
    content: '\e80c';
}

/* '' */
.icon-right-dir:before {
    content: '\e80b';
}

/* '' */
.icon-angle-right:before {
    content: '\e809';
}

/* '' */
.icon-angle-down:before {
    content: '\e80a';
}

/* '' */
.icon-right:before {
    content: '\e815';
}

/* '' */
.icon-list-1:before {
    content: '\e803';
}

/* '' */
.icon-list-numbered:before {
    content: '\e801';
}

/* '' */
.icon-columns:before {
    content: '\e810';
}

/* '' */
.icon-list:before {
    content: '\e800';
}

/* '' */
.icon-resize-small:before {
    content: '\e808';
}

/* '' */
