/*
  This file contains styles rules for PlasmaPy's documentation, which
  includes new rules as well as rules that override styles from the
  Sphinx Read the Docs theme (sphinx_rtd_theme).

  The CSS style rule syntax is:

    selectors-list {
      properties-list
    }

  The code in selectors-list selects the patterns for the elements to be
  styled. The code in properties-list sets the style of these elements.
  The CSS rule to be applied is generally the one that has the most
  specific selectors.

  For more information on CSS, go to: https://www.w3schools.com/css

  Most web browsers have inspection tools that help with adding new CSS
  rules. Right-click or ctrl-click on an element of a website, and
  choose "inspect" to see the HTML code along with CSS selectors and
  properties.

  When creating a new rule, use increased specificity instead of
  !important when possible. Using !important can make debugging more
  difficult. Use relative units like rem (root font size) to help with
  accessibility and scaling. Please add descriptive comments for new
  rules that are understandable to someone who is unfamiliar with CSS.

  CSS files can be validated at: https://jigsaw.w3.org/css-validator
*/

/* -----------------------------------------------------------------------------
 * RTD Overrides
 */

/* Style for toctree in a table */
td .toctree-wrapper ul {
    font-size: 16px;
    line-height: 18px !important;
    list-style: none !important;
    margin-bottom: 0 !important;
}

td .toctree-wrapper ul li {
    list-style: none !important;
    margin-left: 0 !important;
}

/* Unordered list nested in ordered list */
.section li ul {
    margin-bottom: 12px !important;
}

/* Add margin-bottom to inheritance diagrams */
div.graphviz {
    margin-bottom: 24px !important;
}

/*
 * Remove bottom margin for the autosummary table in a directive:option::
 * section
 */
.rst-content dl.rst table p,
.rst-content dl.std table p,
.rst-content dl.py table p {
    margin-bottom: 0 !important;
}

/*
 * Patch for overflow wrapping caused by sphinx_rtd_theme==1.1.0
 * See https://github.com/PlasmaPy/PlasmaPy/issues/1784
 */
.rst-content p a code {
    overflow-wrap: normal;
}

/* Remove excess bottom margin for table headings */
.rst-content table.docutils thead p {
    margin-bottom: 0;
}

/* Remove excess bottom margin for for multiline table entries when using line-block */
.rst-content table.docutils div.line-block {
    margin-bottom: 0;
}

/* Allow text wrapping for last column of a table. */
.rst-content table.docutils td:last-child p {
    white-space: normal;
    line-height: 140%;
}

/* Reduce top/bottom margin for equations in tables */
table div.MathJax_Display {
    margin: 0.5em 0;
}

/*
 * Adjustments to the Glossary styling
 */
dl.glossary dd ul {
    margin-bottom: 12px !important;
}
dl.glossary dd {
    margin-top: 4px;
    margin-bottom: 18px;
}
dl.glossary dt {
    margin-bottom: 2px;
}

/* Styles for text in the footer chosen to improve contrast. */

footer p {
    color: #141414;
}

/*
  Styles for hyperlinks. The colors must meet the WCAG AA standard
  for contrast. Link colors can be tested for accessibility at:
  https://webaim.org/resources/linkcontrastchecker
*/

div.wy-nav-content a:link {
    color: #0069d6;
}
div.wy-nav-content a:visited  {
    color: #9151b6;
}
div.wy-nav-content a:hover {
    text-decoration:underline;
}

/*
  The style for generic code literals, in particular text that is
  enclosed in double back ticks in reStructuredText (e.g., ``make -j 32``).
*/

div.wy-nav-content .rst-content code.literal {
    background-color: #f6f6f6;
    color: #db2424;
}

/*
  The style for links to Python objects, in particular text enclosed in
  single back ticks in reStructuredText (e.g., `~plasmapy.particles`).
*/

div.wy-nav-content .rst-content code.literal.xref {
    color: #0069d6;
    font-weight: bold;
}

/*
  The style for literal text that shows the location of a file, in
  particular when used by the reStructuredText role :file: (e.g.,
  :file:`docs/_static/css/plasmapy.css`).
*/
div.wy-nav-content .rst-content code.literal.file {
    color: #b84d00;
    background-color: #F9F1F0;
}

/* -----------------------------------------------------------------------------
 * RTD layout styling additions
 */

/* Style for module/index links in sidebar below the search field. */
div.pkgnav {
    color: white;
    font-size: 1em;
    margin-top: 12px;
    text-align: center;
}

div.pkgnav ul {
    list-style: none;
}

div.pkgnav ul li {
    display: inline;
}

div.pkgnav ul li a {
    color: #f9f9f0;
    margin: 0;
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.5);
}

div.pkgnav ul li a:hover {
    color: #f50404;
    text-shadow: 0 0 1px rgba(255, 255, 255, 0.5);
}
