/*
 * Sidebar
 */

.sidebar-logo {
  height: 127px;
  filter: contrast(0) brightness(200%);
}

/* Hide third-level sections in sidebar outline */
.sidebar .sidebar-page-links .section-level-3 {
  display: none;
}

/*
 * XXX: docs-builder currently hides the footer if there are no translations; until we
 * fix that, use `!important` to override so that the PDF download link is visible and
 * manually hide the Languages section
 */
.sidebar-footer {
  display: flex !important;
}

.sidebar-footer-langs {
  display: none;
}

/*
 * Chemical formulas with both subscript and superscript (for ions)
 */

.chem2-su {
  display: inline-block;
  font-size: 80%;
  line-height: 1;
  vertical-align: -0.35em;
  white-space: nowrap;
}

.chem2-su > span {
  display: block;
}

[dir="ltr"] .chem2-su > span {
  text-align: left;
}

[dir="rtl"] .chem2-su > span {
  text-align: right;
}

sub.chem2-sub {
  font-size: 80%;
  vertical-align: -0.35em;
}

sup.chem2-sup {
  font-size: 80%;
  vertical-align: 0.65em;
}

/*
 * Equation parameters
 */

.eqn-param {
  display: inline-block;
  font-family: STIXGeneral;
  font-style: italic;
  font-size: 1.2em;
  width: 80px;
}

[dir="ltr"] .eqn-param {
  text-align: right;
}

[dir="rtl"] .eqn-param {
  text-align: left;
}

/* Increase left margin for equation params when the window is wider */
@media screen and (min-width: 1000px) {
  .eqn-param {
    width: 180px;
  }
}

@media screen and (min-width: 1200px) {
  .eqn-param {
    width: 250px;
  }
}

/*
 * Print-optimized layout
 */

/* Hide hyper model component and section header in print/PDF version */
.content-container.complete .hyper-model-container {
  display: none;
}
/*
 * XXX: This preceding sibling approach `:has(+ ...)` does not work in Firefox as of
 * May 2023 (see https://tobiasahlin.com/blog/previous-sibling-css-has/), but since
 * we currently use Chromium to generate the PDF via Puppeteer, we can use it.
 */
.content-container.complete h2:has(+ .hyper-model-container) {
  display: none;
}

/*
 * Model listing
 */

/*
.listing.content .label {
  display: inline-block;
  width: 30px;
  color: #aaa;
  font-size: 0.7em;
}

.listing.content .units {
  color: #555;
  font-size: 0.7em;
}

.listing.content .comment {
  color: #555;
  font-style: italic;
  font-size: 0.7em;
}
*/

/*
 * Page-specific overrides
 */

/* XXX: Prevent text wrapping in first column of 7R table */
.background.content tr td:first-child {
  width: 1%;
  white-space: nowrap;
}
