body {
  overflow: hidden;
  margin: 0;
  background: #6b6b6b;
}

#main {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 5px;
  background: #fff;
  overflow: hidden;
  z-index: 2;
  /* -webkit-transition: -webkit-transform .4s, width .4s ease-out;
  -moz-transition: -moz-transform .4s, width .4s ease-out;
  -ms-transition: -ms-transform .4s, width .4s ease-out;
  transition: transform .4s, width .4s ease-out; */
  -webkit-transition: -webkit-transform .2s ease-out;
  -moz-transition: -moz-transform .2s ease-out;
  -ms-transition: -ms-transform .2s ease-out;
  transition: transform .2s ease-out;

  -moz-box-shadow:    inset 0 0 50px rgba(0,0,0,.08);
  -webkit-box-shadow: inset 0 0 50px rgba(0,0,0,.08);
  -ms-box-shadow: inset 0 0 50px rgba(0,0,0,.08);
  box-shadow:         inset 0 0 50px rgba(0,0,0,.08);
} 

#main.open {
  -webkit-transform: translate(300px, 0);
  -moz-transform: translate(300px, 0);
  -ms-transform: translate(300px, 0);
  transform: translate(300px, 0);
}

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

#area iframe {
  border: none;
}

#prev {
  left: 40px;
}

#next {  
  right: 40px;
}

.arrow {
  position: absolute;
  top: 50%;
  margin-top: -32px;
  font-size: 64px;
  color: #E2E2E2;
  font-family: arial, sans-serif;
  font-weight: bold;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

.arrow:hover {
  color: #777;
}

.arrow:active,
.arrow.active {
  color: #000;
}

#divider {
  position: absolute;
  width: 1px;
  border-right: 1px #000 solid;
  height: 82%;
  z-index: 1;
  left: 50%;
  top: 10%;
  opacity: .15;
  box-shadow: -2px 0 15px rgba(0, 0, 0, 1);
  display: none;
}

#divider.show {
  display: block;
}

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

#loader.hide {
    display: none;
}

#sidebar {

    display: block;
    background: #6b6b6b;
    position: absolute;
    top: 0;
    width: 300px;
    height: 100%;
    -webkit-transition: -webkit-transform .3s;
    -moz-transition: -moz-transform .3s;
    z-index: 1;
    overflow: hidden;

}

#toclist {
  overflow-x: hidden;
  overflow-y: auto;
  width: 300px;
  height: 100%;
  /*visibility: hidden;*/
  /* -webkit-transition: visibility 0 ease .5s;
  -moz-transition: visibility 0 ease .5s; */
  display: block;
}

#sidebar.open #toclist {
  overflow-y: auto;
  visibility: visible;
  /* -webkit-transition: visibility 0 ease 0;
  -moz-transition: visibility 0 ease 0; */
}

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

#toclist li {
  margin-bottom:10px;
  width: 225px;
  font-family: Georgia, "Times New Roman", Times, serif;
  list-style: none;
  text-transform: capitalize;
}

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

#toclist a {
  color: #AAA;
  text-decoration: none;
}

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

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

#toclist li.currentChapter > a,
#toclist li a:hover {
  color: #f1f1f1
}

/* #toclist li.openChapter > a, */
#toclist li a:hover {
  color: #E2E2E2;
}

#toclist li ul {
  padding-left:10px;
  margin-top: 8px;
  display: none;
}

#toclist li.currentChapter > ul,
#toclist li.openChapter > ul {
  display: block;
}

#toclist h3 {
  display: inline-block;
  color: #ccc;
  margin: 0;
  padding: 0;
  margin: 15px 0 0 20px;
}

#opener {
  padding: 12px 12px;
  float: left;
}

#singlepage {
  float: right;
  position: relative;
}

#singlepage .annotator-toolbar {
  position: absolute;
  top: 12px;
  right: 6px;
}

#singlepage .annotator-toolbar li {
  background: none;
  border: 0;
  box-shadow: none;
}

.icon {
  display: block;
  width: 25px;
  opacity: .5;
  position: relative;
  z-index: 25;
  cursor: pointer;
}

.icon:hover {
  opacity: 1;
}

.icon:active {
  padding-top: 2px;
  padding-left: 1px;
}

#titlebar {

  height: 8%;
  min-height: 20px;
  padding: 10px 0 10px 0;
  margin: 0 50px 0 50px;
  text-align: center;
  color: #4f4f4f;
  font-weight: 100;
  font-family: Georgia, "Times New Roman", Times, serif;
  opacity: .5;
  -webkit-transition: opacity .5s;
  -moz-transition: opacity .5s;
}

#titlebar:hover {
  opacity: 1;
}

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

#title-seperator.hidden {
  display: none;
}

#main.single {
  width: 66%;
}

#main.open.single {
  -webkit-transform: translate(51.5%, 0);
  -moz-transform: translate(51.5%, 0);
  -ms-transform: translate(51.5%, 0);
  transform: translate(51.5%, 0);
}

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

#sidebar.single {
  width: 34%;
}

#hypothesis {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 33%;
  margin: 0 .5%;
  overflow: hidden;
  z-index: 1;
}

#hypothesis .annotator-frame {
  background: none;
  position: absolute;
  left: 0;
  margin: auto !important;
  width: 100%;
}

/* .toc_toggle,
.toc_active {
  display: none;
  color: #fff;
}

.toc_toggle.display,
.toc_active.display,
.openChapter .toc_active { 
  display: inline-block;

} */

.toc_toggle {
  display: none;
}

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

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

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

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

  #divider.show {
    display: none;
  }

}

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

  #divider.show {
    display: none;
  }
}

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

  #divider.show {
    display: none;
  }

  #prev {
    left: 0;
  }

  #next {  
    right: 0;
    z-index: 550; /* Above Annotator */
  }

  .arrow {
    height: 100%;
    top: 72px;
    width: 10%;
    text-indent: -10000px;
  }

  #main {
    -webkit-transition: -webkit-transform .2s ease-out;
    -moz-transition: -moz-transform .2s ease-out;
    -ms-transition: -ms-transform .2s ease-out;
    transition: transform .2s ease-out;
  }

  #main.open {
    -webkit-transform: translate(260px, 0);
    -moz-transform: translate(260px, 0);
    -ms-transform: translate(260px, 0);
    transform: translate(260px, 0);
  }

  #titlebar {
    font-size: 10px;
    margin: 0 50px 0 50px;
  }


  #toclist {
    width: 260px;
  }

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

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

  #area iframe {
    pointer-events: none;
  }

}
