/* Copyright 2014 Mozilla Foundation
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software.pdfAnnotationStampList .pdfAnnotationStampItem
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

.textLayer {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  opacity: 0.2;
  line-height: 1.0;
}

.textLayer > div {
  color: transparent;
  position: absolute;
  white-space: pre;
  cursor: text;
  -webkit-transform-origin: 0% 0%;
  -moz-transform-origin: 0% 0%;
  -o-transform-origin: 0% 0%;
  -ms-transform-origin: 0% 0%;
  transform-origin: 0% 0%;
}

.textLayer .highlight {
  margin: -1px;
  padding: 1px;

  background-color: rgb(180, 0, 170);
  border-radius: 4px;
}

.textLayer .highlight.begin {
  border-radius: 4px 0px 0px 4px;
}

.textLayer .highlight.end {
  border-radius: 0px 4px 4px 0px;
}

.textLayer .highlight.middle {
  border-radius: 0px;
}

.textLayer .highlight.selected {
  background-color: rgb(0, 100, 0);
}

.textLayer ::selection { background: rgb(0,0,255); }
.textLayer ::-moz-selection { background: rgb(0,0,255); }

.textLayer .endOfContent {
  display: block;
  position: absolute;
  left: 0px;
  top: 100%;
  right: 0px;
  bottom: 0px;
  z-index: -1;
  cursor: default;
  -webkit-user-select: none;
  -ms-user-select: none;
  -moz-user-select: none;
}

.textLayer .endOfContent.active {
  top: 0px;
}


.annotationLayer section {
  position: absolute;
}

.annotationLayer .linkAnnotation > a,
.annotationLayer .buttonWidgetAnnotation.pushButton > a {
  position: absolute;
  font-size: 1em;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.annotationLayer .linkAnnotation > a:hover,
.annotationLayer .buttonWidgetAnnotation.pushButton > a:hover {
  opacity: 0.2;
  background: #ff0;
  box-shadow: 0px 2px 10px #ff0;
}

.annotationLayer .textAnnotation img {
  position: absolute;
  cursor: pointer;
}

.annotationLayer .textWidgetAnnotation input,
.annotationLayer .textWidgetAnnotation textarea,
.annotationLayer .choiceWidgetAnnotation select,
.annotationLayer .buttonWidgetAnnotation.checkBox input,
.annotationLayer .buttonWidgetAnnotation.radioButton input {
  background-color: rgba(0, 54, 255, 0.13);
  border: 1px solid transparent;
  box-sizing: border-box;
  font-size: 9px;
  height: 100%;
  margin: 0;
  padding: 0 3px;
  vertical-align: top;
  width: 100%;
}

.annotationLayer .choiceWidgetAnnotation select option {
  padding: 0;
}

.annotationLayer .buttonWidgetAnnotation.radioButton input {
  border-radius: 50%;
}

.annotationLayer .textWidgetAnnotation textarea {
  font: message-box;
  font-size: 9px;
  resize: none;
}

.annotationLayer .textWidgetAnnotation input[disabled],
.annotationLayer .textWidgetAnnotation textarea[disabled],
.annotationLayer .choiceWidgetAnnotation select[disabled],
.annotationLayer .buttonWidgetAnnotation.checkBox input[disabled],
.annotationLayer .buttonWidgetAnnotation.radioButton input[disabled] {
  background: none;
  border: 1px solid transparent;
  cursor: not-allowed;
}

.annotationLayer .textWidgetAnnotation input:hover,
.annotationLayer .textWidgetAnnotation textarea:hover,
.annotationLayer .choiceWidgetAnnotation select:hover,
.annotationLayer .buttonWidgetAnnotation.checkBox input:hover,
.annotationLayer .buttonWidgetAnnotation.radioButton input:hover {
  border: 1px solid #000;
}

.annotationLayer .textWidgetAnnotation input:focus,
.annotationLayer .textWidgetAnnotation textarea:focus,
.annotationLayer .choiceWidgetAnnotation select:focus {
  background: none;
  border: 1px solid transparent;
}

.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,
.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after,
.annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before {
  background-color: #000;
  content: '';
  display: block;
  position: absolute;
}

.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,
.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after {
  height: 80%;
  left: 45%;
  width: 1px;
}

.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before {
  transform: rotate(45deg);
}

.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after {
  transform: rotate(-45deg);
}

.annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before {
  border-radius: 50%;
  height: 50%;
  left: 30%;
  top: 20%;
  width: 50%;
}

.annotationLayer .textWidgetAnnotation input.comb {
  font-family: monospace;
  padding-left: 2px;
  padding-right: 0;
}

.annotationLayer .textWidgetAnnotation input.comb:focus {
  /*
   * Letter spacing is placed on the right side of each character. Hence, the
   * letter spacing of the last character may be placed outside the visible
   * area, causing horizontal scrolling. We avoid this by extending the width
   * when the element has focus and revert this when it loses focus.
   */
  width: 115%;
}

.annotationLayer .buttonWidgetAnnotation.checkBox input,
.annotationLayer .buttonWidgetAnnotation.radioButton input {
  -webkit-appearance: none;
  -moz-appearance: none;
  -ms-appearance: none;
  appearance: none;
  padding: 0;
}

.annotationLayer .popupWrapper {
  position: absolute;
  width: 20em;
}

.annotationLayer .popup {
  position: absolute;
  z-index: 200;
  max-width: 20em;
  background-color: #FFFF99;
  box-shadow: 0px 2px 5px #333;
  border-radius: 2px;
  padding: 0.6em;
  margin-left: 5px;
  cursor: pointer;
  font: message-box;
  word-wrap: break-word;
}

.annotationLayer .popup h1 {
  font-size: 1em;
  border-bottom: 1px solid #000000;
  margin: 0;
  padding-bottom: 0.2em;
}

.annotationLayer .popup p {
  margin: 0;
  padding-top: 0.2em;
}

.annotationLayer .highlightAnnotation,
.annotationLayer .underlineAnnotation,
.annotationLayer .squigglyAnnotation,
.annotationLayer .strikeoutAnnotation,
.annotationLayer .lineAnnotation svg line,
.annotationLayer .squareAnnotation svg rect,
.annotationLayer .circleAnnotation svg ellipse,
.annotationLayer .polylineAnnotation svg polyline,
.annotationLayer .polygonAnnotation svg polygon,
.annotationLayer .stampAnnotation,
.annotationLayer .fileAttachmentAnnotation {
  cursor: pointer;
}

.pdfViewer .canvasWrapper {
  overflow: hidden;
}

.pdfViewer .page {
  direction: ltr;
  width: 816px;
  height: 1056px;
  margin: 1px auto -8px auto;
  position: relative;
  overflow: visible;
  border: 9px solid transparent;
  background-clip: content-box;
  border-image: url(images/shadow.png) 9 9 repeat;
  background-color: white;
}

.pdfViewer.removePageBorders .page {
  margin: 0px auto 10px auto;
  border: none;
}

.pdfViewer.singlePageView {
  display: inline-block;
}

.pdfViewer.singlePageView .page {
  margin: 0;
  border: none;
}

.pdfViewer .page canvas {
  margin: 0;
  display: block;
}

.pdfViewer .page canvas[hidden] {
  display: none;
}

.pdfViewer .page .loadingIcon {
  position: absolute;
  display: block;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background: url('images/loading-icon.gif') center no-repeat;
}

.pdfPresentationMode:-webkit-full-screen .pdfViewer .page {
  margin-bottom: 100%;
  border: 0;
}

.pdfPresentationMode:-moz-full-screen .pdfViewer .page {
  margin-bottom: 100%;
  border: 0;
}

.pdfPresentationMode:-ms-fullscreen .pdfViewer .page {
  margin-bottom: 100% !important;
  border: 0;
}

.pdfPresentationMode:fullscreen .pdfViewer .page {
  margin-bottom: 100%;
  border: 0;
}

.pdfViewerContainer {
  overflow: auto;
  position: relative;
  width: auto;
  max-width: 100%;
  max-height: 100%;
}


@media print {
  /* General rules for printing. */
  body {
    /*background: transparent none;*/
    background: #008CBA none;
  }

  /* Rules for browsers that don't support mozPrintCallback. */
  #sidebarContainer, #secondaryToolbar, .toolbar, #loadingBox, #errorWrapper, .textLayer {
    display: none;
  }
  .pdfViewerContainer {
    overflow: visible;
    background-color: #008CBA;
  }

  #mainContainer, .pdfViewerContainer, .page, .page canvas {
    position: static;
    padding: 0;
    margin: 0;
  }

  .page {
    float: left;
    display: none;
    border: none;
    box-shadow: none;
    background-clip: content-box;
    background-color: white;
  }

  .page[data-loaded] {
    display: block;
  }

  .fileInput {
    display: none;
  }

  /* Rules for browsers that support PDF.js printing */
  body[data-pdfjsprinting] > div:not(.pdfViewerPrintContainer) {
    display: none;
  }
  body[data-pdfjsprinting] > .pdfViewerPrintContainer {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    padding: 0;
    margin: 0;
    z-index: 100000;
  }
  /*.pdfViewerPrintContainer {*/
  /*height: auto;*/
  /*width: auto;*/
  /*}*/
  /* wrapper around (scaled) print canvas elements */
  .pdfViewerPrintContainer > div {
    position: relative;
    top: 0;
    left: 0;
    min-width: 1px;
    min-height: 1px;
    width: 100%;
    height: auto;
    overflow: visible;
    page-break-after: always;
    page-break-inside: avoid;
  }
  .pdfViewerPrintContainer > div > img {
    position: relative;
    text-align: center;
    vertical-align: middle;
  }
  .pdfViewerPrintContainer canvas,
  .pdfViewerPrintContainer img {
    display: block;
  }
}

@page {
  margin:0;
  padding:0;
}


.lm_content .printServiceOverlay,
.modal-body .printServiceOverlay {
  vertical-align: middle;
  text-align: center;
  position: absolute;
  top: 0px;
  left: 0px;
  width: 100%;
  height: 100%;
  background-color: rgba(59, 59, 59, 0.8);
  display: none;
  padding: 8px;
  z-index: 2000;
}
.lm_content .printServiceOverlay .printDialog,
.modal-body .printServiceOverlay .printDialog {
  min-width: 200px;
  max-width: 600px;
  width: 75%;
  margin-left: 50%;
  transform: translateX(-50%);
  position: relative;
  padding: 20px;
  height: auto;
  border-top: none;
  background-color: #FFFFFF;
}


.grab-to-pan-grab {
  cursor: move;
}

/*.document-viewer-panel {
  position: relative;
  display: block;
}
.document-viewer-panel .pdfViewerContainer,
.document-viewer-panel .panel-toolbar {
  position: absolute;
  display: block;
}

.document-viewer-panel.top .panel-toolbar,
.document-viewer-panel.bottom .panel-toolbar {
  max-width: 100%;
  height: 35px;
  max-height: 35px;
}
.document-viewer-panel.left .panel-toolbar,
.document-viewer-panel.right .panel-toolbar {
  width: 35px;
  max-width: 35px;
  max-height: 100%;
}

.document-viewer-panel.top .pdfViewerContainer,
.document-viewer-panel.bottom .pdfViewerContainer {
  width: 100%;
  max-width: 100%;
}
.document-viewer-panel.right .pdfViewerContainer,
.document-viewer-panel.left .pdfViewerContainer {
  height: 100%;
  max-height: 100%;
}*/

/*.document-viewer-panel .pdfViewerContainer,
.document-viewer-panel .panel-toolbar {
  position: absolute;
  display: block;
}*/

/*.document-viewer-panel {
  position: relative;
}
.document-viewer-panel .pdfViewerContainer,
.document-viewer-panel .panel-toolbar {
  position: absolute;
  display: block;
}

.document-viewer-panel.top-panel-toolbar .panel-toolbar,
.document-viewer-panel.bottom-panel-toolbar .panel-toolbar {
  width: 100%;
  max-height: 35px;
  left: 0px;
}
.document-viewer-panel.left-panel-toolbar .panel-toolbar,
.document-viewer-panel.right-panel-toolbar .panel-toolbar {
  max-width: 35px;
  height: 100%;
  top: 0px;
}

.document-viewer-panel.bottom-panel-toolbar .panel-toolbar {
  bottom: 0px;
}
.document-viewer-panel.right-panel-toolbar .panel-toolbar {
  right: 0px;
}


.document-viewer-panel.top-panel-toolbar .pdfViewerContainer,
.document-viewer-panel.bottom-panel-toolbar .pdfViewerContainer {
  height: auto;
  max-height: 100%;
  width: auto;
  max-width: 100%;
}
.document-viewer-panel.right-panel-toolbar .pdfViewerContainer,
.document-viewer-panel.left-panel-toolbar .pdfViewerContainer {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
}
.document-viewer-panel.top-panel-toolbar .pdfViewerContainer {
  top: 35px;
}
.document-viewer-panel.right-panel-toolbar .pdfViewerContainer {
  right: 35px;
}
.document-viewer-panel.bottom-panel-toolbar .pdfViewerContainer {
  bottom: 35px;
}
.document-viewer-panel.left-panel-toolbar .pdfViewerContainer {
  left: 35px;
}*/




.document-viewer-panel .panel-toolbar ul > li .pdfPageNumber,
.document-viewer-panel .panel-toolbar ul > li .fontSize {
  max-width: 80px;
  width: auto;
}
.document-viewer-panel .panel-toolbar ul > li .pdfNbPages {
  max-width: 48px;
  width: auto;
}

.document-viewer-panel .panel-toolbar ul > li.hidden {
  display: none;
}


.document-viewer-panel .panel-toolbar ul > li.is-active:first-child {
  margin-left: 5px;
}
.document-viewer-panel .panel-toolbar ul > li.is-active:first-child {
  margin-left: 5px;
}
.document-viewer-panel .panel-toolbar ul > li.is-inactive,
ul.dropdown-menu > li.is-inactive {
  display: none !important;
}
.document-viewer-panel .panel-toolbar > ul > li.dropdown-toolbar:not(.open) > ul,
.document-viewer-panel .panel-toolbar > div > ul > li.dropdown-toolbar:not(.open) > ul {
  display: none;
}

.document-viewer-panel .panel-toolbar > ul > li.dropdown-toolbar > ul.dropdown-menu > li {
  position: relative;
  margin: 0;
  height: auto;
  min-height: 25px;
  width: auto;
  min-width: 100%;
  white-space: normal;
}

.document-viewer-panel .panel-toolbar > ul > li.dropdown-toolbar > ul.dropdown-menu > li > button.btn {
  width: 100%;
  text-align: left;
}
.document-viewer-panel .panel-toolbar > ul > li.dropdown-toolbar > ul.dropdown-menu > li > button.btn > i {
  margin-right: 8px;
}


/*.document-viewer-panel .pdfAnnotationStampList {
  display: none;
}*/
.document-viewer-panel .pdfAnnotationStampList {
  height: 200px;
  max-height: 200px;
  overflow-x: hidden;
}

.pdfAnnotationStampList .pdfAnnotationStampItem {
  height: 50px;
}
.pdfAnnotationStampSpinner {
  text-align: center;
}

.pdfAnnotationStampList li {
  height: 50px;
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
  margin-bottom: 4px;
}

.pdfAnnotationStampList .fa {
  font-size: 48px;
  height: 50px;
}

.pdfAnnotationStampList .glyphicon {
  font-size: 46px;
  height: 42px;
}

/** overwrite styles from iconmoon/styles.css  - START **/
.pdfAnnotationStampList [class^="icon-"] {
  font-size: 48px;
  height: 50px;
}

.document-viewer-panel .pdfAnnotationDigitalSignatureList {
  max-height: 200px;
  overflow-x: hidden;
}

/* http://www.w3schools.com/howto/tryit.asp?filename=tryhow_css_js_dropDown */
.dropDownButton {
  position: relative;
  display: inline-block;
}

.dropDownButton ul * {
  color: #cccccc !important;
  font-size: 12px;
  vertical-align: middle;
}

.dropDownButton-content {
  display: none;
  position: absolute;
  background-color: #404040;
  min-width: 140px;
  list-style: none;
  padding: 0;
  margin: 0;
  overflow: auto;
  box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
  text-align: left;
}

.dropDownButton-content li {
  width: 100%;
}

/* For stamp/images that do not have a delete button beside it. */
.dropDownButton-content li > a:first-child:nth-last-child(1) {
  display: inline-block;
  padding: 15px;
}

.dropDownButton-content li > a:first-child:nth-last-child(2) {
  display: inline-block;
  padding: 15px;
}

.dropDownButton a {
  color: black;
  text-decoration: none;
}

.dropDownButton li:hover {
  background-color: hsla(0, 0%, 0%, .7);
}






.select2-results > .select2-results__options {
  padding-bottom: 4px;
  max-height: 250px;
}
.select2-search--hide + .select2-results > .select2-results__options {
  padding-top: 4px;
}
.select2-results:first-child > .select2-results__options {
  padding-top: 4px;
}
.select2-results__option {
  padding: 4px 12px;
}


.canvasWrapper .freeText {
  z-index: 1010;
  pointer-events: none;
}


/*TODO : remove the following style when annotations icons will be OK*/
/*.toolbarAnnotations > div > ul > li > button > img {*/
/*filter: brightness(0.3);*/
/*}*/

.saturate { filter: saturate(3); }
.grayscale { filter: grayscale(100%); }
.contrast { filter: contrast(160%); }
.brightness { filter: brightness(0.25); }
.blur { filter: blur(3px); }
.invert { filter: invert(100%); }
.sepia { filter: sepia(100%); }
.huerotate { filter: hue-rotate(180deg); }
.rss.opacity { filter: opacity(50%); }