/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- /
/* vim: set shiftwidth=4 tabstop=8 autoindent cindent expandtab: */

body {
  background-color: #929292;
  font-family: 'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, Verdana, sans-serif;
  margin: 0px;
  padding: 0px;
}

[hidden] {
  display: none !important;
}

/* === Toolbar === */
#controls {
  background-color: #eee;
  background: -o-linear-gradient(bottom,#eee 0%,#fff 100%);
  background: -moz-linear-gradient(center bottom, #eee 0%, #fff 100%);
  background: -webkit-gradient(linear, left bottom, left top, color-stop(0.0, #ddd), color-stop(1.0, #fff));
  border-bottom: 1px solid #666;
  padding: 3px;
  position: fixed;
  left: 0px;
  top: 0px;
  height: 24px;
  width: 100%;
  z-index: 1;
  white-space:nowrap;
  overflow: hidden;
}

.separator {
  display: inline;
  border-left: 1px solid #d3d3d3;
  border-right: 1px solid #fff;
  height: 16px;
  width:0px;
  margin: 4px;
}

#controls > a > img {
    margin: 4px;
    height: 16px;
}

#controls > button {
  line-height: 16px;
}

#controls > button > img {
  width: 16px;
  height: 16px;
}

#controls > button[disabled] > img {
  opacity: 0.5;
}

#pageNumber {
  text-align: right;
}

#fileInput {
  line-height: 16px;
}

span#info {
  display: none;
}

@-moz-document regexp("http:.*debug=1.*") {
  span#info {
    display: inline-block;
  }
}

/* === Sidebar === */
#sidebar {
  position: fixed;
  width: 350px;
  top: 62px;
  bottom: 18px;
  left: -290px;
  transition: left 0.25s ease-in-out 1s;
  -o-transition: left 0.25s ease-in-out 1s;
  -moz-transition: left 0.25s ease-in-out 1s;
  -webkit-transition: left 0.25s ease-in-out 1s;
  z-index: 1;
}

#sidebar:hover,
#sidebar.pinned {
  left: 0px;
  transition: left 0.25s ease-in-out 0s;
  -o-transition: left 0.25s ease-in-out 0s;
  -moz-transition: left 0.25s ease-in-out 0s;
  -webkit-transition: left 0.25s ease-in-out 0s;
}

#pinIcon {
  position: absolute;
  top: 4px;
  right: 55px;
  width: 15px;
  height: 15px;
  background: center no-repeat;
  background-image: url('images/pin-up.svg');
  background-size: 15px 15px;
}

#pinIcon:hover {
  background-color: rgba(255,255,255,0.35);
}

#sidebar.pinned #pinIcon {
  background-image: url('images/pin-down.svg');
  background-size: 15px 15px;
}

#sidebarBox {
  background-color: rgba(0, 0, 0, 0.7);
  width: 300px;
  height: 100%;
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
  -moz-border-radius-topright: 8px;
  -moz-border-radius-bottomright: 8px;
  -webkit-border-top-right-radius: 8px;
  -webkit-border-bottom-right-radius: 8px;
  box-shadow: 0px 2px 8px #000;
  -moz-box-shadow: 0px 2px 8px #000;
  -webkit-box-shadow: 0px 2px 8px #000;
}

#sidebarScrollView {
  position: absolute;
  overflow: hidden;
  overflow-y: auto;
  top: 20px;
  bottom: 10px;
  left: 10px;
  width: 280px;
}

.thumbnail {
  width: 134px;
  height: 134px;
  margin-top: 5px;
  margin-bottom: 5px;
  margin-left:auto;
  margin-right:auto;
  line-height: 134px;
  text-align: center;
  overflow: hidden;
}

.thumbnail:not([data-loaded]) {
  background-color: gray;
}

.thumbnail > canvas {
  vertical-align: middle;
  display: inline-block;
}

#outlineScrollView {
  position: absolute;
  background-color: #fff;
  overflow: auto;
  top: 20px;
  bottom: 10px;
  left: 10px;
  width: 280px;
}

#outlineView {
  padding-top: 4px;
  padding-bottom: 100px;
  padding-left: 6px;
  padding-right: 6px;
  font-size: smaller;
}

.outlineItem > .outlineItems {
  margin-left: 20px;
}

.outlineItem > a {
  text-decoration: none;
  color: black;
}

.outlineItem > a:hover {
  background: #ff0;
  box-shadow: 0px 2px 10px #ff0;
}

#sidebarControls {
  position:absolute;
  width: 120px;
  height: 32px;
  left: 15px;
  bottom: 35px;
}

#sidebarControls > button {
  box-shadow: 0px 4px 10px #000;
  -moz-box-shadow: 0px 4px 10px #000;
  -webkit-box-shadow: 0px 4px 10px #000;
}

#sidebarControls > button > img {
  width: 32px;
  height: 32px;
}

#sidebarControls > button[disabled] > img {
  opacity: 0.5;
}

#sidebarControls > button[data-selected] {
  box-shadow: 0px 4px 10px #ff0;
  -moz-box-shadow: 0px 4px 10px #ff0;
  -webkit-box-shadow: 0px 4px 10px #ff0;
}

/* === Content view === */
canvas {
  margin: auto;
  display: block;
}

.page {
  width: 816px;
  height: 1056px;
  margin: 10px auto;
  position: relative;
  overflow: hidden;
  box-shadow: 0px 4px 10px #000;
  -moz-box-shadow: 0px 4px 10px #000;
  -webkit-box-shadow: 0px 4px 10px #000;
  background-color: white;
}

.page > a {
  display: block;
  position: absolute;
}

.page > a:hover {
  opacity: 0.2;
  background: #ff0;
  box-shadow: 0px 2px 10px #ff0;
  -moz-box-shadow: 0px 2px 10px #ff0;
  -webkit-box-shadow: 0px 2px 10px #ff0;
}

.loadingIcon {
  position: absolute;
  display: block;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background: url('images/loading-icon.gif') center no-repeat;
}

.textLayer {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  color: #000;
  font-family: sans-serif;
}

.textLayer > div {
  color: transparent;
  position: absolute;
  line-height:1.3;
}

.annotComment > div {
  position: absolute;
}

.annotComment > img {
  position: absolute;
}

.annotComment > img:hover {
  cursor: pointer;
  opacity: 0.7;
}

.annotComment > div {
  padding: 0.2em;
  max-width: 20em;
  background-color: #F1E47B;
  box-shadow: 0px 2px 10px #333;
  -moz-box-shadow: 0px 2px 10px #333;
  -webkit-box-shadow: 0px 2px 10px #333;
}

.annotComment > div > h1 {
  font-weight: normal;
  font-size: 1.2em;
  border-bottom: 1px solid #000000;
  margin: 0px;
}

/* TODO: file FF bug to support ::-moz-selection:window-inactive
   so we can override the opaque grey background when the window is inactive;
   see https://bugzilla.mozilla.org/show_bug.cgi?id=706209 */
::selection { background:rgba(0,0,255,0.3); }
::-moz-selection { background:rgba(0,0,255,0.3); }

#viewer {
  margin: 44px 0px 0px;
  padding: 8px 0px;
}

#sidebarView canvas:hover {
  background: #ff0;
  box-shadow: 0px 2px 10px #ff0;
  -moz-box-shadow: 0px 2px 10px #ff0;
  -webkit-box-shadow: 0px 2px 10px #ff0;
}

#pageWidthOption {
  border-top: 1px solid black;
}

#customScaleOption {
  display: none;
}

#errorWrapper {
  background: none repeat scroll 0 0 #FF5555;
  color: white;
  left: 0;
  position: fixed;
  right: 0;
  top: 30px;
  z-index: 1000;
  padding: 3px;
  font-size: 0.8em;
}

#errorMessageLeft {
  float: left;
}

#errorMessageRight {
  float: right;
}

#errorMoreInfo {
  background-color: #FFFFFF;
  color: black;
  padding: 3px;
  margin: 3px;
  width: 98%;
}

.clearBoth {
  clear: both;
}

/* === Printed media overrides === */
@media print {
  #sidebar {
    display: none;
  }

  #controls {
    display: none;
  }

  #viewer {
    margin: 0;
    padding: 0;
  }

  .page {
    display: none;
    margin: 0;
  }

  .page canvas {
    box-shadow: none;
    -moz-box-shadow: none;
    -webkit-box-shadow: none;
  }

  .page[data-loaded] {
    display: block;
    page-break-after: always;
  }
}

#loading {
  margin: 100px 0;
  text-align: center;
}

#PDFBug {
  font-size: 10px;
  position: fixed;
  top: 35px;
  bottom: 5px;
  right: 2px;
  width: 300px;
  background: white;
  border: 1px solid #666;
  padding: 0;
}
#PDFBug .controls {
  border-bottom: 1px solid #666;
  padding: 3px;
  background: -moz-linear-gradient(center bottom, #eee 0%, #fff 100%);
}
#PDFBug .panels {
  overflow: auto;
  position: absolute;
  top: 27px;
  left: 0;
  right: 0;
  bottom: 0;
}
#PDFBug button.active {
  font-weight: bold;
}
.debuggerShowText {
  background: yellow;
  color: blue;
  opacity: 0.3;
}
.debuggerHideText:hover {
  background: yellow;
  opacity: 0.3;
}