@font-face {
    font-family: 'fontello';
    src: url('../font/fontello.eot?60518104');
    src: url('../font/fontello.eot?60518104#iefix') format('embedded-opentype'),
    url('../font/fontello.woff?60518104') format('woff'),
    url('../font/fontello.ttf?60518104') format('truetype'),
    url('../font/fontello.svg?60518104#fontello') format('svg');
    font-weight: normal;
    font-style: normal;
}

::-moz-selection {
    background-color: transparent;
    color: #000;
}

::selection {
    background-color: transparent;
    color: #000;
}

body {
    background: #4e4e4e;
    overflow: hidden;
}

.zoomer {
    --scale-factor: 1.0;
    transform: scale(var(--scale-factor));
    transform-origin: 0 0;
    --moz-transform: scale(var(--scale-factor));
    --moz-transform-origin: 0 0;
    --o-transform: scale(var(--scale-factor));
    --o-transform-origin: 0 0;
    --webkit-transform: scale(var(--scale-factor));
    --webkit-transform-origin: 0 0;
}

#layout {
    color: green;
    outline-style: solid;
}

#main.single #layout {
    color: inherit;
    outline-style: none;
}

#main.single iframe#epub-view-right {
    display: none !important;
}

/* the cover pretends to be single */
#main:not(.single) #epub-view-left.cover + iframe#epub-view-right {
    display: none !important;
}
#main:not(.single) #epub-view-left.cover {
    width: 100% !important;
}

#main {
    /* height: 500px; */
    position: absolute;
    width: 100%;
    height: 100%;
    right: 0;
    /* left: 40px; */
    /*   -webkit-transform: translate(40px, 0);
      -moz-transform: translate(40px, 0); */

    /* border-radius: 5px 0px 0px 5px; */
    border-radius: 5px;
    background: #fff;
    overflow: hidden;
    -webkit-transition: -webkit-transform .4s, width .2s;
    -moz-transition: -webkit-transform .4s, width .2s;
    -ms-transition: -webkit-transform .4s, width .2s;

    -moz-box-shadow: inset 0 0 50px rgba(0, 0, 0, .1);
    -webkit-box-shadow: inset 0 0 50px rgba(0, 0, 0, .1);
    -ms-box-shadow: inset 0 0 50px rgba(0, 0, 0, .1);
    box-shadow: inset 0 0 50px rgba(0, 0, 0, .1);
}


#titlebar {
    height: 7%;
    min-height: 20px;
    padding: 10px 10px 30px 10px;
    /* margin: 0 50px 0 50px; */
    position: relative;
    color: #4f4f4f;
    font-weight: 100;
    font-family: Georgia, "Times New Roman", Times, serif;
    opacity: .5;
    text-align: center;
    -webkit-transition: opacity .5s;
    -moz-transition: opacity .5s;
    -ms-transition: opacity .5s;
    z-index: 10;
}

#titlebar:hover {
    opacity: 1;
}

#titlebar a {
    width: 20px;
    height: 20px;
    line-height: 20px;
    overflow: hidden;
    display: inline-block;
    opacity: .5;
    padding: 19px;
    border-radius: 5px;
}

#titlebar a::before {
    visibility: visible;
}

#titlebar a:hover {
    opacity: 1;
    border-style: solid;
    padding: 16px;
}

#bookmark-go:hover {
    padding-right: 47px !important;
}

#titlebar a:active {
    opacity: 1;
    color: rgba(0, 0, 0, .6);
    /* margin: 1px -1px -1px 1px; */
    -moz-box-shadow: inset 0 0 6px rgba(155, 155, 155, .8);
    -webkit-box-shadow: inset 0 0 6px rgba(155, 155, 155, .8);
    -ms-box-shadow: inset 0 0 6px rgba(155, 155, 155, .8);
    box-shadow: inset 0 0 6px rgba(155, 155, 155, .8);
}

#book-title {
    font-weight: 600;
}

#viewer {
    width: 85%;
    height: 88%;

    margin: 0 auto;
    z-index: 6; /* Must be above arrows otherwise we can't click the audio icons anymore */
    position: relative;
}

#viewer iframe {
    border: none;
    width: 50%;
    height: 100%;
}

#main.single #viewer iframe {
    width: 100%;
}

#epub-container {
    position: relative;
    display: flex;
    flex-grow: 1;
    flex-direction: row;
    flex-wrap: nowrap;
    width: 100%;
    height: calc(100% - 30px);
    overflow: hidden !important;
    row-gap: -3px;
}

.epub-view-iframe {
    overflow: hidden !important;
    border: none;
    visibility: visible;
    display: flex;
}

#prev.arrow {
    left: 0;
    padding-left: 40px;
    padding-right: 25%;
}

#next.arrow {
    right: 0;
    padding-right: 40px;
    padding-left: 25%;
}

.arrow {
    top: 50%;
    transform: translateY(-50%);
    padding-top: 100%;
    padding-bottom: 100%;

    z-index: 5;
    position: absolute;
    font-size: 64px;
    color: #E2E2E2;
    font-family: arial, sans-serif;
    font-weight: bold;
    cursor: pointer;
    -webkit-user-select: none;
    --khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.arrow:hover {
    color: #777;
}

.arrow:active,
.arrow.active {
    color: #000;
}

#opener {
    /* padding: 10px 10px; */
    float: left;
}

/* #opener #slider {
width: 25px;
} */

#metainfo {
    display: inline-block;
    text-align: center;
    max-width: 80%;
}

#title-controls {
    float: right;
}

#title-controls a {
    margin: 1px 0 -1px 6px;
}

#title-controls .selected-option {
    color: green;
    outline-style: dashed;
}

/* Otherwise we get 1px wide blank marins between the two pages */
#epub-view-right {
    transform: translateX(-1px);
}

#divider {
    position: absolute;
    width: 1px;
    border-right: 2px #000 solid;
    height: 80%;
    z-index: 1;
    left: 50%;
    margin-left: -1px;
    top: 10%;
    opacity: .15;
    box-shadow: -2px 0 15px rgba(0, 0, 0, 1);
    display: none;
}

#divider.show {
    display: block;
}

#progressBar {
    position: absolute;
    z-index: 10;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
}

[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-left: -6px;
    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: 200%;
}

[class^="iconb-"]:before, [class*=" iconb-"]:before {
    font-family: "Bootstrap-icons";
    font-style: normal;
    font-weight: normal;
    speak: none;

    display: inline-block;
    text-decoration: inherit;
    width: 1.2em;
    margin-left: -9px;
    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: 200%;
}

@media only screen and (max-device-width: 385px) {
    #titlebar a {
        padding: 10px 6px 10px 12px !important;
    }

    #titlebar a:hover, #titlebar a:active {
        padding: 6px 4px 9px 8px !important;
    }
}


@media only screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation: portrait) {
    #viewer {
        top: 0 !important;
    }

    #metainfo {
        display: none;
    }
}

/* For iPhone portrait layouts only */
@media only screen and (max-device-width: 480px) and (orientation: portrait) {
    #metainfo {
        display: none;
    }
}

@media only screen and (max-width: 1040px) {

    #prev.arrow {
        padding-left: 20px;
    }

    #next.arrow {
        padding-right: 20px;
    }

    #divider,
    #divider.show {
        display: none;
    }

    #titlebar a {
        visibility: hidden;
        margin: 0 0 0 0;
        width: 20px;
        height: 20px;
        padding: 10px 8px 10px 16px;
    }

    #titlebar {
        height: 4%;
        min-height: 10px;
        padding: 5px;
    }

    #titlebar a:hover {
        margin: -2px 0;
        padding: 6px 5px 9px 13px;
    }

    #titlebar a:active {
        margin: 0 0 0 0;
        padding: 6px 5px 9px 13px;
    }

    #metainfo {
        display: none;
    }

    [class^="icon-"]:before, [class*=" icon-"]:before {
        font-size: 150% !important;
    }

    [class^="iconb-"]:before, [class*=" iconb-"]:before {
        font-size: 150% !important;
    }
}

@media only screen and (max-width: 900px) {
    #prev.arrow {
        padding-left: 10px;
    }
    #next.arrow {
        padding-right: 10px;
    }
}

@media only screen and (max-width: 730px) and (orientation: landscape) {
    #prev.arrow {
        padding-left: 3px;
    }
    #next.arrow {
        padding-right: 3px;
    }

}

@media only screen and (max-width: 550px) {
    #viewer {
        width: 81%;
    }
    #prev.arrow {
        padding-left: 0;
    }
    #next.arrow {
        padding-right: 0;
    }
    .arrow {
        width: 5%;
        /*text-indent: -10000px;*/
    }

    #main {
        -webkit-transform: translate(0, 0);
        -moz-transform: translate(0, 0);
        -ms-transform: translate(0, 0);
        -webkit-transition: -webkit-transform .3s;
        -moz-transition: -moz-transform .3s;
        -ms-transition: -moz-transform .3s;
    }

    #main.closed {
        -webkit-transform: translate(260px, 0);
        -moz-transform: translate(260px, 0);
        -ms-transform: translate(260px, 0);
    }
}

@media only screen and (max-width: 430px) {
    #prev.arrow {
        padding-left: 3px;
    }

    #next.arrow {
        padding-right: 3px;
    }

    .arrow {
        width: 5%;
        /*text-indent: -10000px;*/
    }
}

.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-cover:before {
    content: '\e815';
}

.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';
}

/* '' */

.iconb-play:before {
    content: '\F3A5'
}

/* F4F5 */
.iconb-play-fill:before {
    content: '\F3A4'
}

/* F4F4 */
.iconb-layout-split:before {
    content: '\F460'
}

.iconb-bookmark-go:before {
    content: '\F138\F199'
}

.iconb-home:before {
    content: '\F425'
}

.iconb-zoom-plus:before {
    content: '\F62C'
}

.iconb-zoom-minus:before {
    content: '\F62D'
}
