/* Styles for the ReST roles registered by pyTooling.Documentation.Sphinx. */

/* Previously injected into every document by a 'raw:: html' block in each project's doc/prolog.inc. */

/* Every value a project might want to change is a custom property, so it can be overridden without replacing
   this file. Put a stylesheet of your own after this one - 'html_css_files' in conf.py is appended in order -
   and redefine what you need:

     :root {
       --pyTooling-color-red: #b00020;
     }

   A property is only read where it is used below, so redefining one changes exactly the role that uses it. */
:root {
  --pyTooling-color-red:    #c00;
  --pyTooling-color-green:  #093;
  --pyTooling-color-blue:   #06f;
  --pyTooling-color-purple: #90c;

  --pyTooling-xlarge-size:  x-large;

  --pyTooling-table-cell-vertical-align: top;
  --pyTooling-table-list-margin:         0;
  --pyTooling-table-min-width:           50%;

  --pyTooling-tree-row-height:            1.6em;
  --pyTooling-tree-indentation:           1.4em;
  --pyTooling-tree-expander-width:        1em;
  --pyTooling-tree-icon-gap:              0.3em;
  --pyTooling-tree-line:                  1px solid #999;
  --pyTooling-tree-margin-bottom:         24px;
  --pyTooling-tree-column-gap:            1.5em;
  --pyTooling-tree-description-min-width: 15em;

  --pyTooling-abbreviation-underline:  1px dotted;
  --pyTooling-abbreviation-background: #fff;
  --pyTooling-abbreviation-border:     1px solid #999;
  --pyTooling-abbreviation-shadow:     0 2px 6px rgba(0, 0, 0, 0.2);
  --pyTooling-abbreviation-max-width:  30em;

  --pyTooling-coverage-covered:          rgba(46, 160, 88, 0.14);
  --pyTooling-coverage-covered-marker:   #2e9e58;
  --pyTooling-coverage-partial:          rgba(218, 160, 24, 0.24);
  --pyTooling-coverage-partial-marker:   #b88910;
  --pyTooling-coverage-uncovered:        rgba(212, 58, 58, 0.16);
  --pyTooling-coverage-uncovered-marker: #c63c3c;
  --pyTooling-coverage-excluded:         rgba(110, 120, 130, 0.10);
  --pyTooling-coverage-excluded-marker:  #8a949c;
  --pyTooling-coverage-none-marker:      #c8c8c8;
  --pyTooling-coverage-header-border:    1px solid #e1e4e5;
  --pyTooling-coverage-marker-width:     4px;
  --pyTooling-coverage-tab-size:         4;
}

span.bolditalic {
  font-weight: bold;
  font-style: italic;
}

span.underline {
  text-decoration: underline;
}

span.strike {
  text-decoration: line-through;
}

span.xlarge {
  font-size: var(--pyTooling-xlarge-size);
}

span.colorred {
  color: var(--pyTooling-color-red);
}

span.colorgreen {
  color: var(--pyTooling-color-green);
}

span.colorblue {
  color: var(--pyTooling-color-blue);
}

span.colorpurple {
  color: var(--pyTooling-color-purple);
}


/* Styles for the tables built by pyTooling.Documentation.Sphinx.

   The class is put on the table by the directive, so these rules reach only a table this package generated and
   never a table a document wrote by hand.

   Every declaration here is '!important', which is not laziness: it has to outrank a theme's own table rules, and
   a theme is chosen by the project rather than by this package, so its selectors can't be predicted. sphinx_rtd_
   theme's '.rst-content table.docutils td' is two classes and two elements, which beats anything this file can
   write without naming that theme. The values stay overridable regardless, because a project redefines the
   custom property rather than the declaration - and a custom property has no specificity to lose. */

/* A row is as tall as its tallest cell, and in a dependency table that is the cell holding a dependency tree.
   Centring the other three vertically pushes a package's name into the middle of an otherwise empty column, far
   away from the row it belongs to. */
table.dependency-table td,
table.dependency-table th {
  vertical-align: var(--pyTooling-table-cell-vertical-align) !important;
}

/* A list inside a cell is the cell's whole content, so the margin a theme puts below it for running text is a gap
   between the last bullet and the cell's border with nothing in it. */
table.dependency-table td > ul,
table.dependency-table td ul,
table.dependency-table td li > p,
table.dependency-table td li > ul,
table.dependency-table td > p {
  margin-bottom: var(--pyTooling-table-list-margin) !important;
}

/* Without a floor, every table is as wide as its widest row, so a table of one short dependency and a table of a
   four-level tree sit beside each other at wildly different widths and the page reads as ragged. */
table.dependency-table {
  min-width: var(--pyTooling-table-min-width);
}


/* Styles for the trees drawn by the 'tree' directive.

   A tree is a nested bullet list, so a theme's list styles - bullets, margins, paddings - reach it too. They are
   reset here with '!important', for the reason given at the tables above. */
ul.pytooling-tree,
ul.pytooling-tree ul,
ul.pytooling-tree li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

ul.pytooling-tree {
  margin-bottom: var(--pyTooling-tree-margin-bottom) !important;
}

/* The lines are drawn at half a row's height, so the row's height has to be the one they are computed from. */
ul.pytooling-tree,
ul.pytooling-tree ul,
ul.pytooling-tree li {
  line-height: var(--pyTooling-tree-row-height) !important;
}

/* A theme may space the blocks in a list item - sphinx_rtd_theme puts 12px above and below each. Below an entry's
   '<details>', that space ends up between the entry and its next sibling, outside both of their lines: a gap in the
   vertical line. Only vertical margins are reset, as an icon keeps its gap to the text. */
ul.pytooling-tree li > * {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* A level's lines start below the centre of its parent's expander. */
ul.pytooling-tree ul {
  margin-left: calc(var(--pyTooling-tree-expander-width) / 2) !important;
}

ul.pytooling-tree ul > li {
  position: relative;
  padding-left: var(--pyTooling-tree-indentation) !important;
}

/* The line from the parent down to this entry, and across to its text: '└'. */
ul.pytooling-tree ul > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: calc(var(--pyTooling-tree-indentation) - 0.2em);
  height: calc(var(--pyTooling-tree-row-height) / 2);
  border-left: var(--pyTooling-tree-line);
  border-bottom: var(--pyTooling-tree-line);
}

/* An entry without children has an empty expander, which the line crosses: '└── text'. */
ul.pytooling-tree ul > li:not(.tree-expandable)::before {
  width: calc(var(--pyTooling-tree-indentation) + var(--pyTooling-tree-expander-width) - 0.2em);
}

/* The line on to the next sibling, past this entry's children; with the one above, it makes '├'. */
ul.pytooling-tree ul > li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-left: var(--pyTooling-tree-line);
}

/* The expander icons replace the browser's disclosure triangle. */
ul.pytooling-tree summary {
  display: block;
  list-style: none;
  cursor: pointer;
}

ul.pytooling-tree summary::-webkit-details-marker {
  display: none;
}

ul.pytooling-tree span.tree-expander {
  display: inline-block;
  width: var(--pyTooling-tree-expander-width);
  text-align: center;
}

ul.pytooling-tree span.tree-icon {
  margin-right: var(--pyTooling-tree-icon-gap);
}

/* Both expander icons are written; which one shows depends on whether the entry is expanded. */
ul.pytooling-tree details > summary span.tree-collapsed,
ul.pytooling-tree details:not([open]) > summary span.tree-expanded {
  display: none;
}

ul.pytooling-tree details:not([open]) > summary span.tree-collapsed {
  display: inline-block;
}

/* A tree with descriptions: every entry is a row of two columns, its icons and text, and its description.

   The root states the width of the first column, measured from the tree's left edge, as '--pyTooling-tree-column'
   - the directive estimates it from the texts' lengths -, and every row its level as '--pyTooling-tree-depth'. Each
   level is indented by '--pyTooling-tree-level', so the first column of a row is as many levels narrower as the row
   is deep, and every description starts at the same horizontal position. A text wider than its column pushes its own
   description to the right, never over it.

   A description that doesn't get its minimum width beside the text - on a narrow screen - wraps below the text. */
ul.pytooling-tree {
  --pyTooling-tree-level: calc(var(--pyTooling-tree-indentation) + var(--pyTooling-tree-expander-width) / 2);
}

ul.pytooling-tree span.tree-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
}

ul.pytooling-tree span.tree-label {
  flex: 0 1 auto;
  min-width: min(100%, calc(var(--pyTooling-tree-column) - var(--pyTooling-tree-depth) * var(--pyTooling-tree-level)));
}

ul.pytooling-tree span.tree-description {
  flex: 1 1 var(--pyTooling-tree-description-min-width);
  min-width: 0;
  padding-left: var(--pyTooling-tree-column-gap);
}

/* An entry without a description has an empty one, which mustn't wrap below the text on a narrow screen. */
ul.pytooling-tree span.tree-description:empty {
  display: none;
}


/* Styles for the abbreviations the roles ':acs:', ':acf:' etc. write.

   A short form is an '<abbr>' holding a box with the short and the long form, hidden until the abbreviation is
   hovered, or its link has the keyboard focus. */
abbr.pytooling-abbreviation {
  position: relative;
  text-decoration: underline var(--pyTooling-abbreviation-underline);
  cursor: help;
}

abbr.pytooling-abbreviation > span.pytooling-abbreviation-box {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 100;
  width: max-content;
  max-width: var(--pyTooling-abbreviation-max-width);
  padding: 0.3em 0.6em;
  background: var(--pyTooling-abbreviation-background);
  border: var(--pyTooling-abbreviation-border);
  box-shadow: var(--pyTooling-abbreviation-shadow);
  color: initial;
  font-weight: normal;
  font-style: normal;
  white-space: normal;
  text-align: left;
  cursor: auto;
}

abbr.pytooling-abbreviation:hover > span.pytooling-abbreviation-box,
a:focus abbr.pytooling-abbreviation > span.pytooling-abbreviation-box {
  display: block;
}

/* The summary of the description, below the long form. */
abbr.pytooling-abbreviation span.pytooling-abbreviation-summary {
  display: block;
  margin-top: 0.3em;
  font-size: 0.9em;
}

/* The long form opens an abbreviation's definition in the list, like a glossary's first line. */
dl.pytooling-abbreviations p.abbreviation-long {
  font-style: italic;
}

/* Styles for the report tables of domain 'report'.

   The classes are put on the tables and rows by the directives of domain 'report', so these rules reach only a report
   table. */

/* A theme may stripe a table's rows - sphinx_rtd_theme colours every second row's cells -, which hides the row
   colour of a coverage level or a testcase status. The stripes are reset for the report tables only. */
.rst-content table.docutils.report-unittest-table:not(.field-list) tr:nth-child(2n-1) td,
.rst-content table.docutils.report-codecov-table:not(.field-list) tr:nth-child(2n-1) td,
.rst-content table.docutils.report-codecov-legend:not(.field-list) tr:nth-child(2n-1) td,
.rst-content table.docutils.report-doccov-table:not(.field-list) tr:nth-child(2n-1) td,
.rst-content table.docutils.report-doccov-legend:not(.field-list) tr:nth-child(2n-1) td {
  background-color: unset;
}

/* A row's background is the colour of its coverage level, per CSS class of the default palette. */
/* very good */
table.report-codecov-table > tbody > tr.report-cov-below100,
table.report-codecov-legend > tbody > tr.report-cov-below100,
table.report-doccov-table > tbody > tr.report-cov-below100,
table.report-doccov-legend > tbody > tr.report-cov-below100 {
  background: hsl(120 75% 75%);
}

/* good */
table.report-codecov-table > tbody > tr.report-cov-below95,
table.report-codecov-legend > tbody > tr.report-cov-below95,
table.report-doccov-table > tbody > tr.report-cov-below95,
table.report-doccov-legend > tbody > tr.report-cov-below95 {
  background: hsl(90 75% 75%);
}
table.report-codecov-table > tbody > tr.report-cov-below90,
table.report-codecov-legend > tbody > tr.report-cov-below90,
table.report-doccov-table > tbody > tr.report-cov-below90,
table.report-doccov-legend > tbody > tr.report-cov-below90 {
  background: hsl(75 75% 75%);
}
table.report-codecov-table > tbody > tr.report-cov-below85,
table.report-codecov-legend > tbody > tr.report-cov-below85,
table.report-doccov-table > tbody > tr.report-cov-below85,
table.report-doccov-legend > tbody > tr.report-cov-below85 {
  background: hsl(60 75% 77%);
}
/* modest */
table.report-codecov-table > tbody > tr.report-cov-below80,
table.report-codecov-legend > tbody > tr.report-cov-below80,
table.report-doccov-table > tbody > tr.report-cov-below80,
table.report-doccov-legend > tbody > tr.report-cov-below80 {
  background: hsl(45 75% 80%);
}
table.report-codecov-table > tbody > tr.report-cov-below70,
table.report-codecov-legend > tbody > tr.report-cov-below70,
table.report-doccov-table > tbody > tr.report-cov-below70,
table.report-doccov-legend > tbody > tr.report-cov-below70 {
  background: hsl(30 75% 85%);
}
table.report-codecov-table > tbody > tr.report-cov-below60,
table.report-codecov-legend > tbody > tr.report-cov-below60,
table.report-doccov-table > tbody > tr.report-cov-below60,
table.report-doccov-legend > tbody > tr.report-cov-below60 {
  background: hsl(15 75% 85%);
}
/* bad */
table.report-codecov-table > tbody > tr.report-cov-below50,
table.report-codecov-legend > tbody > tr.report-cov-below50,
table.report-doccov-table > tbody > tr.report-cov-below50,
table.report-doccov-legend > tbody > tr.report-cov-below50 {
  background: hsl(0 75% 85%);
}
table.report-codecov-table > tbody > tr.report-cov-below40,
table.report-codecov-legend > tbody > tr.report-cov-below40,
table.report-doccov-table > tbody > tr.report-cov-below40,
table.report-doccov-legend > tbody > tr.report-cov-below40 {
  background: hsl(285 75% 85%);
}
/* very bad */
table.report-codecov-table > tbody > tr.report-cov-below30,
table.report-codecov-legend > tbody > tr.report-cov-below30,
table.report-doccov-table > tbody > tr.report-cov-below30,
table.report-doccov-legend > tbody > tr.report-cov-below30 {
  background: hsl(270 75% 85%);
}
table.report-codecov-table > tbody > tr.report-cov-below20,
table.report-codecov-legend > tbody > tr.report-cov-below20,
table.report-doccov-table > tbody > tr.report-cov-below20,
table.report-doccov-legend > tbody > tr.report-cov-below20 {
  background: hsl(255 75% 85%);
}
table.report-codecov-table > tbody > tr.report-cov-below10,
table.report-codecov-legend > tbody > tr.report-cov-below10,
table.report-doccov-table > tbody > tr.report-cov-below10,
table.report-doccov-legend > tbody > tr.report-cov-below10 {
  background: hsl(240 75% 85%);
}
/* internal error */
.report-cov-error {
  background: rgba(255, 0, 0, .4);
}

table.report-unittest-table > thead > tr,
table.report-codecov-table > thead > tr,
table.report-codecov-legend > thead > tr,
table.report-doccov-table > thead > tr,
table.report-doccov-legend > thead > tr {
  background: #ebebeb;
}
table.report-unittest-table > tbody > tr:hover {
  background-color: rgba(0,187, 255, 0.5); /* #88d0ff; */
}
table.report-unittest-table > tbody > tr.report-summary,
table.report-codecov-table > tbody > tr.report-summary,
table.report-doccov-table > tbody > tr.report-summary {
  font-weight: bold;
}
table.report-unittest-table > tbody > tr.report-summary {
  background: #ebebeb;
}
table.report-unittest-table > tbody > tr.testsuitesummary-unknown,
table.report-unittest-table > tbody > tr.testsuite-unknown,
table.report-unittest-table > tbody > tr.testcase-unknown {
  background: hsl(0 75% 65%);
}
table.report-unittest-table > tbody > tr.testsuitesummary-failed,
table.report-unittest-table > tbody > tr.testsuitesummary-skipped,
table.report-unittest-table > tbody > tr.testsuitesummary-excluded,
table.report-unittest-table > tbody > tr.testsuite-failed,
table.report-unittest-table > tbody > tr.testcase-failed {
  background: hsl(0 75% 90%);
}
table.report-unittest-table > tbody > tr.testsuite-excluded,
table.report-unittest-table > tbody > tr.testcase-excluded {
  background: #ebebeb;
}
table.report-unittest-table > tbody > tr.testsuite-skipped,
table.report-unittest-table > tbody > tr.testcase-skipped {
  background: hsl(60 75% 77%);
}
table.report-unittest-table > tbody > tr.report-summary.testsuitesummary-passed /*,
table.report-unittest-table > tbody > tr.testsuite-passed,
table.report-unittest-table > tbody > tr.testcase-passed */ {
  background: hsl(120 75% 90%);
}

/* A source file's code coverage: a line per <span>, its background and left border by its coverage state. */
div.report-coverage-listing pre {
  tab-size: var(--pyTooling-coverage-tab-size);
  -moz-tab-size: var(--pyTooling-coverage-tab-size);
}
div.report-coverage-listing span.report-line {
  display: block;
  border-left: var(--pyTooling-coverage-marker-width) solid transparent;
}
div.report-coverage-listing span.report-line-covered {
  background: var(--pyTooling-coverage-covered);
  border-left-color: var(--pyTooling-coverage-covered-marker);
}
div.report-coverage-listing span.report-line-partial {
  background: var(--pyTooling-coverage-partial);
  border-left-color: var(--pyTooling-coverage-partial-marker);
}
div.report-coverage-listing span.report-line-uncovered {
  background: var(--pyTooling-coverage-uncovered);
  border-left-color: var(--pyTooling-coverage-uncovered-marker);
}
div.report-coverage-listing span.report-line-excluded {
  background: var(--pyTooling-coverage-excluded);
  border-left-color: var(--pyTooling-coverage-excluded-marker);
}
div.report-coverage-listing span.linenos {
  display: inline-block;
  min-width: 3em;
  text-align: right;
  user-select: none;
}
div.report-coverage-listing span.linenos.report-hits {
  min-width: 4em;
  opacity: 0.7;
}
div.report-coverage-listing div.report-coverage-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.3em 1.5em;
  padding: 0.4em 0.8em;
  border-bottom: var(--pyTooling-coverage-header-border);
  font-size: 90%;
}
div.report-coverage-listing span.report-coverage-path {
  font-family: monospace;
  font-weight: bold;
}
div.report-coverage-listing span.report-coverage-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3em 1em;
}
div.report-coverage-listing span.report-coverage-legend > span::before {
  content: "";
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  margin-right: 0.35em;
  vertical-align: -0.1em;
  border-left: var(--pyTooling-coverage-marker-width) solid transparent;
}
div.report-coverage-listing span.report-coverage-legend-covered::before {
  background: var(--pyTooling-coverage-covered);
  border-left-color: var(--pyTooling-coverage-covered-marker);
}
div.report-coverage-listing span.report-coverage-legend-partial::before {
  background: var(--pyTooling-coverage-partial);
  border-left-color: var(--pyTooling-coverage-partial-marker);
}
div.report-coverage-listing span.report-coverage-legend-uncovered::before {
  background: var(--pyTooling-coverage-uncovered);
  border-left-color: var(--pyTooling-coverage-uncovered-marker);
}
div.report-coverage-listing span.report-coverage-legend-excluded::before {
  background: var(--pyTooling-coverage-excluded);
  border-left-color: var(--pyTooling-coverage-excluded-marker);
}
div.report-coverage-listing span.report-coverage-legend-none::before {
  border-left-color: var(--pyTooling-coverage-none-marker);
}
