/*
==================================================================
    File Name: Screen SCSS
==================================================================
*/

html, body {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
}

body {
  background-color: #fff;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

*, *:before, *:after {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}

#mainWrap {
  position: relative;
  height: 100%;
}



/*
-------------------------------------------------------------
      Standart Variables
-------------------------------------------------------------
*/

// fonts
$segoe: 'Segoe UI', 'Segoe_UI', Arial;
$segoe-semi: 'Segoe UI Semibold', 'Segoe_UI', Arial;
$segoe-light: 'Segoe UI Light', 'Segoe_UI', Arial;
$flexo: 'Flexo', 'Segoe UI', 'Segoe_UI', Arial;

// colors
$color-base: #46a5d2;




/*
-------------------------------------------------------------
      CSS Area: Bottom Wrap
-------------------------------------------------------------
*/
#boardWrap {
  position: relative;
  width: 100%;
  height: 100%;
  background: url(../img/bg2.png) repeat 0 0;
  padding: 52px 300px 47px 0;

  // Header
  .x-header {
    background: #358bcd url(../img/bg1.png) no-repeat 0 0;
    height: 52px;
    width: 100%;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 5;

    .book-title {
      font: 24px/52px $flexo;
      color: #ffffff;
      margin-left: 15px;
      float: left;
    }

    ul.fRight {
      margin-right: 18px;
      overflow: hidden;
      li {
        float: left;
        margin-left: 8px;
        &:first-child {
          margin-left: 0;
        }
        a {
          display: block;
          text-indent: -9999px;
          background: url(../img/icon1.png) no-repeat;
          width: 38px;
          height: 45px;
          @include opacity(25);
          @include button(100);
          &:hover { @include opacity(70); }
        }
        &.icon-help {
          a {
            background: url(../img/icon2.png) no-repeat;
          }
        }
        &.icon-close {
          a {
            background: url(../img/icon3.png) no-repeat;
          }
        }
      }
    }
  }

  // Sidebar
  .x-sidebar {
    width: 305px;
    height: 100%;
    background-color: #e6e6e6;
    padding-top: 52px;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 4;

    .sidebar-inner {
      height: 100%;
    }

    .responsive-toggle {
      display: block;
      width: 37px;
      height: 46px;
      background-color: $color-base;
      @include radius(5px 0 0 5px);
      position: absolute;
      text-indent: -9999px;
      z-index: 10;
      top: 70px;
      left: -9999px;
      &:hover {
        background-color: #358bcd;
      }
      i {
        display: block;
        background: url(../img/icon16.png) no-repeat;
        width: 19px;
        height: 19px;
        position: absolute;
        left: 9px;
        top: 50%;
        margin-top: -10px;
        z-index: 2;
      }
      &.active {
        i {
          background-position: 0 -19px;
        }
      }
    }

    .g-tab {
      height: 100%;
      position: relative;
      padding-top: 60px;
      padding-bottom: 47px;
    }

    .buttons {
      background-color: #fff;
      width: 100%;
      height: 60px;
      position: absolute;
      left: 0;
      top: 0;
      z-index: 3;
      ul {
        overflow: hidden;
        li {
          float: left;
          a {
            display: block;
            position: relative;
            width: 50px;
            height: 60px;
            text-indent: -9999px;
            @include button(80);
            i {
              display: block;
              position: absolute;
              text-indent: -9999px;
              z-index: 2;
              left: 50%;
              top: 50%;
              &.icon-topics {
                background: url(../img/icon4.png) no-repeat 0 0;
                width: 25px;
                height: 25px;
                margin: -12.5px 0 0 -12.5px;
              }
              &.icon-pages {
                background: url(../img/icon5.png) no-repeat 0 0;
                width: 29px;
                height: 24px;
                margin: -11.5px 0 0 -12px;
              }
              &.icon-notes {
                background: url(../img/icon6.png) no-repeat 0 0;
                width: 25px;
                height: 26px;
                margin: -12.5px 0 0 -13px;
              }
              &.icon-search {
                background: url(../img/icon7.png) no-repeat 0 0;
                width: 23px;
                height: 23px;
                margin: -11.5px 0 0 -11.5px;
              }
              &.icon-favorite {
                background: url(../img/icon8.png) no-repeat 0 0;
                width: 24px;
                height: 22px;
                margin: -12px 0 0 -11px;
              }
              &.icon-bookmarks {
                background: url(../img/icon9.png) no-repeat 0 0;
                width: 25px;
                height: 23px;
                margin: -12.5px 0 0 -11.5px;
              }
            }
          }
          &:nth-child(even){
            a {
              background-color: #e6e6e6;
            }
          }
          &.active {
            a {
              @include opacity(100);
              background-color: $color-base;
              i {
                &.icon-topics {
                  background-position: 0 -25px;
                }
                &.icon-pages {
                  background-position: 0 -24px;
                }
                &.icon-notes {
                  background-position: 0 -26px;
                }
                &.icon-search {
                  background-position: 0 -23px;
                }
                &.icon-favorite {
                  background-position: 0 -22px;
                }
                &.icon-bookmarks {
                  background-position: 0 -23px;
                }
              }
            }
          }

        }
      }
    }

    .inner {
      height: 100%;
      .inner-item {
        display: none;
        height: 100%;
        position: relative;
        padding-top: 57px;
      }

      .i-title {
        width: 100%;
        height: 57px;
        position: absolute;
        left: 0;
        top: 0;
        background-color: $color-base;
        font: 20px/56px $flexo;
        color: #ffffff;
        padding-left: 18px;
        &.input-padding {
          padding: 6px;
        }

        .input {
          height: 45px;
          width: 100%;
          position: relative;

          .tb {
            width: 100%;
            height: 100%;
            @include radius(3px);
            @include input();
            padding: 0 86px 0 15px;
            font: 15px $flexo;
            color: #868686;
            background-color: #ffffff;
            float: left;
            &:focus {
              color: #555;
            }
          }

          .btn {
            width: 71px;
            height: 45px;
            text-align: center;
            background-color: #e6e6e6;
            font: bold 13px/44px $flexo;
            color: #50555d;
            @include radius(0 3px 3px 0);
            @include button(100);
            position: absolute;
            right: 0;
            top: 0;
            z-index: 2;
            &:hover {
              background-color: #ddd;
            }
          }

          &.search {
            .tb {
              padding-right: 51px;
            }
            .btn {
              width: 36px;
              height: 45px;
              background: url(../img/icon13.png) no-repeat 0 50%;
              @include radius(0);
              text-indent: -9999px;
              -webkit-box-shadow: inherit;
              -moz-box-shadow: inherit;
              -ms-box-shadow: inherit;
              -o-box-shadow: inherit;
              box-shadow: inherit;
              &:hover {
                @include opacity(80);
              }
            }
          }
        }
      }
      .i-wrapper {
        padding: 12px 7px 12px 12px;
        height: 100%;
        .scrollbar {
          width: 100%;
          height: 100%;
          position: relative;
          overflow: hidden;
          padding-right: 15px;
          &.no-scroll {
            padding-right: 5px !important;
          }

          .ps-scrollbar-y-rail {
            right: 0;
            background-color: #fff;
          }
        }
      }

      // topics box
      .topics-box {
        .box {
          margin-bottom: 12px;
          background-color: #fff;
          padding: 19px 15px;
          &:last-child {
            margin-bottom: 0;
          }
          h6 {
            display: block;
            font: 20px/120% $flexo;
            color: #5a5e66;
            margin-bottom: 12px;
          }
          ul {
            margin-left: 12px;
            li {
              margin-bottom: 20px;
              &:last-child {
                margin-bottom: 0;
              }

              a {
                font: 15px/120% $flexo;
                color: #5a5e66;
                position: relative;
                padding-left: 11px;
                &:before {
                  content: '';
                  background: url(../img/icon10.png) no-repeat;
                  width: 3px;
                  height: 6px;
                  position: absolute;
                  left: 0;
                  top: 7px;
                }
                &:hover {
                  color: #3686b7;
                  &:before {
                    background-position: 0 -6px;
                  }
                }
              }
            }
          }
        }
      }

      // pages box
      .pages-box {
        padding: 0 30px;
        ul {
          li {
            margin-bottom: 16px;
            a {
              display: block;
              font-size: 0;
              .p-image {
                display: block;
                position: relative;
                font-size: 0;
                &:before {
                  content: '';
                  background-color: #000;
                  @include opacity(0);
                  position: absolute;
                  left: 0;
                  top: 0;
                  right: 0;
                  bottom: 0;
                  @include trans(.15);
                  z-index: 2;
                }
                &:after {
                  content: '';
                  background: url(../img/icon11.png) no-repeat;
                  width: 48px;
                  height: 48px;
                  left: 50%;
                  margin-left: -24px;
                  margin-top: -24px;
                  position: absolute;
                  top: 0;
                  @include trans(.3);
                  @include opacity(0);
                  z-index: 3;
                }
                img {
                  width: 100%;
                  border: 3px solid transparent;
                }
              }
              .p-number {
                display: block;
                text-align: center;
                font: 16px/120% $flexo;
                color: #50555d;
                padding-top: 8px;
              }
              &:hover {
                .p-image {
                  img {
                    border-color: #ccc;
                  }
                }
                .p-number {
                  color: #000;
                  text-decoration: underline;
                }
              }
            }
            &.active {
              a {
                .p-image {
                  img {
                    border-color: $color-base
                  }
                }
              }
            }
          }
        }
      }

      // result box
      .result-box {
        ul {
          li {
            margin-bottom: 9px;
            position: relative;
            background-color: #fff;
            padding: 15px;
            cursor: default;
            &:last-child {
              margin-bottom: 0;
            }
            &:hover {
              @include shadow(0 1px 2px rgba(#000, .15));
            }
            h6 {
              display: block;
              font: 15px/120% $flexo;
              color: #868686;
              margin-bottom: 9px;
            }
            p {
              display: block;
              font: 13px/120% $flexo;
              color: #bbb;
            }

            .btn-remove {
              display: block;
              width: 23px;
              height: 22px;
              background: #ff969a url(../img/icon12.png) no-repeat 50% 50%;
              text-indent: -9999px;
              position: absolute;
              right: 0;
              top: 0;
              @include button(90);
            }

          }
        }
      }

    }

    .bottom {
      width: 100%;
      height: 47px;
      background: #ddd url(../img/bg3.png) repeat-x 0 0;
      position: absolute;
      left: 0;
      bottom: 0;
      z-index: 15;

      .page-number {
        width: 140px;
        height: 47px;
        display: block;
        float: left;
        text-align: center;
        font: 21px/50px $flexo;
        color: #5b6470;
      }

      .page-percent {
        height: 47px;
        display: block;
        float: left;
        margin-left: 15px;
        font: 15px/50px $flexo;
        color: #5b6470;
      }

      .page-loader {
        width: 89px;
        height: 8px;
        float: left;
        position: relative;
        margin-top: 21px;
        background-color: #fff;
        @include radius(3px);
        overflow: hidden;

        span {
          display: block;
          width: 0;
          height: 8px;
          background-color: #7ed464;
          @include radius(3px 0 0 3px);
          text-indent: -9999px;
          position: absolute;
          left: 0;
          top: 0;
          @include trans(.3);
        }
      }
    }

  }

  // Footer
  .x-footer {
    height: 47px;
    width: 100%;
    position: absolute;
    left: 0;
    bottom: 0;
    z-index: 2;
    padding-right: 300px;
    background: #2b2e32 url(../img/bg4.png) repeat-x 0 0;
    font-size: 0;
    text-align: center;

    span.text {
      float: left;
      font: 15px/45px $flexo;
      color: #d0d0d1;
      margin-left: 15px;
      position: absolute;
      left: 0;
      top: 0;
    }

    .pagination {
      background: url(../img/bg5.png) no-repeat 0 0;
      width: 180px;
      height: 39px;
      margin-top: 4px;
      @extend .i-block;
      padding: 0 7px 0 14px;

      .pag-number {
        float: left;
        font: bold 14px/38px $flexo;
        color: #ffffff;
      }

      .g-sb {
        margin: 6px auto 0 auto;
        background: url(../img/bg6.png) no-repeat;
        width: 65px;
        height: 27px;
        font: bold 14px/27px $flexo;
        color: #50555d;
        @include radius(25px);
        @include button(90);

        .customSelect {
          display: block;
          width: 100%;
          height: 27px;
          padding-right: 23px;
          text-align: center;
        }

        select {
          width: 65px !important;
          cursor: pointer;
          font-family: Arial, sans-serif;
        }
      }
    }

  }

  // Container
  .x-container {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    padding: 18px 15px;
    -webkit-overflow-scrolling: touch;
    -moz-overflow-scrolling: touch;
    -ms-overflow-scrolling: touch;
    -o-overflow-scrolling: touch;
    overflow-scrolling: touch;

    .nano {
      width: 100%;
      height: 100%;
      position: relative;
      z-index: 10;
      overflow: hidden;
      padding-right: 25px;


      .nano-pane {
        background-color: #fff;
      }
      .nano-slider {
        background-color: $color-base;
        @include shadow(0 0 4px rgba(#000, .36) inset);
      }

      .iframe {
        width: 750px;
        height: 1000px;
        position: relative;
        z-index: 3;
        margin: 0 auto;
        -webkit-overflow-scrolling: touch;
      }
    }

    .controller {
      display: block;
      text-indent: -9999px;
      width: 58px;
      height: 167px;
      position: absolute;
      z-index: 15;
      top: 50%;
      margin-top: -83px;
      @include opacity(80);

      &:hover {
        @include opacity(100);
      }

      &.prev-page {
        background: url(../img/icon14.png) no-repeat;
        left: 50%;
        margin-left: -493px;
      }
      &.next-page {
        background: url(../img/icon15.png) no-repeat;
        right: 50%;
        margin-right: -468px;
      }
    }

  }
}