#view-toggle.padding{
    margin-top: 0px;
    margin-right: 30px;
}

#view-toggle .btn {
    border: 1px solid #DDD;
    background-color: #FFF;

}
#view-toggle .btn.active {
    background-color: #6CACE7;
    color: #FFF;
}
#deepzoom-controls {
    margin: auto;
    display: block;
    float: left;
    padding: 7px 10px;
    left: 10%;
}

#deepzoom-controls .btn-group {
    background: #AFAFAF;
    border-radius:3px;
    float: right;
    right: 14%;
}

#deepzoom-controls .btn-group:before{
    content:'';
    width: 0;
    height: 0;
    position:absolute;
    top: -7px;
    left:45%;
    border-style: solid;
    border-width: 0 10px 7px 10px;
    border-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) #B6B5B5 rgba(0, 0, 0, 0);
}

#deepzoom-controls .btn {
    background: transparent;
    border-color: #C4C4C4;
    color: #FFFFFF;
    transition:background-color 0.2s ease;
}

#deepzoom-controls .btn:focus,
#deepzoom-controls .btn:hover{
    background-color: #8B8B8B;
}

#deepzoom-controls.visible{
  padding-bottom: 5px;
  padding-right: 0;
  width: 100%;
}

/* class to hide page image without losing its size for page layout  */
.not-visible {
    opacity: 0;
}

#zoom-page {
   position: absolute;
   left: 55px;
   margin: 0 auto;
   padding: 0;
   text-align:center;
   z-index: -1;
   width: 80%;
   padding-right: 355px;  /* match page image space to marginalia */
   height: 90%;
   color: black;
}


.in-page-controls{
    position: relative;
    z-index: 300;
    height: 100px;
}
#deepzoom-controls.fullpage{
    z-index:100;
}

#deepzoom-controls.fullpage .btn-group:before{
    display:none;
}


.fullpage+#zoom-page{
    left:0;
}

.btn-primary .text-muted {
    color: white;
    opacity: 0.5;
}

/* styles page image with ocr text overlaid */
.page {
    position: relative;
    z-index: 0;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    padding: 0;
    left: 0;
    right: 0;
    max-width: 1640px;  /* arbitrary limit for large monitors */
 }
.page .content {
    position: relative;
    margin: auto;
    margin-right: 355px;  /* give space for marginalia: 300 marginalia column + 55 right carousel; */
    display: inline-block;
    min-height:100px;
 }



.ocr-line {
    display: block;
    position: absolute;
    padding: 0;
    margin: 0;
    line-height: 1;
    z-index: 5;
    white-space: nowrap;
    cursor: text;

    /* make text transparent */
    color: #000;     /* Fallback for older browsers */
    color: rgba(0, 0, 0, 0.0);
}
.ocr-zone {
    position: absolute;
    display: inline-block;
    padding: 0;
    margin: 0;
    vertical-align: top;
}
/* highlighted text style, for browsers that support it (Webkit, Mozilla) */

::selection {
    background: black;
    color: white;
}
::-moz-selection {
    background: black;
    color: white;
}
/* make image not selectable to avoid interference when highlighting ocr text */
.page .content img {
    -moz-user-select: none;
    -khtml-user-select: none;
    -webkit-user-select: none;
    -o-user-select: none;
 }

.page .content:after {
  content: '';
  background-image: url('../img/377.GIF');
  display: block;
  opacity:0.5;
  position: absolute;
  z-index: -1;
  height:45px;
  width:45px;
  top: 0;
  left: calc(50% - 22.5px);
}

.page.image-error .content:after {
    display:none;
}

#zoom-page.active+.page .content>img {
  opacity: 0;
}

#zoom-page.active+.page .content:after{
  display:none;
}

/* page thumbnails */
.page-thumbnails .page-thumbnail {
  position: relative;
  display: inline-block;
  border: none;

  background-size: cover;
  background-position: center;
  margin: 0px 20px 20px 0;
  position: relative;
  border-radius: 3px;

  /* Default size; if set in config, should override */
  width: 200px;
  height: 300px;
  /*margin: 5px;*/
}

p.page-number {
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.85);
    padding: 5px;
    margin-top:-1px;
    color: #959CA7;
    border-top-right-radius: 3px;
    border-left: 1px solid #B1B1B1;
    border-bottom-left-radius: 3px;
    border-bottom: 1px solid #B1B1B1;
}

.comment-count {
    display: inline-block;
    position: relative;
    min-width:25px;
    height:20px;
    margin:5px 5px 20px;
    padding: 0 5px;
    text-align:center;
    color:#fff;
    background:rgb(49, 197, 40);
    -webkit-border-radius: 3px;
    -moz-border-radius: 3px;
    border-radius: 3px;
}
a.comment-count:hover {
  text-decoration: none;
  color: white;
}
.page a.comment-count {
  display: none;
  margin-bottom: 0;
}

/* comment placement on page thumbnail */
.page-thumbnail .comment-count {
    display: block;
    position: absolute;
    bottom: 0;
    right: 0;
}

.page-thumbnails .page-thumbnail > a {
    position:absolute;
    top: 0;
    right: 0;
    width:100%;
    height:100%;
    border-radius: 3px;
    transition: box-shadow 0.4s ease, background-color 0.4s ease;
    background-color: transparent;
    box-shadow: 1px 2px 6px rgba(95, 95, 95, 0) inset;
    border: 1px solid #D8D8D8;
}

.page-thubnails .page-thumbnail > a:focus img,
.page-thumbnails .page-thumbnail > a:hover img {
    box-shadow: 0px 0px 18px rgba(0, 0, 0, 0.36) inset;
}

/* CSS triangle to indicate comment */
.comment-count:before {
  content:"";
  position:absolute;
  bottom:-14px;
  right:2px;
  border:8px solid transparent;
  border-top-color: rgb(49, 197, 40);
}

/* comment placement on cover/page images */
.cover .comment-count {
    display: block;
    position: absolute;
    bottom: 0;
    right: 0;
}

article img {
    max-width: 100%;
}

.carousel-control {
    color: #000; text-shadow: 0px 0px 10px #EBEBEB;
    transition: color 0.2s;
    position: fixed;
    width: 55px; /* make carousel links smaller to leave space for marginalia */
}

.carousel-control:hover, .carousel-control:focus {
    opacity: 0.6;
    color: #005CFF;
}

.carousel-control .glyphicon-chevron-left, .carousel-control .glyphicon-chevron-right, .carousel-control .icon-prev, .carousel-control .icon-next {
    position: fixed;
}
span.glyphicon.glyphicon-chevron-right {
    right: 2%;
}

span.glyphicon.glyphicon-chevron-left {
    left: 2.5%;
}

.carousel-control.left{
    background: -moz-linear-gradient(left,  rgba(0,0,0,0.37) 0%, rgba(0,0,0,0) 100%); /* FF3.6+ */
    background: -webkit-gradient(linear, left top, right top, color-stop(0%,rgba(0,0,0,0.37)), color-stop(100%,rgba(0,0,0,0))); /* Chrome,Safari4+ */
    background: -webkit-linear-gradient(left,  rgba(0,0,0,0.37) 0%,rgba(0,0,0,0) 100%); /* Chrome10+,Safari5.1+ */
    background: -o-linear-gradient(left,  rgba(0,0,0,0.37) 0%,rgba(0,0,0,0) 100%); /* Opera 11.10+ */
    background: -ms-linear-gradient(left,  rgba(0,0,0,0.37) 0%,rgba(0,0,0,0) 100%); /* IE10+ */
    background: linear-gradient(to right,  rgba(0,0,0,0.37) 0%,rgba(0,0,0,0) 100%); /* W3C */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#5e000000', endColorstr='#00000000',GradientType=1 ); /* IE6-9 */
}

.carousel-control.left:hover{
    background: -moz-linear-gradient(left,  rgba(0,0,0,0.21) 0%, rgba(0,0,0,0) 100%); /* FF3.6+ */
    background: -webkit-gradient(linear, left top, right top, color-stop(0%,rgba(0,0,0,0.21)), color-stop(100%,rgba(0,0,0,0))); /* Chrome,Safari4+ */
    background: -webkit-linear-gradient(left,  rgba(0,0,0,0.21) 0%,rgba(0,0,0,0) 100%); /* Chrome10+,Safari5.1+ */
    background: -o-linear-gradient(left,  rgba(0,0,0,0.21) 0%,rgba(0,0,0,0) 100%); /* Opera 11.10+ */
    background: -ms-linear-gradient(left,  rgba(0,0,0,0.21) 0%,rgba(0,0,0,0) 100%); /* IE10+ */
    background: linear-gradient(to right,  rgba(0,0,0,0.21) 0%,rgba(0,0,0,0) 100%); /* W3C */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#36000000', endColorstr='#00000000',GradientType=1 ); /* IE6-9 */
}

.carousel-control.right{
    background: -moz-linear-gradient(left,  rgba(0,0,0,0) 0%, rgba(0,0,0,0.37) 100%); /* FF3.6+ */
    background: -webkit-gradient(linear, left top, right top, color-stop(0%,rgba(0,0,0,0)), color-stop(100%,rgba(0,0,0,0.37))); /* Chrome,Safari4+ */
    background: -webkit-linear-gradient(left,  rgba(0,0,0,0) 0%,rgba(0,0,0,0.37) 100%); /* Chrome10+,Safari5.1+ */
    background: -o-linear-gradient(left,  rgba(0,0,0,0) 0%,rgba(0,0,0,0.37) 100%); /* Opera 11.10+ */
    background: -ms-linear-gradient(left,  rgba(0,0,0,0) 0%,rgba(0,0,0,0.37) 100%); /* IE10+ */
    background: linear-gradient(to right,  rgba(0,0,0,0) 0%,rgba(0,0,0,0.37) 100%); /* W3C */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', endColorstr='#5e000000',GradientType=1 ); /* IE6-9 */
}

.carousel-control.right:hover{
    background: -moz-linear-gradient(left,  rgba(0,0,0,0) 0%, rgba(0,0,0,0.21) 100%); /* FF3.6+ */
    background: -webkit-gradient(linear, left top, right top, color-stop(0%,rgba(0,0,0,0)), color-stop(100%,rgba(0,0,0,0.21))); /* Chrome,Safari4+ */
    background: -webkit-linear-gradient(left,  rgba(0,0,0,0) 0%,rgba(0,0,0,0.21) 100%); /* Chrome10+,Safari5.1+ */
    background: -o-linear-gradient(left,  rgba(0,0,0,0) 0%,rgba(0,0,0,0.21) 100%); /* Opera 11.10+ */
    background: -ms-linear-gradient(left,  rgba(0,0,0,0) 0%,rgba(0,0,0,0.21) 100%); /* IE10+ */
    background: linear-gradient(to right,  rgba(0,0,0,0) 0%,rgba(0,0,0,0.21) 100%); /* W3C */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', endColorstr='#36000000',GradientType=1 ); /* IE6-9 */
}

.image-annotation-highlight {
  display: block;
  position: absolute;
}

.annotator-hl {
    background: #FFFF0A;
    background: rgba(255,255,10,.3);
}
/* make consecutive highlight spans look like they are seamless
   (NOTE: adjustment amount may depend on word/text spacing) */
span.annotator-hl:not(:first-child) {
    margin-left: -13px;
}

/* Annotator Tags - styles from annotator.js and readux
-------------------------------------------------------------------- */
.annotator-tags {
  margin-bottom: -2px;
  position: relative;
  padding: 0.5em 1.5em;
  color: #B9B9BA;
  border-top: 1px solid #e4e4e4;
  cursor: text;
}
.annotator-tags::before {
  content: "\f02c";
  display: inline-block;
  width: 1em;
  margin-left: -1em;
  opacity: 0.9;
  font-family: 'FontAwesome';
  font-style: normal;
  font-weight: normal;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.annotator-tags .annotator-tag {
  display: inline-block;
  padding: 0 8px;
  margin-bottom: 2px;
  margin-left: 2px;
  line-height: 1.6;
  font-weight: normal;
  font-size: 90%;
  background-color: #e6e6e6;
  -webkit-border-radius: 8px;
  -moz-border-radius: 8px;
  -o-border-radius: 8px;
  border-radius: 8px
}
.annotator-tags .annotator-tag:first-child {
  margin-left: 0;
}

.annotator-tags a {
  color: #B9B9BA;
}
.annotator-tags a:hover {
  text-decoration: none;
}

.wide-container {
  padding-left:  1rem;
  padding-right: 1rem;
  text-align: center;
  margin-left:  auto;
  margin-right: auto;
}

.margin-container {
  margin-right: 55px;  /* space for carousel nav */
  top: 100px;  /* position to line up with top of page */
  height: 90%;
  width: 315px;
  background-color: rgb(0,0,0,.3); /* test */
  overflow-y: auto;
  overflow-x: hidden;
}

/* adjust marginalia styles to make "no content" note visible */
li.empty-item:first-child:last-child {
  top: 125px;
  position: absolute;
}

.annotator-hl a, a.to-hl {
  display: none;
  outline: 0;  /* remove outline when target url is clicked */
}

a.to-fullpage {
  float: right;
  padding: 5px;
  color: #999
}


/* for smaller width screens, display annotations below the page image instead of beside */
@media screen and (max-width: 1000px) {
  .page .content {
     margin: auto;  /* remove extra margin used to make space for annotations */
  }
  #zoom-page {
    padding-right: auto;
    margin: auto;
  }

  .margin-container {
    top: auto;
    padding: 0;
    margin: 0 55px;
    width: calc(100% - 120px);
    position: relative;
    overflow: auto;
    /* fixme: this is centered differently than the page image is */;
  }
  ul.annotation-list {
    padding: 0;
    margin: 0;
    min-height: auto;
  }
  .annotation-list .marginalia-item {
    width: 100%;
  }
  .annotator-hl a {
    position: absolute;
    display: inline-block;
    width: 100%;
    height: 100%;
  }
  .annotator-hl.image-annotation-highlight a {
    display: block;
  }
  a.to-hl {
    color: #999;
    float: right;
    display: block;
    padding: 5px;
  }
  li.empty-item:first-child:last-child {
    position: relative;
    top: auto;
  }
  .page a.comment-count {
    display: inline-block;
  }

/* annotation display: related pages link */
.annotator-related-pages {
  padding-left: 5px;
}

 /* site wide issue (not specific to volume page) */
 .masthead  {
    margin-bottom: 1rem;
 }


}

@media screen and (max-width: 775px) {
  .carousel-control {
    width: 25px;
  }
  .margin-container {
    margin: 0 25px;
    width: calc(100% - 50px);
  }
  ul.annotation-list {
    width: 95%;
  }
  .marginalia-item {
    margin: 0 3px 10px;
  }

 .masthead {
    margin-bottom: 0;
 }

}

/* browse pages switches to smaller thumbnails */
@media screen and (max-width: 425px) {
  .page-thumbnails .comment-count {
    margin:5px 5px 10px;
  }
  .page-thumbnails p.page-number {
    font-size: 85%;
  }
  .page-thumbnails .page-thumbnail {
    margin: 0px 10px 10px 0;
  }
}

@media screen and (min-width: 1200px) {
  /* give annotations more room on larger screens */
  .margin-container {
    width: 30%;
  }

  #zoom-page {
   position: absolute;
   left: 55px;
   margin: 0 auto;
   padding: 0;
   text-align:center;
   z-index: -1;
   width: 80%;
   padding-right: 355px;  /* match page image space to marginalia */


}