/* this are engine-independent CSS, do with it whatewer you see fit */
/*
  Several things to note:

    - never mess with em/ex in heights and/or vertical margins/paddings
      (for the text size it's probably ok, but still avoid it)

    - You can make whatever changes to column styles depending on it's
      position using FB2readerCell1of2 classes and the like, yes. UNTILL.
      Untill every page's (height|width|inner element sizes) are identical.
      As engine renders first page and then the next page's borders are
      guessed analising it in the belief the next page will behave exactly
      as the first one does and so on. Background, symmetrical margins
      and all that - at your service

*/
.FBReaderContentDiv h1 {
    /*font-family: 'Times New Roman', serif;*/
      /*padding: 5px 0 10px 0;*/
}
.FBReaderContentDiv h2 {
    /*font-family: 'Times New Roman', serif;*/
    /*padding: 4px 0 8px 0;*/
}
.FBReaderContentDiv div,
.FBReaderContentDiv h3, .FBReaderContentDiv h4,
.FBReaderContentDiv h5, .FBReaderContentDiv h6 {
    /*font-family: 'Arial', sans-serif;*/
}
#reader {
    height:800px;
    width:100%;
}

#wrapper-reader,#empty-pixel {
    width:100%;
    height:100%;
    cursor: text;
    position: absolute;
    z-index: 3;
    left: 0;
    top: 0;
    
}

div.FB2readerPage div.FBReaderContentDiv {
    padding:10px;
    margin:0;
}

#FB3ReaderHostDiv {
    -moz-user-select: -moz-none;
    -khtml-user-select: none;
    -webkit-user-select: none;
    -o-user-select: none;
    user-select: none;
}

div.FB2readerPage a.footnote_attached {
    font-size: 70%;
    vertical-align: super;
    line-height:30%;
    margin:0 -0.1em 0 0.1em;
}

div.FB2readerPage p {
    padding:0;
    margin:0;
    text-indent:1.3em;
}
div.FB2readerPage p.cut_top {
    text-indent:0;
}
div.FB2readerPage div.footnote {
    font-size: 70%;
    clear:both;
}

div.FB2readerPage div.skip_double.footnote.tag_poem { position: fixed;padding-left: 0; }
div.FB2readerPage div.footnote.tag_stanza {padding-bottom: 0px;}
div.FB2readerPage div.footnote.tag_stanza p {font-size: 100%;}

.FBReaderNotesDiv {
    padding: 0;
    margin-right: 0.5em;
    margin-left: 10px;
    overflow: hidden;
    position: absolute;
}

div.FB2readerPage p.footnote {
    text-align: left;
    font-size: 70%;
    width:auto;
}

.FBReaderNotesDiv {
    border-top: 1px dotted #ffff5d;
}

.FBReaderNotesDiv h2,
.FBReaderNotesDiv h3,
.FBReaderNotesDiv h4,
.FBReaderNotesDiv h5,
.FBReaderNotesDiv h6 {
    display: inline-block;
}
.FBReaderNotesDiv h2.footnote,
.FBReaderNotesDiv h3.footnote,
.FBReaderNotesDiv h4.footnote,
.FBReaderNotesDiv h5.footnote,
.FBReaderNotesDiv h6.footnote{
    font-size: 70%;
    vertical-align: super;
    margin:0;
    padding:0;
    /*margin-left: -10px;*/
}

.FBReaderNotesDiv p.footnote {
    display: inline;
    margin-left: 0.3em;
}

.FB2readerPage img {
    /*background-color:white;*/
    /*text-align: center;*/
}
/*div.SmallImgZoom1 {
  opacity: 0.4;
  filter: alpha(opacity=40); *//*For IE8 and earlier*//*
  position:absolute;
}
div.SmallImgZoom2 {
  padding: 0.1em 0.2em 0.2em 0.2em;
  background-color: silver;
  border: 1px solid black;
  position:relative;
  left:0.5em;
  top:0.5em;
}
div.SmallImgZoom2 a {
  text-decoration:none;
}*/

table.contextmenu, table.notedialog {
    border: 1px solid #808080;
    border-collapse: collapse;
    cursor: default;
    background-color: silver;
    display:none;
}
table.contextmenu td, table.notedialog td {
    padding:5px;
}
table.notedialog {
    position: absolute;
    left: 20px;
    top: 20px;
}

table.contextmenu tr :hover {
    color:white;
    background-color:darkblue;
}
table.contextmenu td {
    padding: 5px 7px;
}

span.my_selec_1_default, strong.my_selec_1_default, em.my_selec_1_default {
    background-color:red;
    color: white;
}

.footnote_clickable {
   text-decoration: underline;
    color: white;
    display: inline-block;
}
.footnote_clickable span {
    color: white;
    margin: 0 5px;
    display: inline-block;
}

div.tocitm {
    padding-left:0.3em;
}
#tocdiv, #bookmarksmandiv {
    height: 80%;
    overflow-y: scroll;
    display: none;
    position: absolute;
    top: 50px;
    left: 0;
    background-color: silver;
    padding: 0.5em;
    border: 2px outset;
}
#bookmarksmandiv{
	-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=70)";
	filter: alpha(opacity=70);
	-moz-opacity:0.7;
	-khtml-opacity: 0.7;
	opacity: 0.7;
}

.FBReaderContentDiv div.fit_to_page p, /* for legacy json, remove it later */
.FBReaderContentDiv div.img_with_subscr p {
    text-indent:0;
    font-size: 80%;
    width:80%;
    line-height: 130%;
}

.FBReaderContentDiv div.fit_to_page.tag_float p {
    width: 100%;
}

.FBReaderContentDiv div.tag_image {
    display: block;
    margin:0 auto;
}

/* debug */

/* this are engine-required CSS, do not change it */
html, body {
    height: 100%;
}

div, p, h1, h2, h3, h4, h5, h6, blockquote {
    position: relative;
    margin-bottom: 0;
    margin-top: 0;
}

#reader div, #reader p, #reader h1, #reader h2, #reader h3, #reader h4, #reader h5, #reader h6, #reader blockquote {
	margin-bottom: 0 !important; /* Messing mith margins in DOM is a hell, I'll return to this later on */
	margin-top: 0 !important;
}

div.FB2readerPage {
    overflow:hidden;
    float:left;
    height: 100%;
    padding: 0;
    margin: 0;
}


.cut_top {
    padding-top:0 !important;
    margin-top:0 !important;
    border-top: none !important;
}

.cut_bot {
/*    padding-bottom:0;*/
    margin-bottom:0 !important;
    border-bottom: none !important;
}

div.FB3ReaderColumnset4 div.FB2readerPage {
    width: 25%;
}
div.FB3ReaderColumnset3 div.FB2readerPage {
    width: 33.3%;
}
div.FB3ReaderColumnset2 div.FB2readerPage {
    width: 50%;
}

div.FB3ReaderColumnset1 div.FB2readerPage {
    width: 100%;
}

/* background renderer page - removed from sight here to avoid IE blinking bug */
#FB3ReaderColumn0 {
    background-color: lime;
    top: 5000px;
}
div.FB2readerPage div.footnote {
    max-height: 500px; /* this will be overriden by inline style by engine, no reason to interfere */
    font-size: 80%;
		/*overflow: auto;*/

}
div.FB2readerPage div.overfloatednote {
  overflow: auto;
}

.FB2readerPage img.tag_image {
    position: relative;
}

sub, sup {
    white-space:nowrap;
}


/* engine-required CSS END */

.preorder_buy_trial {background: #f5f5f5; padding: 15px 0 0 0;}
.preorder_buy_trial .trial-button {display: none;}