/* 
    Created on : Nov 8, 2017, 10:53:00 AM
    Author     : max
*/

*{
    box-sizing:border-box;
}

html {
    background: #000;
}

body {
    color:#fff;
    margin:0;
    font-size: 18px;
}

html[bv-context=game], body[bv-context=game] {
    background: #000;
}

#book {
    margin:50px auto 20px;
    width: 100%;
}

#book, .temp {
    font-size:24pt;
    line-height: 1.5;
}

body.no-toc .bv-thumbs{
    display: none !important;
}

a, a:link, a:visited, a:hover {
    color:#fff;
    text-decoration:underline;
}

.temp.text.page {
    position:absolute;
    left:0;
    top:0;
}

#book div.regular.text.page .content, .temp.text.page .content{
    color:#222;
    font-family: 'PT Serif', serif;
    font-size: 52%;
    padding:18.2% 12.5% 22% 12.5%;
    text-align: center;
}

#book div.empty.page {
    background: #fff;
}

#book div.text.page .content p {
    position: relative; /*in order to play animations behind the text*/
    z-index: 9;
}

.content p, .content div, .content h2 {
    margin:2% 0;
    padding:0;
    font-family: 'Bad Script';
    text-indent: 21px; /*old 5% value was not calced properly!!!*/
    text-align: justify;
}

.content h2 {
    font-size: 150%;
}
.content div {
    font-size: 135%;
}

.page .content p.question-text {
    padding: 10px 0;
    font-size: 100%;
}

.content table td {
    padding:4px;
}

.content table td {
    padding:4px;
}

.content table.tr-break td {
    padding:0 4px;
}

.content img:not(.inline) {
    display: block;
    margin:auto;
}

#book div.text.page .content p[data-anim]{
    margin:0;
    position: absolute;
}

.page .content p.invert-color {
    color: #fff;
}

.content img.default {
    display:inline;
    text-align: center;
    margin-left:-10%;
    margin-right:-10%;
}

.content img.side-fit {
    display:inline;
    text-align: center;
    margin-left:-16.7%;
    margin-right:-16.7%;
    mix-blend-mode: multiply;
}

.content img.img-left {
    float:left;
    display: block;
    padding:0 1%;
}

.content img.anim {
    position:absolute;
    z-index:100;
    display: none;
}

.content img[data-anim], .content *[data-anim] {
    position:absolute;
    display: none;
}

#book div.text.page .content p.anim {
    display:none;
}


.text.page .content p.noindent {
    text-indent: 0;
}


.content .ref {text-decoration: underline}
.content .left {text-align:left}
.content .right {text-align:right}
.content .center {text-align:center;}
.content .full {text-align:justify;}
.content .italic, .ui-tooltip .italic{font-style:italic;}
.content .bold, .ui-tooltip .bold {font-weight: bold}
.content .underline, .ui-tooltip .underline {text-decoration: underline}
.content .normal {
    text-decoration: none;
    font-weight: normal;
    font-style:normal;
}

h1 {
    font-family: 'BadScript-Regular' !important;
    text-transform: uppercase;
    text-align: center;
}

h1.title {
    font-size:175%;
    margin-top:15%;
}

h1.subtitle {
    font-size:135%;
    margin-top:5%;
}
/*
p.chapter {
    font-family: 'PT Serif Caption', serif;
    font-size:125%;
    margin-top:5%;
}*/

p.bl-chapter::first-letter{
    font-size: 400%;
    float:left;
    padding:0;
    line-height: 100%;
}

p.bl-chapter {
    text-indent: 0;
}


h2.toc {
    text-transform: uppercase;
    font-family: inherit;
    border-bottom:1px solid #222;
    padding-bottom: 1%;
}

.ui-tooltip {
    font-size: 80%;
    max-width: 750px;
}
.ui-tooltip img {
    max-width: 720px;
    max-height: 500px;
}

.content a{
    color:inherit;
    text-decoration: none;
    line-height: 200%;
    font-family: inherit;
}

.content p.toc-item {
    text-indent: 0;
}

#book div.regular.text.page {
    position:relative;
}

#book div.regular.text.page .content {
    z-index: 10;
}

.no-chapter.page .header, .new-chapter.page .header, div.page.noheader .header {
    display:none;
}

.no-chapter.page .footer {
    display:none;
}

.chapterless.page .footer {
    display: block;
}

.nopgnum.page .footer {
    display:none;
}

#book div.regular.text.page .header {
    position:absolute;
    top:0;
    left:12.5%;
    width: 75%;
    color:#222;
    text-align: right;
    padding-top:10%;
    padding-bottom:0.4%;
    font-family: 'PT Serif';
    font-size:36%;
    border-bottom:1px solid;
}

#book div.regular.text.page .footer {
    position:absolute;
    bottom:0;
    left:0;
    width: 100%;
    color:#222;
    text-align: center;
    padding-bottom:8.2%;
    font-family: 'PT Serif';
    font-size:52%;
}

p.last-in-page {
    text-align-last: justify;
}

#book div.regular.text.page .content p.broken-in-page,  .temp.text.page .content p.broken-in-page{
    text-indent: 0;
}

#book div.page {
    overflow: hidden;
    /*background-size: auto 100%;*/
    background-color: #fff;
}

body.highp #book div.page {
    background-blend-mode:multiply;
}

#book div.page.odd {
    background-position: center right;
}

#book div.page.even {
    background-position: center left;
}

#book div.page img.page {
    display: block;
    margin:0px auto;
    width:100%;
    max-height:100%;
    padding: 8% 5%;
}

body.highp #book div.page img.page {
    mix-blend-mode:multiply;
}

#book div.page.hideOriginal img.page {
    display:none;
}

body #book div.page.invert img.page {
    filter:invert(100%);
    mix-blend-mode:screen;
}

body #book div.page.hideShadow img.page {
    background-blend-mode:none;
}

#book div.regular.page img.page {
    image-rendering:-webkit-optimize-contrast;
}

div.page.cm-colorOrGray{
    display: inline-block;
    vertical-align: middle;
}

#book.pd-toggle div.page img.page {
    padding:1.68% 1%;
}

#book.bck-toggle div.page img.page, #thumbs.bck-toggle div.page img.page {
    mix-blend-mode:normal !important;
    filter:none !important;
}

#book.bck-toggle div.page, #thumbs.bck-toggle div.page {
    background-blend-mode:normal !important;
    background:white !important;
    filter:none !important;
}

div.page.regular img.page.add-borders {
    border:1px dashed #777;
    padding:0px !important;
}

body[data-viewer=turnStd] #book div.page{
    box-shadow: 0px 0px 6px 1px rgba(0,0,0,.1);
}

#book div.page.cover {
    background: #fff !important;
}

#book div.page.cover img.page {
    padding:0;
    max-height: none;
}

body[data-viewer=turn] #book {
    perspective:2000px;
}

body.no-toc #toc, #toc {
    display: none;
}

#toc.shown{
    display: block;
    position: fixed;
    z-index: 1000;
    right:0;
    top:0;
    width: 400px;
    height: 100%;
    padding:50px 10px;
    background: rgba(0,0,0,1);
    overflow-y: auto;
    font-family: Arial, Helvetica, sans-serif;
}

#toc a {
    display: block;
    text-decoration:none;
    margin:5%;
    cursor: pointer;
}

body[data-viewer=turnStd] #book div.page {
    margin:10px auto;
}


#menu {
    /*background: url(images/logo.png) 9px 9px no-repeat;*/
    background: #222;
    background-size: 30px;
    position:fixed;
    width: 100%;
    height: 46px;
    z-index: 1000;
    color:#fff;
    top:0;
    left:0;
    padding:12px;
    text-align: right;
}

.menu-left {
    float: left;
    display: block;
}


body:not([bv-context=game]) #menu {
    display: block !important;
}


#menu .ui-btn-icon-notext {
    display: inline-block;
    border-radius: 50%;
}

.ui-btn {
    border:0;
}

.ui-btn-icon-notext:after{
    background-color: rgba(0,0,0,.2);
}

.ui-btn-inline {
    margin-right:0;
}

#login {
    width:400px;
}

.modal {
    display: none;
    position: absolute;
    z-index: 1000;
    border-radius: 20px;
    padding:10px;
}

.modal.shown{
    display: block;
}

#find {
    padding-top:60px;
}

#inpBook {
    border:1px solid #888;
    padding:4px 10px;
    border-radius: 10px;
    margin-left:60px;
}

#menu #inpBook {
    display: block;
    width:50%;
    max-width: 300px;
    float:left;
}
.pageNum {
    width:60px;
    margin:6px;
    border:0px solid;
    color: #fff;
    background: #222;
    padding:3px 6px;
    display: block;
    text-align: center;
    float: left;
    height:36px;
}

.hidden {
    display: none;
}

.very-hidden {
    display: none !important;
}

h4 {
    font:75% normal;
    margin:0;
    border-bottom: 1px solid;
}

p {
    margin:0;
}

body[data-viewer=turnStd] div#book.double div.page{
    float:left;
    margin:10px 3px;
}

body[data-viewer=turnStd] div#book.horizontal div.page{
    float:left;
    margin:10px 3px;
}

body[data-viewer=turn][bv-context=game], body[data-viewer=turnBook][bv-context=game] {
    overflow: hidden;
}

div#wait {
    position:fixed;
    width:100%;
    height:100%;
    top:0px;
}

div#wait .msg {
    position: absolute;
    top:50%;
    margin-top:16px;
    width:100%;
    text-align: center;
}

body.mobile #menuBottom {
    display: block;
    position:fixed;
    right:0;
    top:0;
    width:16px;
    height:100%;
    background:none !important;
}

body.desktop #menuBottom {
    display: block;
    position:fixed;
    left:0;
    bottom:0;
    width:100%;
    height:60px;
}

#pageSlider {
    width:60%;
    display: block;
    margin:-8px auto 0 auto;
}

body.desktop #pgSlider {
    width:60%;
    margin:-5px auto 0 auto;
    height:8px;
}

body.mobile #pgSlider {
    width:2px;
    height:calc(100% - 100px);
    margin:80px 0 0 14px;
}

body.desktop #pgSlider .remark {
    width:2px;
    height:10px;
    background: #ff1;
    position:absolute;
    top:-10px;
}

body.mobile #pgSlider .remark {
    width:6px;
    height:2px;
    background: #cc0;
    position:absolute;
    right:-2px;
    margin-top:-5px;
    z-index:2;
}

body.desktop #pgSliderHandle {
    width: 44px;
    height:20px;
    font-size:14px;
    padding:2px;
    margin-left:-18px;
    margin-top:-4px;
    text-align: center;
    line-height: 100%;
}
#pgSliderHandle .image {
    display: none;
    max-width:66px;
    position:absolute;
    bottom:20px;
}

body.mobile #pgSliderHandle {
    width: 84px;
    height:20px;
    font-size:14px;
    padding:2px 5px;
    margin-left:-12px;
    transition: margin-left 0.2s;
    text-align: left;
    line-height: 100%;
    color:rgba(0,0,0,0);
    border-radius: 10px;
}

body.mobile #pgSliderHandle.ui-state-active {
    color:#fff;
    margin-left:-62px;
}

#menuBottom .ui-btn {
    display: inline-block;
}

body.desktop .book-navigation {
    width:230px;
    margin:auto;
}

body.desktop .book-navigation span {
    float: left;
    display: block;
}

body.mobile .book-navigation {
    display: none;
}

body.desktop .no-desktop, body.mobile .no-mobile {
    display: none !important;
}

div.page div.remark {
    right:0;
    z-index: 10;
}

div.page.even div.remark {
    left:0;
}

div.page div.remark .ui-btn {
    margin:0;
    position: absolute;
    border-radius: 50%;
    transform: translateZ(-1px);
    transform-style: preserve-3d;
}

div.page div.remark .ui-btn.rmk-comment {
    right:0;
}
div.page.even div.remark .ui-btn.rmk-comment {
    left:0;
}
div.page div.remark .ui-btn.rmk-delete {
    right:24px;
}
div.page.even div.remark .ui-btn.rmk-delete {
    left:24px;
}

div.page div.remark .ui-btn.rmk-comment:after {
    background-color: rgba(0,80,170,.8);
}

div.page div.remark .ui-btn.rmk-delete:after {
    background-color: rgba(200,0,0,.8);
}

div.page div.remark .ui-btn.rmk-delete {
    display:none;
}

div.page div.remark.active .ui-btn.rmk-delete {
    display:block;
}

div.remark {
    position:absolute;
    width:50%;
}

div.remark .inputs {
    position:absolute;
    top:28px;
    display:none;
    width:100%;
    height:100px;
    border-radius: 10px;
    font-size: 50%;
    color:#000;
}

div.remark textarea {
    width:100%;
    height:100px;
}

div.remark:hover .inputs, div.remark .inputs:hover, div.remark.active .inputs {
    display:block;
    border:1px solid #aaa;
    background: rgba(255,255,240,.8);
}

div.remark .inputs:focus {
    display: block;
    background: #fff;
    border:1px solid #888;
}

.turnBook div#pages {
    width: 100%;
    height: 100%;
}

.turnBook div#pages.pt-landscape {
    overflow: hidden;
    position: relative;
}

.turnBook div.wrapper.video.even, .turnBook div.wrapper.pt-landscape.even {
    overflow:visible !important;
    z-index: 1;
}

.turnBook div.page.video.even, .turnBook div.page.pt-landscape.even{
    overflow:visible !important;
}

.turnBook div.page.video.even video {
    z-index: 1;
}

.turnBook div.page.video .footer, .turnBook div.page.video.odd video {
    display: none;
}

#home, #find {
    padding-top: 80px;
}

.view-home a {
    text-decoration: none;
    color:#000;
}


.menu-right{
    display: block;
    float: right;
}

.icon {
    display: block;
    width: 32px;
    height: 32px;
    padding:10px;
    margin:8px 4px;
    background-size:auto 70%;
    background-position: 50% 50%;
    background-repeat: no-repeat;
    cursor: pointer;
    float: left;
    filter:invert(100%);
}

body.touchable .icon{
    width: 40px;
    height: 40px;
    padding:10px;
    margin:5px 10px;
    float: left;
}

.icon-search  {background-image: url(icons/magnifying-glass.svg);}
.icon-back  {background-image: url(icons/back.svg);}
.icon-settings{background-image: url(icons/sticker-4.svg);}
.icon-profile {background-image: url(icons/user.svg);}
.icon-home {background-image: url(icons/home-icon.svg);}
.icon-next  {background-image: url(icons/next.svg);}
.icon-prev  {background-image: url(icons/previous.svg);}
.icon-full-screen {background-image: url(icons/full-screen.svg);}
.icon-font-bigger {background-image: url(icons/font-bigger.svg);}
.icon-font-smaller {background-image: url(icons/font-smaller.svg);}
.icon-zoom-in {background-image: url(icons/plus.svg);}
.icon-zoom-out {background-image: url(icons/minus.svg);}
.icon-toc {background-image: url(icons/menu.svg);}

.ff-test {opacity: 0;}

label {
    display: block;
}
.a-true {
    color: green;
}
.a-false {
    color: red;
}