/**
 * This theme changes the basic styles to display content, 
 * because the font and layout from the original hugo-theme-learn is very hard to read.
 * Styles inspired by poole.css (from the Jekyll theme),
 * but adapted to also reset some bad styles from the hugo-theme-learn theme.
 */

/*
 * Body resets
 *
 * Update the foundational and global aspects of the page.
 */

* {
  -webkit-box-sizing: border-box;
     -moz-box-sizing: border-box;
          box-sizing: border-box;
}

html,
body {
  font: normal 16px -apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
  margin: 0;
  padding: 0;
  line-height: 1.75;
}

@media (min-width: 38em) {
  html,
  body {
    font-size: 16px;
  }
}

body {
  color: #24292e;
  background-color: #fff;
}

/* No `:visited` state is required by default (browsers will use `a`) */
a {
  color: #0366d6;
  text-decoration: none;
}
/* `:focus` is linked to `:hover` for basic accessibility */
a:hover,
a:focus {
  color: #0366d6;
  text-decoration: underline;
}

.anchor {
  color: #0366d6;
  font-size: 0.6em;
  cursor: pointer;
  visibility: hidden;
  margin-left: 0.5em;
  position: absolute;
  margin-top: 0.5em;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  margin: 1.5rem 0 .75rem 0;
  line-height: 1.25;
  color: #24292e;
  text-rendering: optimizeLegibility;
  font-weight: 600;
  letter-spacing: 0;
}
h1 {
  font-size: 1.8rem;
  text-align: left;
  text-transform: none;
  font-weight: 600;
}
h2 {
  font-size: 1.6rem;
}
h3 {
  font-size: 1.4rem;
}
h4, h5, h6 {
  font-size: 1rem;
}

/* Body text */
p {
  margin: 0 0 0.75em 0;
  color: black;
}

strong {
  font-weight: 600;
  color: #24292e;
}


/* Lists */
ul, ol, dl {
  margin-top: 0;
  margin-bottom: 1rem;
}
ul ul,
ul ol,
ol ul,
ol ol {
  margin-bottom: 0; 
}

dt {
  font-weight: bold;
}
dd {
  margin-bottom: .5rem;
}

/* Misc */
hr {
  position: relative;
  margin: 1.5rem 0;
  border: 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #fff;
}

abbr {
  font-size: 85%;
  font-weight: bold;
  color: #666;
  text-transform: uppercase;
}
abbr[title] {
  cursor: help;
  border-bottom: 1px dotted #e5e5e5;
}

/* Code */
code,
pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
}
code {
  padding: .2em .5em;
  color: #24292e;
  margin: 0;
  font-size: .8rem;
  background-color: rgba(27,31,35,0.05) !important;
  border-radius: 3px;
  border: none;
}
pre {
  display: block;
  margin-top: 0;
  margin-bottom: 1rem;
  padding: 1rem;
  font-size: .8rem;
  line-height: 1.4;
  white-space: pre;
  white-space: pre-wrap;
  word-break: break-all;
  word-wrap: break-word;
  color: #24292e;
  background-color: rgba(27,31,35,0.05) !important;
}
pre code {
  padding: 0;
  color: #24292e;
  background-color: transparent !important;
  font-size: .8rem;
}
.highlight {
  margin-bottom: 0.5rem;
  border-radius: 4px;
}
.highlight pre {
  margin-bottom: 0;
}

/* Quotes */
blockquote {
  padding: 0 1rem;
  margin: 0 0 1rem 0;
  color: #6a737d;
  border-left: .25rem solid #e5e5e5;
}
blockquote p {
  font-size: 1em;
  color: #6a737d;
}
blockquote cite {
  display: block;
  text-align: right;
  color: #6a737d;
}
blockquote p:last-child {
  margin-bottom: 0;
}

img {
  display: block;
  margin: 0 0 1rem;
  border-radius: 5px;
  max-width: 100%;
}

/* Tables */
table {
  margin-bottom: 1rem;
  width: 100%;
  border: 1px solid #e5e5e5;
  border-collapse: collapse;
}
td,
th {
  padding: .25rem .5rem;
  border: 1px solid #e5e5e5;
}
tbody tr:nth-child(odd) td,
tbody tr:nth-child(odd) th {
  background-color: #f9f9f9;
}

/* Content layout */

#body-inner {
  max-width: 900px; /* limit the line length for readability */
}

#body-inner code { vertical-align: inherit; }

#body .padding {
  padding: 1rem 6rem 3rem 6rem;
}

#top-bar {
  min-height: 2rem;
  margin: 0rem -1rem 2rem;
}
#body #breadcrumbs {
  height: 1rem;
  line-height: 1;
}

/* Menu */

:root{
  --MENU-HEADER-BG-color: #4b367c; /* Background color of menu header */
  --MENU-HEADER-BORDER-color: #b19dd8; /*Color of menu header border */
  --MENU-SEARCH-BG-color: #4b367c; /* Search field background color (by default borders + icons) */
  --MENU-SEARCH-BOX-color:  #b19dd8; /* Override search field border color */
  --MENU-SEARCH-BOX-ICONS-color: #b19dd8; /* Override search field icons color */

  --MENU-SECTIONS-BG-color: #2c2541; /* Background color of other sections */
  --MENU-SECTIONS-LINK-color: #fff; /* Color of links in menu */
  --MENU-SECTIONS-LINK-HOVER-color: #f9f8fc;  /* Color of links in menu, when hovered */
  --MENU-SECTIONS-LINK-HOVER-BG-color: #392e5c;
  --MENU-SECTION-ACTIVE-CATEGORY-color: #f9f8fc; /* Color of active category text */
  --MENU-SECTION-ACTIVE-CATEGORY-BG-color: #4b367c; /* Color of background for the active category (only) */

  --MENU-VISITED-color: #33a1ff; /* Color of 'page visited' icons in menu */
  --MENU-SECTION-HR-color: #433f4a; /* Color of <hr> separator in menu */
}

#sidebar ul li.visited > a .read-icon {
  color: var(--MENU-VISITED-color);
}

#sidebar {
  font-weight: normal;
  background-color: var(--MENU-SECTIONS-BG-color);
}
#sidebar #header-wrapper {
  background: var(--MENU-HEADER-BG-color);
  color: var(--MENU-SEARCH-BOX-color);
  border-bottom: 1px solid var(--MENU-HEADER-BORDER-color);
}
#sidebar #header h1 {
  margin: 0;
  font-size: 20px;
  font-weight: normal;
  color: white !important;
  text-align: center;
  font-weight: normal;
}
#sidebar .searchbox {
  border-color: var(--MENU-SEARCH-BOX-color);
  background: var(--MENU-SEARCH-BG-color);
}
#sidebar .searchbox * {
  color: var(--MENU-SEARCH-BOX-ICONS-color);
}

#sidebar ul.topics > li.parent, 
#sidebar ul.topics > li.active {
  background: inherit;
}
#sidebar ul.topics > li > a {
  line-height: 1.6rem;
  font-size: 1.2em;
}
#sidebar .topics a {
  color: var(--MENU-SECTIONS-LINK-color);
  margin-left: -1rem;
  margin-right: -1rem;
  padding-left: 1rem !important;
  padding-right: 1rem !important;
  font-size: 1.05em;
}

#sidebar .topics a:hover {
  background: var(--MENU-SECTIONS-LINK-HOVER-BG-color);
  color: var(--MENU-SECTIONS-LINK-HOVER-color);
  text-decoration: underline;
}
#sidebar .topics li.active > a {
  background: var(--MENU-SECTION-ACTIVE-CATEGORY-BG-color);
  color: var(--MENU-SECTION-ACTIVE-CATEGORY-color) !important;
}

#sidebar hr {
  border-color: var(--MENU-SECTION-HR-color);
}

#sidebar #footer {
  font-size: 0.7rem;
  color: var(--MENU-SECTIONS-LINK-color) !important;
}
#sidebar #footer a {
  color: var(--MENU-SEARCH-BOX-color);
}
#sidebar #footer a:hover {
  color: var(--MENU-SECTIONS-LINK-HOVER-color);
  text-decoration: underline;
}

#sidebar a { color: white; }

pre .copy-to-clipboard { background-color: #f5f2f0; }

#navigation a {
 color: #f0f0f3;
}
