/* Theme-independent overrides, wired in via the html.css.extra stringparam
   on the web-client target in project.ptx (see that param's own comment for
   why it has to be a relative URL, not a filesystem path). Cleaned up to
   only what's actually active and verified working - the previous version
   of this file carried a lot of dead, commented-out alternatives plus one
   block ("Oscar Levin's custom css" below) that turned out to be copied in
   from a different, unrelated PreTeXt project and never adapted: it styled
   activity/exercise borders using a CSS variable (--projectborder) that was
   never defined anywhere in this book's own theme, and separately hid every
   activity/exercise's number (.codenumber) sitewide - neither of which was
   ever actually working or intended here. Left out entirely rather than
   carried forward as more dead weight; ask if the border styling or number-
   hiding is actually wanted and it can be built properly against this
   book's real theme instead. */

/* Suppresses ActiveCode output/error boxes on elements whose id ends in
   "-no-output" - used for exercises where showing a Run button's actual
   output doesn't make sense (e.g. gnuplot/popen examples in a browser
   sandbox that can't display a plot). */
div[id$="-no-output"] .ac_output, .error {
  display: none !important;
}

/* Blanks out the default alert-warning box styling (background/border) -
   used where the alert wrapper is wanted for its semantics but not its
   default visual treatment. */
.alert-warning {
    background-color: transparent !important;
    border-color: transparent !important;
}

/* Makes Runestone's draggable (Parsons problem) elements blend in rather
   than showing their own background/border. */
.rsdraggable {
   background-color: transparent !important;
   border: transparent !important;
}

/* Runestone wraps free-response ("journal"/shortanswer) questions in a bare
   <form><fieldset>, which gets the browser's default 2px groove border with
   no theme override. That fieldset wraps the ENTIRE activity statement,
   not just the answer box - including any embedded coding-window iframe -
   so the default border renders as a second, misaligned box cutting
   through the middle of the activity, clashing with the activity's own
   themed border. Some themes happen to reset fieldset borders elsewhere in
   their own CSS and hide this; others (e.g. denver) don't. Also resets the
   outer ".runestone" container's own 1px border for the same reason: in
   this book's authoring style that container wraps the whole activity
   statement too, not just the interactive widget, so its border is the
   same kind of redundant double-box against the activity's own border -
   confirmed live, this remained visible even after the fieldset fix above
   until this was added too. */
.runestone fieldset {
  border: none !important;
}

.runestone.shortanswer_section {
  border: none !important;
}

/* Removes a default green background Runestone puts on ActiveCode question
   wrappers. */
.ac_question {
  background-color: transparent !important;
}

/* Hides the small captions Runestone puts under its questions/windows. */
.runestone_caption {
    display: none !important;
}

/* Hides the "Show CodeLens" button on ActiveCode windows - not used in this
   book. */
.ac_opt {
  display: none !important;
}

/* Makes ActiveCode/CodeMirror windows auto-size to their content instead of
   a fixed height with a scrollbar. */
.CodeMirror {
  height: fit-content !important;
}

/* Fixes a table layout issue in CodeMirror's line-number gutter so content
   lines up correctly. */
.lines {
  display: table-cell !important;
}
