:root {
  --text-color: #000;
  --text-red: #fc4343;
  --note-color: #fff9d8;
}

:root #dark {
  --text-color: #ddd;
  --text-red: #fc4343;
  --note-color: #fff9d8;
}

.dark-mode {
  background-color: #333 !important;
}

.dark-mode .icon {
  content: url('../images/sun_icon.svg') !important;
  width: 2rem;
  height: 2rem;
  filter: invert(89%) sepia(13%) saturate(499%) hue-rotate(345deg) brightness(107%) contrast(105%) !important;
}

.dark-mode:hover {
  background-color: var(--text-red) !important;
}

#toggle {
  color: var(--text-red);
  background-color: #fff;
  border: 1px solid var(--text-red);
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  margin: 1px;
  border-radius: 100%;
  cursor: pointer;
  transition: 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
}

body > #toggle:hover {
  background-color: var(--note-color);
}

#toggle .icon {
  content: url('../images/moon_icon.svg');
  width: 2rem;
  height: 2rem;
  filter: invert(37%) sepia(79%) saturate(2975%) hue-rotate(337deg) brightness(102%) contrast(98%);
}

body#dark {
  background-color: #222;
}

#dark p code, #dark ul code {
  background-color: #444;
  color: var(--text-color);
}

#dark pre, #dark code {
  color: #ddd;
}

#dark table {
  background: #222;
}

#dark tbody, #dark thead {
  border: 2px solid #666;
}

#dark table th {
  background-color: #333;
  border-bottom: 2px solid #666;
}

#dark table th, #dark table td {
  border: 1px solid #666;
}

#dark #container {
  color: var(--text-color);
}

#dark #feature {
  color: #eee;
  background: unset;
  background-color: #243440;
  border: 1px solid #d5e9f6;
  border-right: 0;
  border-left: 0;
}

#dark #feature ul li {
  background-size: 1.4em 1.4em;
  background-image: url(../images/check_icon.svg);
  background-position: left 0.5em;
}

#dark #mainCol a.anchorlink, #dark #mainCol a.anchorlink code {
  color: #eee;
}

#dark #mainCol a code, #dark #subCol a code, #dark #feature a code {
  color: var(--text-red);
}

#dark #mainCol a, #dark #subCol a, #dark #feature a {
  color: #ee3f3f;
}

#dark #subCol {
  background: #222;
  border: 1px solid #111;
}

#dark #subCol .chapters {
  color: var(--text-red);
}

#dark #subCol .chapters ul li {
  background-image: url(../images/bullet_dark.gif);
  background-size: auto !important;
}

#dark #subCol h3.chapter {
  padding-left:30px;
  background-image: url(../images/book_icon.svg);
  background-size: 1.25em;
  background-repeat: no-repeat;
}

#dark #subCol h3.chapter img {
  display: none;
}

#dark #mainCol div.warning, #dark #subCol dd.warning {
  border: 1px solid #f9d9d8;
  background-color: #482928;
  background-image: url(../images/hand_icon.svg);
  background-size: 28px 28px;
  background-position: 10px 12px;
  color: #f9d9d8;
}

#dark #footer {
  background-color: #000;
}

#dark .note code, #dark .info code, #dark .todo code {
  background-color: #555;
}

#dark .note {
  color: var(--note-color);
  border: 1px solid var(--note-color);
  background-color: #3e3b2c;
  background-image: url(../images/note_icon.svg);
  background-size: 28px 28px;
  background-position: 10px 10px;
}

#dark #mainCol dd.work-in-progress, #dark #subCol dd.work-in-progress {
  color: var(--note-color);
  border: 1px solid var(--note-color);
  background-color: #3e3b2c;
  background-image: url(../images/note_icon.svg);
  background-size: 28px 28px;
  background-position: 10px 10px;
}

#dark .info, #dark #subCol dd.kindle {
  border: 1px solid #d5e9f6;
  background-color: #243440;
  color: #d5e9f6;
  background-image: url(../images/info_icon.svg);
  background-size: 28px 28px;
  background-position: 10px 10px;
}

#dark .clipboard-button {
  color: #ddd;
  background-color: #222;
}

#dark div.code_container {
  background-color: #000;
  background-image: url(../images/cog_icon.svg);
  background-size: 28px 28px;
  background-position: 10px 14px;
  border: 1px solid #333;
}
