/* Restrict styles to only elements within .block-book-navigation */
.block-book-navigation ul, 
.block-book-navigation ul ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.block-book-navigation li {
  font-size: 18px; /* Main publication size */
  font-weight: bold;
  margin-bottom: 10px; /* Space between main publications */
}

.block-book-navigation li > a {
  text-decoration: none;
  color: #333;
  display: block;
  padding: 5px 0;
  transition: color 0.3s;
}

.block-book-navigation li > a:hover {
  color: #555;
}

.node__content .cta {
    margin-right: 0px;
}

/* Style for first-level chapters (direct children of ul) */
.block-book-navigation ul > li > ul {
  margin-left: 20px; /* Indent for sub-levels */
  border-left: 2px solid #ddd; /* Line to visually show hierarchy */
  padding-left: 15px; /* Space for the text after the border */
}

.block-book-navigation ul > li > ul > li {
  font-size: 16px;
  font-weight: normal;
  margin-bottom: 8px; /* Space between chapters */
}

.block-book-navigation ul > li > ul > li > a {
  text-decoration: none;
  color: #555;
  display: block;
  padding: 3px 0;
  transition: color 0.3s;
}

.block-book-navigation ul > li > ul > li > a:hover {
  color: #777;
}

/* Style for deeper sub-chapters (e.g., Chapter 1.1, 1.2) */
.block-book-navigation ul ul ul {
  margin-left: 20px;
  border-left: 2px dashed #ccc; /* Different border to show another level */
  padding-left: 15px;
}

.block-book-navigation ul ul ul > li {
  font-size: 14px;
}

.block-book-navigation ul ul ul > li > a {
  color: #777;
  padding: 2px 0;
}

.block-book-navigation ul ul ul > li > a:hover {
  color: #999;
}
/*book page css*/
.view-publications .node--type-book h3 {
    font-size: 1rem;
    line-height: 1.38889;
    font-weight: 500;
    -webkit-transition: .2s ease-in-out;
    transition: .2s ease-in-out;
}
.view-publications .view__content .views-row .node--type-book {
    height: 100%;
}
.view-publications .view__content .views-row .node--type-book>a {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    padding: 40px;
    background-color: #fff;
    border-radius: 5px;
    height: 100%;
}
.view-publications .view__content .views-row .node--type-book .field--name-field-heading-image {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    margin-bottom: 20px;
}
.view-publications .view__content .views-row .node--type-book .field--name-field-heading-image img {
    width: auto;
    height: auto;
    max-height: 250px;
    display: block;
}
.view-publications .view__content .views-row .node--type-book .node__meta {
    font-size: .66667rem;
    line-height: 1.66667;
    margin-bottom: 10px;
    margin-top: auto;
}
.book-listing aside.layout__sidebar {
    padding: 30px 24px;
    -ms-flex: 0 0 380px;
    flex: 0 0 380px;
    width: 380px;
    background-color: #F5F5F5;
    /*height: 100%;*/
    min-height: 510px;
}
.book-listing .chapters-list li {
    border-bottom: 1px solid #ddd;
    padding: 8px 0;
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.2rem;
}
.book-listing .chapters-list li.book {
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.2rem;
    padding: 0 0 7px;
}
.book-listing .chapters-list li.book>a {
    color: #FFB466;
}
.book-listing .chapters-list li ul li {
    font-weight: 500;
    color: #666;
}
ul.childchapters-list {
    border-top: 1px solid #ddd;
    padding: 2px 0 0;
    margin: 8px 0 0;
}
ul.childchapters-list li.childchapters:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}
.book-listing .chapters-list li ul li a {
    color: #666;
}
ul.childchapters-list li.childchapters.active a {
    color: #FFB466;
}
.book-listing main.layout__main {
    padding: 0 30px 0 30px;
}
.book-listing article.node {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}
.book-listing article.node>div {
    padding: 0 10px;
}
#book_right_side {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  display: none;
  width: 100%;
  height: 100%;
  overflow: hidden;
  outline: 0;
  background-color: rgba(0,0,0, 0.7) !important;
  padding: 0 25px;
  overflow-y: auto;
}
.book-popup .inner-book-popup > .row {
  display: flex;
  flex-wrap: wrap;
}
.book-popup .inner-book-popup > .row .left-book-image {
  width: 245px;
  max-width: 100%;
  text-align: left;
}
.book-popup .inner-book-popup > .row .right-book-content {
  width: calc(100% - 245px);
  padding-left: 40px;
}
.open-view-book-button {
    position: fixed;
    right: -55px;
    top: calc(45%);
    background: #FFB466;
    border: 0;
    padding: 15px 20px;
    font-size: 16px;
    line-height: 20px;
    font-weight: 600;
    transform: rotate(-90deg);
    cursor: pointer;
    z-index: 2;
}
.open-view-book-button i.fa-eye {
    margin-right: 3px;
    color: #000 !important;
    background-color: transparent !important;
}
.book_right_side .book-popup {
    max-width: 885px;
    margin: 20px auto;
    min-height: calc(100% - 40px);
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    position: relative;
    width: auto;
    background-color: transparent !important;
}
.book_right_side .book-popup .inner-book-popup {
  position: relative;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-direction: column;
  flex-direction: column;
  width: 100%;
  pointer-events: auto;
  background-color: #fff;
  background-clip: padding-box;
  border-radius: 8px;
  outline: 0;
  padding: 70px 52px;
}
.book_right_side .book-popup .close-btn {
  position: absolute;
  right: -18px;
  top: -20px;
  z-index: 1;
  width: 40px;
  height: 40px;
  border: 0;
  background: #fff;
  color: #000;
  box-shadow: 0 4px 4px 0 rgba(0,0,0,0.25);
  border-radius: 100%;
  font-size: 20px;
  font-weight: 500;
  cursor: pointer;
}
.book-listing article .publication__main {
    max-width: 100%;
    /*width: calc(100% - 250px);*/
    width: 100%;
}
.book-listing nav.breadcrumb {
    margin-bottom: 20px;
}
.book-listing article .book_right_side .field--type-image img {
  display: block;
  height: auto;
  max-height: 300px;
  width: auto;
}
.book-popup .inner-book-popup h2 {
  color: #FFB466;
  margin: 0 0 1.1rem;
}
.book-listing .book_right_side .download-pdf a {
  display: inline-flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  background: #FFB466;
  border: 0;
  font: inherit;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  transition: background-color .2s;
  font-weight: 700;
  border-radius: 25px;
  font-size: .88889rem;
  line-height: 1.25;
  width: 100%;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  padding: 10px 20px;
  margin: 0 0 8px;
}
.book-listing .book_right_side .download-pdf a .fa {
    margin-right: 6px;
    color: #000 !important;
    background-color: transparent !important;
}
.book-listing .book_right_side .download-pdf {
  margin: 3rem 0 0;
  display: inline-block;
}
.book-listing .book_right_side .download-pdf a:hover {
    background-color: rgba(255, 130, 0, .8);
     color: #000;
}
.book-listing article.node .publication__main {
    padding-right: 20px;
}
.book-listing article.node .publication__main .table-wrapper {
    width: 100%;
    margin: 20px 0;
    box-shadow: none;
    border-radius: 0;
}
.book-listing article.node .publication__main .table-wrapper caption {
    border-top: 1px solid #dfdfdf;
    border-left: 1px solid #dfdfdf;
    border-right: 1px solid #dfdfdf;
    text-transform: capitalize;
}
.book-listing article.node .publication__main .table-wrapper table td {
    border-color: #dfdfdf !important;
}
.book-listing article.node .publication__main .table-wrapper table th, 
.book-listing article.node .publication__main .table-wrapper table td {
    font-size: 0.9rem;
    text-align: left;
    padding: 12px 16px !important;
}
.book-listing .book_right_side .book-info > .field {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  padding: 8px 0;
  border-bottom: 1px solid #ddd;
  font-size: 1rem;
  line-height: 1.5rem;
  color: #666;
  font-weight: 500;
  align-items: center;
}
.book-listing .book_right_side .book-info .field .field_label, 
.book-listing .book_right_side .book-info .field .field__label {
  -webkit-box-flex: 0;
  -ms-flex: 0 0 105px;
  flex: 0 0 105px;
  max-width: 105px;
  margin-right: 10px;
  font-weight: bold;
  color: #000;
}
h2.chapter-title {
    color: #FFB466;
    margin: 0 0 1rem;
}
.layout__body .u-container.book-listing {
    padding: 0 0px;
    width: calc(1240px + 30px + 30px);
}
.layout__body .u-container.book-listing:has(> .chapters-list.hidden) {
  /* width: 1440px; */
  /* padding: 0 60px; */
}
.layout__body .u-container.book-listing:has(> .chapters-list:not(.hidden)) {
  width: calc(1240px + 380px + 380px + 30px + 30px);
  padding: 0 380px 0 0px;
}
body blockquote {
    margin: 0 0 15px !important;
    border-left: 5px solid #ccc;
    font-style: italic;
    overflow: hidden;
    padding: 3px 1rem !important;
    border-radius: 0 !important;
    background-color: transparent !important;
}
.high-contrast-switch  h2 {
    font-size: 1.22222rem;
    line-height: 1.36364;
}
.high-contrast-switch form#high-contrast-switch>a {
    padding: 2px 10px;
    font-size: .84rem;
    line-height: 1.43846;
    background: #FFB466;
    margin-right: 4px;
    border-radius: 3px;
    display: block;
    text-align: center;
    width: calc(100% - 5px);
    color: #fff;
}
.high-contrast-switch form#high-contrast-switch>a#edit-enable-link {
    background: #444;
}
.high-contrast-switch form#high-contrast-switch {
    display: flex;
    margin: 6px 0;
}
div#block-taitheme-contrasttoggle form#high-contrast-switch {
    display: flex;
    align-items: center;
}
div#block-taitheme-textresize .content {
    display: flex;
    gap: 4px;
}
div#block-taitheme-textresize h2 {
    font-size: .84rem;
    line-height: 1.43846;
    font-weight: normal;
    color: #666;
}
div#block-taitheme-textresize {
    display: flex;
    justify-content: space-between;
    order: 2;
}
div#block-taitheme-textresize .content>a {
    margin: 0;
    background-color: #FFB466;
    border-radius: 4px;
    width: 28px;
    height: 28px;
    background-image: none;
    text-indent: unset;
    text-align: center;
    color: #fff;
    font-size: 17px;
    font-weight: 400;
    line-height: 28px !important;
}
div#block-taitheme-contrasttoggle form#high-contrast-switch p {
    font-size: 0.85rem;
    text-transform: capitalize;
    line-height: 1.25rem;
    margin-right: 10px;
}
div#block-taitheme-contrasttoggle form#high-contrast-switch p::after {
    content: ':';
    display: inline-block;
}
div#block-taitheme-textresize {
    display: flex;
    justify-content: space-between;
}
form#search-chapters-form {
    margin: 0 0 22px;
    border: 1px solid #333232;
    display: flex;
    align-items: center;
}
form#search-chapters-form input#chapter-search {
    font-size: .78889rem;
    line-height: 1.25;
    width: 100%;
    border-radius: 0;
    border: 0;
    padding: 5px 16px;
    height: 42px;
    background: #fff;
}
form#search-chapters-form input[type="submit"] {
    background-color: #333232 !important;
    border: 0;
    color: #fff;
    height: 42px;
    width: 50px;
    min-width: 50px;
    text-align: center;
    background-image: url(../images/chapter-search.png) !important;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 26px;
    font-size: 0;
}
.high-contrast-toggle-label {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 30px;
}
#high-contrast-toggle {
  opacity: 0;
  width: 0;
  height: 0;
}

label.high-contrast-toggle-label .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #C7C5C5;
  transition: 0.7s;
  border-radius: 34px;
}

label.high-contrast-toggle-label .slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  border-radius: 50%;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: 0.7s;
}

#high-contrast-toggle:checked + .slider {
    background-color: #444!important;
}

#high-contrast-toggle:checked + .slider:before {
  transform: translateX(28px);
}
label.high-contrast-toggle-label .slider:hover {
  background-color: #ddd;
}
.layout__header>.u-container {
    position: relative;
}
.book-funnctionality {
    display: flex !important;
    position: absolute;
    top: -3px;
    right: 0;
    background-color: transparent !important;
}
.layout__header__top>div,
.layout__header__top .sitemap {
    margin-top: 12px;
}
.layout__header__top>div#block-taitheme-site-branding {
    margin-top: 0;
}
.book-funnctionality div#block-taitheme-contrasttoggle {
    order: 1;
    margin-right: 15px;
}
button#toggle-chapters-btn {
    border: 0;
    background: #000 !important;
    border-radius: 4px;
    padding: 0;
    width: 54px;
    text-align: center;
    cursor: pointer;
    position: absolute;
    bottom: 14px;
    left: 20px;
}
button#toggle-chapters-btn img {
    width: 100%;
    max-width: 35px;
    padding: 0;
    margin: auto;
    background: #000!important;
}
form#views-exposed-form-search-raamatu-search-raamatu .form--inline {
    display: block;
    position: relative;
    margin: 0 0 22px;
}
form#views-exposed-form-search-raamatu-search-raamatu .form--inline>.form-actions {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 50px;
    height: 42px;
}
form#views-exposed-form-search-raamatu-search-raamatu .form--inline>.form-actions input[type="submit"] {
    background-color: #333232 !important;
    border: 0;
    color: #fff;
    height: 42px;
    width: 50px;
    min-width: 50px;
    text-align: center;
    background-image: url(../images/chapter-search.png) !important;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 26px;
    font-size: 0;
    padding: 0;
    border-radius: 0;
}
form#views-exposed-form-search-raamatu-search-raamatu .form--inline input.form-text {
    font-size: .78889rem;
    line-height: 1.25;
    width: 100%;
    border-radius: 0;
    padding: 5px 16px;
    height: 42px;
    background: #fff;
    border: 1px solid #333232;
    box-shadow: none;
    padding-right: 60px;
}
@media (max-width: 2057px) {
  .layout__body .u-container.book-listing:has(> .chapters-list:not(.hidden)) {
    width: calc(1240px + 30px + 30px);
    padding: 0 0px 0 30px;
  }
  /* .layout__body .u-container.book-listing {
    width: calc(1240px + 30px + 30px);
    padding: 0 0px 0 0px;
  } */
}
@media (max-width: 1440px) {
  .layout__body .u-container.book-listing:has(> .chapters-list:not(.hidden)) {
    width: calc(1440px + 100px + 100px) !important;
    max-width: 100% !important;
  }
  .layout__body .u-container.book-listing {
      padding: 25px 100px 0 100px !important;
      width: 1440px;
  }
  .layout__body .u-container.book-listing:has(> .chapters-list:not(.hidden)) .layout__main {
    padding: 0px 0px 0px 30px !important;
  }
  .layout__body .u-container.book-listing .layout__main {
    padding: 0px !important;
  }
}
@media (max-width: 1279px) {
  button#toggle-chapters-btn {
    bottom: -50px;
    left: 40px;
  }
  .layout__body .u-container.book-listing:has(> .chapters-list:not(.hidden)) {
    width: calc(1240px + 40px + 40px) !important;
  }
  .layout__body .u-container.book-listing {
      padding: 25px 50px 0 40px !important;
  }
  .book-listing main.layout__main {
    padding: 0 0 0 30px;
 }
 .book-listing aside.layout__sidebar.hidden + main.layout__main {
    padding-left: 0;
}
}
@media (max-width: 1199px) {
   .book-listing aside.layout__sidebar {
      -ms-flex: 0 0 320px;
      flex: 0 0 320px;
      width: 320px;
      display: block;
      height: 100%;
      position: absolute;
      z-index: 12345;
  }
  .book-listing main.layout__main {
    padding: 0 0 0 25px;
 } 
}
@media (max-width: 1023px) {
  .book-popup .inner-book-popup > .row .right-book-content {
    padding-left: 20px;
  }
  .book-listing article.node .publication__main {
    padding-left: 0;
}
 .layout__body .u-container.book-listing {
    padding: 40px 50px 0 20px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
}
.book-listing main.layout__main {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    -ms-flex-preferred-size: auto;
    flex-basis: auto;
    min-width: 1px;
}
  .open-view-book-button {
    right: -70px;
  }
  .book-listing aside.layout__sidebar.hidden + main.layout__main {
    padding-left: 30px;
}
}
@media (max-width: 991px) {   
  .book_right_side .book-popup .inner-book-popup {
    padding: 40px 25px;
  }
}
@media (max-width: 767px) {
  .open-view-book-button {
    right: 5px;
    padding: 12px;
  }
  .open-view-book-button .text {
    display: none;
  }
  .book-listing article.node>div {
      width: 100%;
  }
  div#block-taitheme-textresize {
    display: none;
  }
  .book-funnctionality {
      top: 6px;
      right: 32px;
  }
  div#block-taitheme-contrasttoggle form#high-contrast-switch p {
    font-size: 0.75rem;
    margin-right: 6px;
    width: 58px;
    line-height: 1rem;
}
  .high-contrast-toggle-label {
      width: 50px;
      height: 24px;
  }
  label.high-contrast-toggle-label .slider:before {
    height: 20px;
    width: 20px;
}
#high-contrast-toggle:checked + .slider:before {
    transform: translateX(26px);
}
  .book-listing aside.layout__sidebar.hidden + main.layout__main {
    padding-left: 10px;
}
  button#toggle-chapters-btn {
      left: 20px;
  }
  .book-listing aside.layout__sidebar {
    position: absolute;
    -ms-flex: unset;
    flex: unset;
    width: 380px;
    max-width: 100%;
    left: 0;
}
.book-listing main.layout__main {
    padding: 0 0 0 10px;
}
}
@media (max-width: 700px) {
  .book-popup .inner-book-popup > .row .left-book-image {
    width: 100%;
    margin: 0 0 2rem;
    text-align: center;
  }
  .book-popup .inner-book-popup > .row .right-book-content {
    padding: 0;
    width: 100%;
  }
  .book-listing article .book_right_side .field--type-image img {
    margin: 0 auto;
  }
}

.a2a_full_footer {
  display: none;
  border: 0;
  margin: 0;
  padding: 12px;
  box-sizing: border-box;
}
@media (min-width: 1280px) {
  .layout__sidebar + .layout__main {
    padding: 0 30px 0 30px;
  }
}