// Nav book
//
// Styles for table of contents as provided bij the social_book module. Menu items have triangle icons indicating whether there are menu items below this item or not.
// The highlighted path leads to the page title the user is currently viewing.
//
// markup: nav-book.twig
//
// Weight: 4
//
// Style guide: molecules.navigation.nav-book


@import 'settings';

.nav-book {
  padding: 0;

  .menu-item {
    list-style: none;
    padding-top: 3px;
    padding-bottom: 3px;
    clear: both;
    padding-left: 1.25rem;
    position: relative;

    &:before {
      content: '\25CB';
      position: absolute;
      left: 0;
    }

    &.menu-item--collapsed:before {
      content: '\25B8';
    }

  }

  .menu-item--expanded .menu {
    padding-left: 0;
  }

  .menu-item--expanded.menu-item--has-children:before {
    content: '\25BE';
  }

}

.navigation-book {
  padding: 0.5em 0;
  font-size: $font-size-small;

  a:hover {
    text-decoration: underline;
  }

  .page-links {
    text-align: center;
    font-size: $font-size-small;
  }
}

.navigation-book .pager__item {
  display: block;
  position: relative;

  @include for-tablet-portrait-up {
    max-width: 50%;
    display: inline-block;
  }

  span {
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .icon-inline {
    margin-top: 6px;
    position: absolute;
    top: 0;

    & + span {
      line-height: 24px;
    }
  }

}

.navigation-book .pager__item--previous {
  text-align: left;
  margin-bottom: 5px;

  @include for-tablet-portrait-up {
    margin-bottom: 0px;
    float: left;
  }

  span {
    padding-left: 24px;
  }

  .icon-inline {
    left: 0;
    margin-left: 12px;
  }

}

.navigation-book .pager__item--next {
  text-align: right;
  margin-left: 0px;

  @include for-tablet-portrait-up {
    float: right;
  }

  span {
    padding-right: 24px;
  }

  .icon-inline {
    right: 0;
    margin-right: 12px;
  }

}

#book-outline {
  min-width: 56em;
}

.book-outline-form .form-item {
  margin-top: 0;
  margin-bottom: 0;
}

html.js #edit-book-pick-book {
  display: none;
}

.form-item-book-bid .description {
  clear: both;
}

#book-admin-edit select {
  margin-right: 24px;
}

#book-admin-edit select.progress-disabled {
  margin-right: 0;
}

#book-admin-edit tr.ajax-new-content {
  background-color: #ffd;
}

#book-admin-edit .form-item {
  float: left;
}
