/*
 * Bahasa Indonesia reader layout for the O003 topology edition.
 *
 * PreTeXt's stock desktop shell reserves a second 240 px column on the
 * right, which leaves the reading column narrow and left-anchored inside the
 * available main pane. Keep the stock compact/mobile layout, but use that
 * dormant space and centre the reader inside the main pane at desktop widths.
 */
@media (min-width: 1200px) {
  .pretext .ptx-masthead,
  .pretext .ptx-navbar,
  .pretext .ptx-page,
  .pretext .ptx-page-footer {
    width: 100%;
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
  }

  .pretext .ptx-page > .ptx-main {
    width: calc(100% - 240px);
  }

  .pretext .ptx-page > .ptx-main > .ptx-content,
  .pretext .ptx-page > .ptx-main > .ptx-content-footer {
    width: min(960px, 100%);
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
  }

  .pretext .ptx-page > .ptx-sidebar.hidden + .ptx-main {
    width: 100%;
    margin-left: 0;
  }

  .pretext .ptx-page > .ptx-sidebar.hidden + .ptx-main > .ptx-content,
  .pretext .ptx-page > .ptx-sidebar.hidden + .ptx-main > .ptx-content-footer {
    width: min(960px, 100%);
    margin-left: auto;
    margin-right: auto;
  }
}

/*
 * Between the stock desktop and mobile breakpoints, PreTeXt fixes the reading
 * measure at 600 px but leaves it anchored to the left padding of the main
 * pane.  Centre that measure in the actual available pane so 1024 px desktop
 * and 768 px tablet readers do not carry a large unused strip on the right.
 * The compact phone layout below 600 px remains untouched.
 */
@media (min-width: 600px) and (max-width: 1199px) {
  .pretext .ptx-page > .ptx-main > .ptx-content,
  .pretext .ptx-page > .ptx-main > .ptx-content-footer {
    width: min(600px, 100%);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }
}

/*
 * The stock navigation controls are sized for the shorter English labels
 * “Prev” and “Next”.  Indonesian “Sebelumnya” and “Berikutnya” otherwise
 * clip inside both the top tree controls and the reading-column footer.
 */
@media (min-width: 800px) {
  .pretext .ptx-navbar .treebuttons {
    width: 270px !important;
  }

  .pretext .ptx-navbar .treebuttons .previous-button,
  .pretext .ptx-navbar .treebuttons .next-button {
    width: 110px !important;
    max-width: none !important;
  }

  .pretext .ptx-navbar .treebuttons .up-button {
    width: 50px !important;
    max-width: none !important;
  }

  .pretext .ptx-content-footer .previous-button,
  .pretext .ptx-content-footer .next-button {
    width: 110px !important;
    min-width: 110px !important;
    max-width: none !important;
  }
}
