
/* Wikipedia Dark Theme v1.0.23 (1/17/2017)
 * https://github.com/StylishThemes/Wikipedia-Dark
 * http://userstyles.org/styles/
 * Modified from https://userstyles.org/styles/47161/dark-wikipedia-rounded
 * In turn, the styles have been modified to work with Kiwix JS and Kiwix JS Windows.
 * The source file for this adapted version can be found at:
 * https://github.com/kiwix/kiwix-js-pwa/
 *
 * This CSS file is licensed with a CC-BY-SA Creative Commons Free Culture Licence:
 * https://creativecommons.org/licenses/by-sa/4.0/ 
 * This licence applies *only* to this CSS file within the Kiwix JS and Kiwix JS Windows projects.
 *
 */

  /* transparent background */
div, span:not(.legend-color):not([class*="wikEd"]):not([style*="background"]), .MainPageBG, .navbox-list,
div#mw-head, .mw-wsmfinal-content, #bodyContent, .referencetooltip > li + li,
div.vectorTabs ul li, tr[style*="background:#F5FFFA"],
th[style*="background-color: #fff"], .mw-echo-notifications-badge,
.ext-cards-card-list .ext-cards-card, .infobox span.plainlinks *,
.tracklist, p[style*="background"] {
    background-color: transparent !important;
}

  /*** Overall ***/
  p, li, td:not([style*="background"]), th:not([style*="background"]), caption, div {
    color: lightgray !important;
    background-image: none !important;
  }

  th.infobox-above, th.infobox-header {
    background-color: darkslategray !important;
  }

  td.infobox-subheader {
    background-color: dimgray !important;
  }

  p code, label code, dl code {
      background-color: #111;
      color: lightgray !important;
  }

blockquote {
    background-color: transparent !important;
}

  td[style*="color"], td span[style*="color"], .table-author {
      color: lightslategray !important;
  }

  h1, h2, h3, h4, h5, h6, #footer li, .infobox th[style*="background"],
  div[style*="color"], input[type="search"], input[type="submit"],
  input[type="number"], select, .suggestions-result
  {
    color: gainsboro !important;
  }

a, .CategoryTreeToggle, #toc a, #toc a span, body .ui-button {
    color: lightblue !important;
}

td[style*="background"]:not([class*="translations"]):not([style*="transparent"]) a:first-child {
    color: dimgray !important
}

  a:visited, #toc a:visited, #toc a:visited span
  {
    color: palevioletred !important;
  }

  a:hover, a:hover span, #toc a:hover, #toc a:hover span,
  .suggestions-result .highlight, .suggestions-special .special-query
  {
    color: #fff !important;
    text-decoration: underline !important;
  }

#content .qb .qbHeader, .pure-input-rounded, .site-header {
    background: #1d3030;
    color: whitesmoke;
}

.prettytable th { /* hightlighting */
    background: #1d3030;
}

a span {
    color: lightblue !important;
}

  /* text selection */
  ::selection
  {
    background-color: lightgray !important;
    color: #fff !important;
  }

  ::-moz-selection
  {
    background-color: lightgray !important;
    color: #fff !important;
  }

  /*** Red links (non-existant pages) ***/
  a.new
  {
    color: #980000 !important;
  }

  /*** Background ***/
html, body {
    background-color: #000010 !important;
    /*background-image: [[bg-choice]] !important;*/
    background-clip: border-box !important;
    background-origin: padding-box !important;
    /*background-attachment: [[bg-attachment]]!important;*/
    /*[[bg-options]];*/
}

::-webkit-scrollbar {
  height: 10px;
}

::-webkit-scrollbar-button:start:decrement,
::-webkit-scrollbar-button:end:increment  {
    height: 30px;
    background-color: transparent;
}
::-webkit-scrollbar-track-piece  {
    background-color: #3b3b3b;
}
::-webkit-scrollbar-thumb:vertical {
    height: 50px;
    background-color: #666;
    border: 1px solid #eee;
}

.mw-ui-button, .mw-ui-button * {
    background-color: lightgray !important;
    color: #fff !important;
}

#mw-page-base, div.vectorTabs, div.vectorTabs *, .wikiEditor-ui-toolbar, #p-cactions-label,
.client-js #preftoc, .client-js #preftoc li, .client-js #preftoc li.selected a,
.ui-widget-content, .ext-cards-card-list h3:after, #simpleSearch, div[style*="background-image:linear-gradient(180deg, #E8E8E8, white)"] {
    background-image: none !important;
}

  .ui-widget-overlay
  {
    background: rgba(0, 0, 0, 0.8) !important;
  }

  #bodyContent pre, .mw-body-content pre, #bodyContent code, .mw-body-content code, span.plainlinks *
  {
    background-color: #111 !important;
    border-color: #555 !important;
    color: #b9b9b9 !important;
  }

td[style*="background"], .jfk-bubble, .navpopup, div span[style*="background-color:#FFFF"], div span[style*="background: #fb"] {
    background-color: #181818 !important;
}

table, input, button, select, textarea:not([class*="mw-editfont"]),
tr[style*="background: antiquewhite"], tr[style*="background-color:#ee"], tr[style*="background-color:#ff"], tr[style*="background-color:#FF"], tr[style*="background-color:#ccc"], 
#toc, td[style*="background-color"], td[style*="background:#F5FAFF"], td[style*="background:#F8"], tr[style*="background:#f8"], tr[style*="background:#f4"], td[style*="background:WhiteSmoke"], td[style*="background:GhostWhite"], span[style*="background:moccasin"], td[style*="background:#f5"], #mw-content-text div[style*="background: #"], .vevent td, .referencetooltip li, .suggestions,
.mw-ui-button[style*="background"], .mw-ui-button[style*="background"] *, .wikiEditor-ui,
table.navbox.collapsible tr:nth-child(2) > td, div.menu, div.NavHead, .oo-ui-popupWidget-popup,
.oo-ui-buttonElement-button, .mw-notification, .mwe-popups, .mwe-popups-is-not-tall, .mwe-popups-is-tall,
.ui-widget-content, .oo-ui-window-body, #pagehistory li.selected, .tracklist tr, .dataTable tr {
    background-color: #222 !important;
}

table.dataTable.display tbody tr:hover,
table.dataTable.display tbody tr.odd:hover,
table.dataTable.display tbody tr.even:hover {
    background-color: darkslategray !important;
}

#hauptseite > table {
    background-color: transparent !important;
}

.navbox th, .climate-table th, .wikitable th, .navbox-title, th[bgcolor], td[bgcolor], th[style*="background"], li.current a {
    background-color: darkslategray !important;
    border-color: #555 !important;
    color: lightgray;
}

tr[bgcolor], tr[style*="background-color: rgb"], tr[style*="background-color:#ddd"] {
    background-color: #2F3F4F !important;
    border-color: #524B4B !important;
}

  body .ui-button
  {
    background: #282828 !important;
    border-color: #555 !important;
  }

table[style*="background-color:#fff;"], .search-form fieldset, table.ambox, tr[style*="background-color: #fff;"],
.mw-ui-button[style*="background-color:#008B6D"], tr[style*="background-color: #f5faff;"], tr[style*="background:#EF"], tr[style*="background:#FF"],
tr[style*="background:#E9E9E9"] > *, table.infobox.hproduct > tbody > tr[style*="background: #F0F0F0;"],
td[style*="background:lightgray"], td[style*="background:#f0f0f0"], td[style*="background:#eeeeff"], td[style*="background:#e8e8e8"],
td[style*="background:#ddddff"], td[style*="background:#efefef"], td[style*="background:#e9e9e9"], td[style*="background:#f1f1f1"],
.oo-ui-buttonElement-button:hover, .tracklist tr[style*="background-color:#f7f7f7"], caption[style*="background:#e3e3e3"] {
    background-color: #282828 !important;
}

  table.wikitable > tr > th, table.wikitable > * > tr > th, div.barbox > table > tbody > tr > th
  {
    background-color: #333;
 /* don't include !important flag */
  }

td[style*="background: #ececec;"], th[style*="background:#eee"], th[style*="background-color: #eee"],
tr[style*="background-color: #f7f7f7;"], th[style*="background:#F2F2F2"], th[style*="background:#ffffff"], #filetoc, .toccolours, th[style*="background:#F9F9F9"], th[style*="background:#e8e8e8"], table.plainlinks, th[style*="background-color: lightgrey"], th[style*="background:#ddd"], .infobox th[style*="background"], .infobox td[style*="background"],
td[style*="background:#F2F2F2"], table.wikitable > tbody > tr[style*="background-color:#F6F6F6"], td[style*="background:#e1e1e1"],
.tlheader {
    background-color: #333 !important;
}

  /* remove background image/gradient */
  .keyboard-key, div#editpage-specialchars a, body div.ui-dialog .ui-widget-header {
    background: #333 !important;
    border-color: #555 !important;
  }

  body .ui-button:hover {
    background: #444 !important;
    border-color: #555 !important;
  }
  /* add a white background to transparent images; see
   * https://forum.userstyles.org/discussion/48549/x */
 img[data-file-type*="drawing"][data-kiwixsrc*=".svg"], img[data-kiwixsrc*="Kiwix_logo"], a.image img, a[href*=".svg"] img, img.selogo {
    background: #ddd !important;
}

  /* white background to wikEd - see #24 */
  .wikEdFrameBodySyntax {
    background: #fff !important;
  }

blockquote[style*="white"] {
    background-color: black !important;
    color: lightgray !important;
}

.keyboard-key {
    box-shadow: 0.1em 0.2em 0.2em #444 !important;
}

  hr {
    background-color: #555 !important;
  }

  /*** Background Color Styles ***/
  /* Red */
  td[style*="background: #FDD;"], .table-no {
    background: #722 !important;
  }

  /* Green */
  #mp-left h2, #mp-left h2 span, td[style*="background: #99FF99;"], .table-yes {
    background: #244024 !important;
  }

  /* Blue */
div[style*="background"] h2, div[style*="background"] h2 *, #mp-right h2, #mp-right h2 span, .navbox th,
.navbox-title, .navbox-title *, tr[style*="background-color:tan;"],
div[style*="background: #444444;"], div[style*="background: #444444;"] *,
ol.references li:target, sup.reference:target, span.citation:target,
ol.references li:target *, sup.reference:target *, span.citation:target *,
td[style*="background:#CEDFF2"], tr[bgcolor="#CEDFF2"], table[style*="background-color:#cef2e0"] *,
div[style*="background-color: #cee0f2"], div[style*="background-color: #cedff2"] {
    background-color: black !important;
}

  .navbox-abovebelow, th.navbox-group, td.navbox-group, .navbox-subgroup .navbox-title,
  .navbox-abovebelow *, th.navbox-group *, .navbox-subgroup .navbox-title * {
    background-color: #212C43 !important;
  }

  /* Purple */
  #mp-bottom h2, #mp-bottom h2 span, th[style*="background:lavender"], td[style*="background:lavender"] {
    background-color: #382B4A !important;
  }

  /* Brown */
  #mp-center h2, #mp-center h2 span, .table-partial, tr[style*="background:orange"] {
    background-color: #321 !important;
  }

  /*** Border ***/
  fieldset {
    border-color: lightgray  !important;
  }

  div:not([style*="-color"]), div[style*="background-color"], span:not([class*="color"]),
  summary:not([style*="-color"]), table, tr:not([style*="border-bottom"]), th, td:not([style*="border-bottom"]),
  h1, h2, h3, h4, h5, h6, ul, li, input, select, #bodyContent code {
    border-color: #555 !important;
  }

td[style*="border-bottom"] {
    border-right-color: #555 !important;
    border-left-color: #555 !important;
    border-top-color: #555 !important;
  }

  .mwe-popups:before {
    border-bottom-color: #555 !important;
  }
  .mwe-popups.flipped_y:before, .mwe-popups.flipped_x_y:before,
  .wikiEditor-toolbar-dialog .ui-dialog-buttonpane {
    border-top-color: #555 !important;
  }
  .mwe-popups:after {
    border-bottom-color: #222 !important;
  }
  .mwe-popups.flipped_y:after, .mwe-popups.flipped_x_y:after {
    border-top-color: #222 !important;
  }

  div.vectorTabs li:not(.selected), .oo-ui-popupWidget-anchor:after,
  .oo-ui-popupWidget-head {
    border-bottom: #555 1px solid !important;
  }

  /* arrow down */
  .referencetooltip > li + li, .referencetooltip > li + li::after {
    border-top-color: #555 !important;
    border-right-color: transparent !important;
    border-left-color: transparent !important;
  }
  /* Bookmark Icon */
  #ca-watch.icon a {
    background-image: url('data:image/svg+xml,<%3Fxml%20version%3D"1.0"%20encoding%3D"UTF-8"%3F><svg%20xmlns%3D"http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg"%20width%3D"16"%20height%3D"16"><path%20d%3D"M8.103%201.146l2.175%204.408%204.864.707-3.52%203.431.831%204.845-4.351-2.287-4.351%202.287.831-4.845-3.52-3.431%204.864-.707z"%20fill%3D"transparent"%20stroke%3D"%237cb5d1"%20stroke-width%3D"1"%2F><%2Fsvg>') !important;
  }
  #ca-unwatch.icon a {
    background-image: url('data:image/svg+xml,<%3Fxml%20version%3D"1.0"%20encoding%3D"UTF-8"%3F><svg%20xmlns%3D"http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg"%20xmlns%3Axlink%3D"http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink"%20width%3D"16"%20height%3D"16"><defs><linearGradient%20id%3D"a"><stop%20offset%3D"0"%20stop-color%3D"%23c2edff"%2F><stop%20offset%3D".5"%20stop-color%3D"%2368bdff"%2F><stop%20offset%3D"1"%20stop-color%3D"%23fff"%2F><%2FlinearGradient><linearGradient%20x1%3D"13.47"%20y1%3D"14.363"%20x2%3D"4.596"%20y2%3D"3.397"%20id%3D"b"%20xlink%3Ahref%3D"%23a"%20gradientUnits%3D"userSpaceOnUse"%2F><%2Fdefs><path%20d%3D"M8.103%201.146l2.175%204.408%204.864.707-3.52%203.431.831%204.845-4.351-2.287-4.351%202.287.831-4.845-3.52-3.431%204.864-.707z"%20fill%3D"url%28%23b%29"%20stroke%3D"%237cb5d1"%20stroke-width%3D"1"%2F><%2Fsvg>') !important;
  }

  /* Orange */
  #centralNotice > div {
    border-color: #e08b26 !important;
  }

  table.ambox-content, table.ambox-style {
    border-left-color: #e08b26 !important;
  }

  /* add border */
  div.vectorTabs li, #p-cactions-label, .client-js #preftoc li {
    border-right: #555 1px solid !important;
  }
  div.vectorTabs li.selected, .client-js #preftoc li.selected {
    border-bottom: #e08b26 1px solid !important;
  }

  /*** Text ***/
  .wikitable tr:not([style*="color:black"]) th,
  table.wikitable > tbody > tr[style*="background-color:#F6F6F6"] > td > * {
    color: #fff !important;
  }

span[style*="color:black"] { 
    color: whitesmoke !important;
}

span[style*="color:#555"], span[style*="background-color:#EE"] {
    color: darkgray !important;
}

  .CategoryTreeEmptyBullet {
    color: #ccc !important;
  }

  /*** Misc ***/
  #p-cactions li.selected a, #p-cactions li a, #p-cactions li a:hover {
    padding: 0 1em 0.1em !important;
  }

ul, .portlet li {
    list-style-image: none !important;
    background-color: #000010 !important;
}

  table[style*="border:4px ridge"], .jfk-bubble-closebtn {
    border: none !important;
  }

  /*** invert images ***/
img[title="Wikipedia"], .bookshelf-container .bookend, img[class|="mwe-math-fallback-image"], img[class^="latex"], 
#mw-wsmfinal-close, img[data-kiwixsrc*="Speaker_Icon"], .infobox img[alt*="structure"][data-kiwixsrc*=".svg"], img[data-kiwixsrc*=".png"]:active,
img[data-kiwixsrc*=".svg"][height="16"], img[data-kiwixsrc*=".svg"][height="17"], img[data-kiwixsrc*=".svg"][height="18"], img[data-kiwixsrc*="Kiwix_icon"],
.oo-ui-iconElement-icon:not(.mw-echo-notifications-badge), .RTsettings, #gtx-host, .jfk-bubble-closebtn,
#pt-notifications-notice .mw-echo-notifications-badge:before, .oo-ui-pendingElement-pending,
#pt-notifications-alert .mw-echo-notifications-badge:before, .mw-ui-icon-arrow {
    -webkit-filter: invert(100%) !important;
    filter: invert(100%) !important;
    background-color: transparent !important;
}

.oo-ui-icon-bell {
    opacity: 0.7 !important;
}

/* Mathoverflow styles */
.comment {
    background-color: #111 !important;
}

#question, #comment, p.question, p.comment, .post-container, .tags ul {
    background-color: #222 !important;
}

div.tagsblob, .tagsblob ul, .tags li, .tags a, .post-tag, .nav-links--link {
    background: darkslategray !important;
}

a.button {
    background-color: darkslateblue !important;
}