/* TODO body-level declarations should only be on stream page */
body, html {
  height: 100%;
  margin: 0;
  padding: 0;
}
body.br-ui-embed {
  background-color: transparent;
}

.BookReader {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}
/* Using position fixed, requires a full-screen to book reader.
 * Still not sure if we want to assume always full screen.  */
body.br-ui-embed .BRcontainer {
  position: relative;
  width: 100%;
  height: 100%;
}

#IABookReaderWrapper,
.IABookReaderWrapper {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0.1px 0 0 0;
  overflow:hidden;
}
#IABookReaderMessageWrapper,
.IABookReaderMessageWrapper {
  /* inline-block is a hack to prevent margin collapsing */
  display:inline-block;
  width: 100%;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.428571429;
}
#BookReaderOverlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  background: rgba(0, 0, 0, .4);
}
#BRbookcover,
.BRbookcover {
    background-image: none;
}
.BookReaderMessage {
  text-align: center;
  color: white;
  background: #222;
  padding: 5px;
}
.BookReaderMessageHead {
  margin-right: 10px;
  margin-top: 1px;
  font-size: 1.3em;
  font-weight: 700;
  display: inline-block;
  vertical-align: middle;
}
.BookReaderMessageBody {
  display: inline-block;
}
.BookReaderMessageFoot {
  margin: 4px 0;
}

.BookReaderMessage .BRaction,
.BookReaderMessage .btn-purchase {
  min-width: 100px;
}

.BookReaderMessage button,
.BookReaderMessage .btn-purchase {
  font-size: 1.1em;
  margin: 0 2px;
  margin: 3px 4px 0 4px;
}
.BookReaderMessage .btn-dark {
  color: #fff;
  background-color: #333;
  border-color: #979797;
}
.BookReaderMessage .btn-dark:hover,
.BookReaderMessage .btn-dark:active,
.BookReaderMessage .btn-dark:focus {
  color: #fff;
  background-color: #282828;
}

.BookReaderMessage .btn-purchase {
  padding-left: 35px;
  background-image: url('../../images/icons/better-world-books-white.svg');
  background-position: 5px 50%;
  background-size: 24px auto;
  background-repeat: no-repeat;
}

.BookReaderMessage .more-info-icon {
  margin-left: 1rem;
  font-size: 18px;
  color: #fff;
  text-decoration: none;
}

/* Dropdown styles */
.BookReaderMessage .dropdown-menu {
  border-color: #357ebd;
  background: #2d2d2d;
  z-index: 2001; /* .BookReader.fullscreenActive has z-index:2000 so need more than */
}

.BookReaderMessage .lending-action-group .lending-primary-action {
  margin-right: 0; /* keep caret dropdown button close to primary */
}

.BookReaderMessage .dropdown-option {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  color: #fff;
  cursor: pointer;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
.BookReaderMessage .dropdown-option:hover,
.BookReaderMessage .dropdown-option:focus {
  color: #171717;
  background: #fff;
}

.BookReader .muted {
  color: grey;
}
.BookReaderMessage .muted {
  color: #ccc;
}

.BRtoolbar .BRpill.download {
  background-image: url("../../bookreader/BookReader/images/icon_download.png");
  background-repeat: no-repeat;
  background-position: 8px center;
  background-size: 12px;
  padding-left: 30px;
}
.BRtoolbar .BRpill.return {
  background-image: url("../../bookreader/BookReader/images/icon_return.png");
  background-repeat: no-repeat;
  background-position: 8px center;
  background-size: 15px;
  padding-left: 30px;
}
.BRtoolbarSectionDownload,
.BRtoolbarSectionLending {
  text-align: center;
}

.BRnavCntlBtm.BRup, .BRnavCntlBtm.BRdn {
  display: none;
}

/* EXPERIMENT: removing the show/hide button */
/*
.BRnavCntlBtm {
  display: none;
}
.fullscreenActive .BRnavCntlBtm{
  display: block;
}
*/

/* Placeholder text */
.BookReaderPlaceholder {
  font-size: 16px;
  line-height: 22px;
  padding: 40px;
  text-align: center;
  width:100%;
  height:100%;
  background-color: white;
  box-sizing: border-box;
}
#br-loading-placeholder img,
.br-loading-placeholder img {
  margin-top: 20px;
}

@media (max-width: 400px) {
  .BookReaderMessageHead {
    margin: 0 0 0 5px;
    font-size: 1.2em;
  }
  .BookReaderMessage button {
    -webkit-appearance: initial;
    min-width:100px;
    padding: 8px;
    margin: 4px 4px 0 4px;
  }
  .BookReaderMessage button.dropdown-toggle {
    min-width: auto;
  }
}

/* mid size */
@media (max-width: 1050px) {
  .BRtoolbar .BRpill.download {
    padding-left: 0;
    background-position: 12px center;
    width: 40px;
  }
  .BRtoolbar .BRpill.return {
    padding-left: 0;
    background-position: 12px center;
    width: 40px;
  }
  .BRpill.download .BRpillInner, .BRpill.return .BRpillInner {
    display: none;
  }
}


/**** Lending styles ****/

.BRpagediv1up, .BRpageimage, .BRpagedivthumb {
  -moz-user-select: none;
  -webkit-user-select: none;
}

@media print {
  .BRpagediv1up, .BRpageimage, .BRpagedivthumb {
      display: none;
  }
}

.fieldset-share-pageview, .share-embed-prompt,
.fieldset-embed, .open-to-this-page {
  display: none !important;
}

.IABookReaderLoader {
  background-image: url('../../upload/images/tree/loading.gif');
  background-position: center center;
  background-repeat: no-repeat;
  display: inline-block;
  width: 16px;
  height: 16px;
  position: absolute;
  margin-top: 10px;
  margin-right: 14px;
  margin-left: 5px;
}

.IABookReaderMessageWrapper .IABookReaderLoader {
  margin-top: 11px;
  margin-right: 14px;
  margin-left: 8px;
}

.BRmobileMenu .IABookReaderLoader {
  margin-top: 0;
  margin-right: 0;
  margin-left: 5px;
}

.print-disability-link {
  background-image: url("../../bookreader/static/pd-daisy.svg");
  background-repeat: no-repeat;
  background-size: 2rem;
  background-position-y: .2rem;
  padding-left: 2.5rem;
  margin-left: 0.5rem;
  display: inline-block;
}

/* Until we have the download links on the details page, we still show toolbar option */
.BRlending #theatre-ia-wrap .BRtoolbarSectionLending,
.BRaccess #theatre-ia-wrap .BRtoolbarSectionLending,
.BRlending #theatre-ia-wrap .BRtoolbarSectionTitle,
.BRaccess #theatre-ia-wrap .BRtoolbarSectionTitle {
  display: inline;
}


/* Mobile Only */
@media (max-width: 600px) {
  .IABookReaderMessageWrapper .IABookReaderLoader {
    margin-top: 14px;
    margin-right: 14px;
    margin-left: 4px;
  }
}

/**** /stream/ page styles ******/

.BookReaderRoot .BRicon.full {
  display: none;
}
.BookReaderRoot .ui-embed .BRicon.full {
  display: inline;
}


/****** Details page styles *****/
/* note, !imporant is needed, because archive.css gets loaded AFTER this file. */
body.navia #theatre-ia > .row {
  max-width: 100% !important;
}
body.navia #theatre-ia-wrap {
  min-height: 100px !important;
}
#theatre-ia {
  padding: 0 !important;
}
#theatre-ia-wrap {
  padding: 0;
}

#BookReader {
  height: 75vh; /* keeps in-page title peeking from below */
}

#theatre-ia-wrap .BRtoolbarSectionInfo,
#theatre-ia-wrap .BRtoolbarSectionTitle,
#theatre-ia-wrap .BRtoolbarSectionLending,
#theatre-ia-wrap .BRtoolbarSectionDownload {
  display: none;
}
#theatre-ia-wrap .fullscreenActive .BRtoolbarSectionTitle {
  display: inline;
}

@media (max-width: 480px) {
  #BookReader {
    height: 100vw;
  }
}

/** Preview styles */
.BRpreview .BRtoolbar {
  padding: 0;
}

@media (min-width: 481px) {
  .BRpreview #BookReader {
    height: 64vh;
  }
}

@media (min-width: 801px) {
  #theatre-ia-wrap .BRpreview .fullscreenActive .BRtoolbar {
    padding: 10px 10px 4px 10px;
  }
}

.BookReaderThumbnail,
.BookReaderTextsIcon {
  position: absolute;
  top: 50%;
  left: 50%;
  height: 80%;
  transform: translate(-50%, -50%);
}

body.navia .container-ia .iconochive-texts.BookReaderTextsIcon {
  font-size: 200px;
  color: #333333;
}

body.navia .container-ia .iconochive-texts.BookReaderTextsIcon:before {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Fullscreen mode styles */
.internal-beta #BookReader.fullscreenActive {
  height: 100vh;
}
.internal-beta #BookReader.fullscreenActive .BRfooter {
  position: absolute;
}

#BookReader.fullscreenActive {
  height: 100%;
}

.BRfullscreenActive .ia-banners {
  display: none;
}

.BRfullscreenActive #IABookReaderWrapper {
  position: fixed;
  z-index: 1;
  height: 100%;
}

.BRfullscreenActive #BookReader {
  position: relative;
}

#BookReader.fullscreenActive .BRfooter {
  position: fixed;
}

.BRfullscreenActive .BookReaderMessageFoot,
.BRfullscreenActive .BookReaderMessageFoot > div {
  display: inline;
}

.BRfullscreenActive .print-disability-link {
  text-indent: -8695px;
  vertical-align: middle;
}