
/* Start by setting display:none to make this hidden.
Then we position it in relation to the viewport window
with position:fixed. Width, height, top and left speak
speak for themselves. Background we set to 80% white with
our animation centered, and no-repeating */
.modal {
    display:    none;
    position:   fixed;
    z-index:    1000;
    top:        0;
    left:       0;
    height:     100%;
    width:      100%;
    background: rgba( 255, 255, 255, .8 )
    url('/img/preloader2.gif')
    50% 50%
    no-repeat;
}

/* When the body has the loading class, we turn
       the scrollbar off with overflow:hidden */
body.loading {
    overflow: hidden;
}

/* Anytime the body has the loading class, our
   modal element will be visible */
body.loading .modal {
    display: block;
}

/* --------------------------------- */

.pageDelim {
    position: relative;
    overflow: hidden;
    text-align: center;
    color: darkgray;
    margin: 15px 20px;
}
.pageDelim span {
    display: inline-block;
    vertical-align: baseline;
    zoom: 1;
    *display: inline;
    *vertical-align: auto;
    position: relative;
    padding: 0 20px;
}
.pageDelim span:before,
.pageDelim span:after {
    content: '';
    display: block;
    width: 1000px;
    position: absolute;
    top: 0.73em;
    border-top: 1px dotted darkgray;
}
.pageDelim span:before {
    right: 100%;
}
.pageDelim span:after {
    left: 100%;
}

#reader > div {
    margin-bottom: 20px;
}

#reader h1 {
    font-size: 180%;
}

/* --------------------------------- */

#text {
    margin: 0 auto;
}
/*#text, #text * {
    line-height: 140%;
}*/
#text br {
    line-height: 170%;
}
#text img {
    margin: 10px;
    max-width: 75%;
    max-height: 75%;
}
/* --------------------------------- */

.popup {
    background: white;
    position: relative;
    padding: 10px 20px 30px;
}

.popup h1 {
    text-align: center;
}

/* ====== Zoom effect ====== */
.mfp-zoom-in {
    /* start state */
    /* animate in */
    /* animate out */
}
.mfp-zoom-in .mfp-with-anim {
    opacity: 0;
    transition: all 0.2s ease-in-out;
    transform: scale(0.8);
}
.mfp-zoom-in.mfp-bg {
    opacity: 0;
    transition: all 0.3s ease-out;
}
.mfp-zoom-in.mfp-ready .mfp-with-anim {
    opacity: 1;
    transform: scale(1);
}
.mfp-zoom-in.mfp-ready.mfp-bg {
    opacity: 0.8;
}
.mfp-zoom-in.mfp-removing .mfp-with-anim {
    transform: scale(0.8);
    opacity: 0;
}
.mfp-zoom-in.mfp-removing.mfp-bg {
    opacity: 0;
}

/* ====== Move-from-top effect ====== */
.mfp-move-from-top {
    /* start state */
    /* animate in */
    /* animate out */
}
.mfp-move-from-top .mfp-content {
    vertical-align: top;
}
.mfp-move-from-top .mfp-with-anim {
    opacity: 0;
    transition: all 0.2s;
    transform: translateY(-100px);
}
.mfp-move-from-top.mfp-bg {
    opacity: 0;
    transition: all 0.2s;
}
.mfp-move-from-top.mfp-ready .mfp-with-anim {
    opacity: 1;
    transform: translateY(0);
}
.mfp-move-from-top.mfp-ready.mfp-bg {
    opacity: 0;
}
.mfp-move-from-top.mfp-removing .mfp-with-anim {
    transform: translateY(-50px);
    opacity: 0;
}
.mfp-move-from-top.mfp-removing.mfp-bg {
    opacity: 0;
}

/* --------------------------------- */

#contentsPopup {
    background: white;
    padding: 10px 20px 30px;
    text-align: left;
    margin: 40px auto;
    position: relative;
    min-width: 400px;
    max-width: 600px;
}

#contentsPopup ul {
    padding: 0;
}
#contentsPopup li {
    display: table;
    list-style: none;
    padding: 3px 3px 4px 3px;
    border-bottom: 1px solid #f1f1f1;
}
#contentsPopup li:last-of-type {
    border-bottom: 0;
}
#contentsPopup li:hover {
    background: #f7f7f7;
}
#contentsPopup li .title {
    display: table-cell;
    width: 100%;
}
#contentsPopup li .page {
    display: table-cell;
    width: 30px;
    height: 100%;
    vertical-align: middle;
}

/* --------------------------------- */

#settingsPopup {
    text-align: center;
    background: white;
    padding: 10px;
    width: 300px;
    margin: 20px auto;
    position: relative;
    border: 1px solid #d7d7d7;
    border-radius: 5px;

    -webkit-box-shadow: 0px 3px 3px 0px rgba(200, 200, 200, 0.5);
    -moz-box-shadow:    0px 3px 3px 0px rgba(200, 200, 200, 0.5);
    box-shadow:         0px 3px 3px 0px rgba(200, 200, 200, 0.5);
}

#settingsPopup > div {
    margin: 20px 0;
}


#settingsPopup .select2-container {
    width: 245px;
}
#settingsPopup .select2-container .select2-choice {
    padding: 2px 0 2px 8px !important;
    -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.2);
    -moz-box-shadow: 0 1px 2px rgba(0,0,0,.2);
    box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.settingsS2-dropdown {
    font-size: 20px;
}
.settingsS2-dropdown .select2-result-label {
    font-family: 'Comic Sans MS';
    text-align: center;
}
.settingsS2-dropdown .select2-results {
    max-height: 400px;
}
.settingsS2-dropdown .select2-highlighted {
    background: #fafafa;
    color: #000000;
}
/* disable keyboard appearing on mobile devices */
#settingsPopup .select2-container .select2-focusser,
.settingsS2-dropdown .select2-search,
.settingsS2-dropdown .select2-search input {
    display: none !important;
}

#settingsPopup .fontSizeContainer {
    width: 130px;
    vertical-align: middle;
}
#makeFontSmaller, #makeFontBigger {
    width: 50px;
    height: 32px;
    padding: 0 15px;
    font-family: Georgia, "Times New Roman", serif;
    vertical-align: middle;
}
#makeFontSmaller {
    font-size: 11px;
}
#makeFontBigger {
    font-weight: bold;
    font-size: 17px;
}

#textWidth{
    width: 230px;
    margin: 10px auto;
    border: 1px solid #b7b7b7;
    border-radius: 5px;
    height: 13px;
    background-color: #FAFAFA;
    box-shadow: inset 0 1px 1px #F0F0F0, 0 3px 6px -5px #BBB;
}
#textWidth .ui-slider-handle {
    border: none;
    width: 25px;
    height: 25px;
    cursor: pointer;
    background: url('/img/handle.png') no-repeat 50% 50%;
    font-weight: bold;
    outline: none;
    top: -7px;
    margin-left: -12px;
}
#textWidth .ui-slider-range {
    border-radius: 4px;
    background: #ffffff; /* Old browsers */
    background: -moz-linear-gradient(top,  #ffffff 0%, #eaeaea 100%); /* FF3.6+ */
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#eaeaea)); /* Chrome,Safari4+ */
    background: -webkit-linear-gradient(top,  #ffffff 0%,#eaeaea 100%); /* Chrome10+,Safari5.1+ */
    background: -o-linear-gradient(top,  #ffffff 0%,#eaeaea 100%); /* Opera 11.10+ */
    background: -ms-linear-gradient(top,  #ffffff 0%,#eaeaea 100%); /* IE10+ */
    background: linear-gradient(top,  #ffffff 0%,#eaeaea 100%); /* W3C */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#eaeaea',GradientType=0 ); /* IE6-9 */
}

#textAlign {
    vertical-align: middle;
}

/* --------------------------------- */

.pages {
    margin: 20px 0;
}

.pages > div {
    margin: 10px 0;
}

#pageSlider, #pageSlider .textOver {
    width: 560px;
}
#pageSlider {
    position: relative;
    margin: 0 auto;
}
#pageSlider .textUnder, #pageSlider .textOver {
    text-align: center;
    font-size: 11px;
    font-family: Verdana, Arial, sans-serif;
    cursor: default;
}
#pageSlider .textUnder {
    color: #888888;
}
#pageSlider .textOver {
    position: absolute;
    color: #fff;
    top: 1px;
}
#pageSlider.ui-slider {
    background: #FAFAFA;
    border-radius: 4px;
    border: 1px solid #D3D3D3;
    box-shadow: inset 0 1px 1px #F0F0F0, 0 3px 6px -5px #BBB;
    height: 16px;
}
#pageSlider .ui-slider-handle {
    outline: none;
    display: none;
}
#pageSlider .ui-slider-range {
    overflow: hidden;
    text-align: right;
    box-shadow: inset 0 0 3px rgba(51,51,51,0.45);

    -webkit-box-sizing: content-box;
    -moz-box-sizing: content-box;
    box-sizing: content-box;

    -webkit-border-radius: 3px;
    -moz-border-radius: 3px;
    border-radius: 3px;
    border1: none;

    font: normal 100%/normal Arial, Helvetica, sans-serif;
    color: rgba(255,255,255,1);
    -o-text-overflow: clip;
    text-overflow: clip;
    background: -webkit-linear-gradient(-225deg, rgba(255,255,255,0.2) 25%, rgba(0,0,0,0) 25%, rgba(0,0,0,0) 50%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.2) 75%, rgba(0,0,0,0) 75%, rgba(0,0,0,0) 0), rgba(183,219,6,1);
    background: -moz-linear-gradient(315deg, rgba(255,255,255,0.2) 25%, rgba(0,0,0,0) 25%, rgba(0,0,0,0) 50%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.2) 75%, rgba(0,0,0,0) 75%, rgba(0,0,0,0) 0), rgba(183,219,6,1);
    background: linear-gradient(315deg, rgba(255,255,255,0.2) 25%, rgba(0,0,0,0) 25%, rgba(0,0,0,0) 50%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.2) 75%, rgba(0,0,0,0) 75%, rgba(0,0,0,0) 0), rgba(183,219,6,1);
    background-position: right;
    -webkit-background-origin: padding-box;
    background-origin: padding-box;
    -webkit-background-clip: border-box;
    background-clip: border-box;
    -webkit-background-size: 50px 50px;
    background-size: 50px 50px;
    background-position: right;
}

#topPanel {
    text-align: center;
    margin: 10px auto;
}
#topPanel > * {
    margin: 0 0 0 10px;
    display: inline-block;
    vertical-align: middle;
}
#topPanel > *:first-child {
    margin: 0;
}

.prevPage, .nextPage {
    width: 110px;
}

#openContentsButton, #openSettingsButton {
    width: 120px;
}

.styled-select {
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;
    -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.2);
    -moz-box-shadow: 0 1px 2px rgba(0,0,0,.2);
    box-shadow: 0 1px 2px rgba(0,0,0,.2);
    color: #606060;
    border: solid 1px #b7b7b7;
    background: #fff url('/img/icon-arrow-down.png') no-repeat 96% 6px;
    height: 28px;
    overflow: hidden;
    width: 60px;
}
.styled-select select {
    color: #606060;
    outline: none;
    background: transparent;
    border: none;
    font-size: 13px;
    height: 28px;
    padding-left: 7px;
    /* If you add too much padding here, the options won't show in IE */
    width: 88px; /* +28px */
}
.styled-select select:focus::-ms-value {
    background: inherit;
    color: #606060;
}

/* --------------------------------- */

.ui-tooltip {
    padding: 15px;
    font-family: Tahoma, Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 150%;
}
#text a.note {
    cursor: pointer;
}
#nextPageBtnWrp {
    text-align: center;
    margin: 30px 0;
}
#inTheEnd {
    display: none;
    width: 90%;
    margin: 0 auto;
}
#inTheEnd br {
    line-height: 170%;
}