/* GeoSite-Test v206: textbook bibliographies from user-provided Word source.
   Reuse the fixed category heading and scrollable list layout of Publications. */
#content > .textbook-category-page > .textbooks-book-list {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(19px, 2.25vw, 25px);
  font-weight: 400;
  line-height: 1.4;
  list-style: disc;
  padding-top: 10px;
  padding-bottom: 20px;
}
#content > .textbook-category-page > .textbooks-book-list > li {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  margin-bottom: 0.3em;
}
#content > .textbook-category-page > .textbooks-book-list a {
  color: #204d9b;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}
#content > .textbook-category-page > .textbooks-book-list a:hover,
#content > .textbook-category-page > .textbooks-book-list a:focus-visible {
  color: #123e8b;
}
@media screen and (max-width:700px) {
  #content > .textbook-category-page > .textbooks-book-list {
    font-size: clamp(13px, 3.25vw, 16px);
    line-height: 1.14;
    padding-right: 8px;
  }
}

/* GeoSite2 TEST: lift the Textbooks section heading and book list together. */
/* Remove the top padding above Mathematics, Physics and Geophysics.
   The old surrounding padding was approximately one capital-letter high.
   Both heading and scrollable list rise together; their relative spacing stays. */
#content:has(> .textbook-category-page) {
  padding-top:0!important;
}
#content > .textbook-category-page {
  padding-top:0!important;
}

/* Short phones: match the smaller Textbooks section-label font too. */
@media screen and (max-width:700px) and (max-height:700px) {
  #content > .textbook-category-page > .textbooks-book-list {
    font-size: clamp(12.5px, 3.1vw, 15px);
  }
}

/* GeoSite2 TEST: restore reliable scrolling inside Textbooks book-name lists. */
/* The heading/Back row is fixed, while only the book titles move.
   Give the list an actual viewport; otherwise smaller type can cause its
   contents to fit the unbounded element and no vertical scroll starts. */
#content > .textbook-category-page > ul.textbooks-book-list {
  display:block!important;
  box-sizing:border-box!important;
  flex:0 1 auto!important;
  width:100%!important;
  min-height:0!important;
  height:min(48dvh,480px)!important;
  max-height:calc(100% - 58px)!important;
  overflow-y:scroll!important;
  overflow-x:hidden!important;
  scrollbar-width:thin!important;
  scrollbar-gutter:stable;
  -webkit-overflow-scrolling:touch;
  touch-action:pan-y;
  overscroll-behavior-y:contain;
}
@media screen and (max-width:980px) {
  #content > .textbook-category-page > ul.textbooks-book-list {
    height:min(33dvh,290px)!important;
    max-height:calc(100% - 50px)!important;
  }
}
