/* @group book reader */

body.template-book_reader_view {

  $reader-bg: #fafafa;
  $reader-border: #777;

  background: $body-background;

  /* Hide unused elements */
  #header,
  #portal-topactions,
  #portal-breadcrumbs,
  #bottom-actions,
  div#viewlet-below-content,
  #banner-image,
  div.row.belowContent,
  #ftw-footer {
    display: none;
  }

  /* remove max width */
  .fixedWidth {
    width: auto;
  }

  #page-wrapper {
    margin-top: 1.25em;
    background: transparent;
    @include boxshadow(none);
    border: none;
  }

  .book-reader {
    max-width: 1000px;
    width: 94%;
    margin: 0 auto;
    padding: 1em 2%;
    /* padding-left: 0; */
    background: $reader-bg;
    border: 1px solid $reader-border;
    @include boxshadow(0 0 1em #aaa);
    font-size: 125%;
    line-height: 1.5em;
    position: relative;
  }
  .book-reader-navigation {
    width: 15em;
    a {
      color: #000;
      font-size: 90%;
    }
  }

  .book-reader-content {
    background: $page-background;
    padding: 1em;
    @include boxshadow(0 0 0.25em $reader-border);
  }

  #content .book-reader-navigation a:hover {
    text-decoration: underline;
  }
  #content .book-reader-navigation a.active {
    color: #000;
    text-decoration: underline;
  }
  #content .book-reader-navigation ul {
    margin-left: 1.25em;
    &.book-reader-navigation-0 {
      margin-left: 0;
    }
  }

  #content #close-book-reader {
    display: block;
    position: absolute;
    top: -1em;
    right: -1em;
    text-indent: -1000em;
    background: url(%THEME_URL%/images/pb_close.png) no-repeat center center;
    width: 2em;
    height: 2em;
  }

  #content {
    ul.book-reader-navigation-0 > li > a {
      font-weight: bold;
      font-size: 1.25em;
    }
    ul.book-reader-navigation-1 {
      margin-left: 0;
    }
    .book-reader-navigation a {
      font-weight: normal;
    }
  }

}

/* @end */

/* @group responsive book reader */

@media screen and (max-width: $screen-tablet) {
  body.template-book_reader_view {
    #page-wrapper {
      margin-top: 0.5em;
    }
    .book-reader {
      background: none;
      border: none;
      @include boxshadow(none);
      padding: 0;
      margin: 0;
      width: 100%;
    }
    .book-reader-navigation {
      display: none;
    }
    #content #close-book-reader {
      right: 0;
      top: 0;
      background: none;
      text-indent: 0;
      width: auto;
      height: auto;
      position: relative;
      text-align: center;
    }
  }
}


/* @end */