@keyframes blink {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes push-appear {
  from {
    opacity: 0;
    bottom: 8px;
  }
  to {
    opacity: 1;
    bottom: 42px;
  }
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Space Grotesk", "Arial", sans-serif;
  margin: 0;
  font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Space Grotesk", monospace;
}

.latex {
  font-size: 20px;
}

.title {
  font-weight: bold;
}

.form-section {
  display: flex;
  margin: 8px 8px 0 8px;
}

.input-control {
  display: flex;
  flex-direction: column;
}

form[name="postJournal"] {
  flex-basis: 70%;
}

.option-aside {
  flex-basis: 30%;
  padding: 0 5px 5px 5px;
}

form[name="linkOption"] {
  display: none;
}

#container  {
  width: 70%;
  padding-bottom: 35px;
  line-height: 1.3;
  margin: 8px;
  float: left;
}

form input, form button {
  font-family: "Space Grotesk", monospace;
  font-size: 16px;
  margin: 5px;
  border: 1px solid #222222;
  border-radius: 5px;
}

form button {
  background-color: #084177;
  color: #fff;
  padding: 2px 5px 0 5px;
}

button img {
  width: 12px;
}

[name="longcode"] {
  padding-right: 0;
  padding-top: 0;
}

[name="language"] {
  border: 1px solid #000;
}

form textarea {
  font: 16px "Space Grotesk", monospace;
  border: 1px solid #222222;
  border-radius: 5px;
  padding: 3px;
  margin: 5px;
  width: 99%;
  height: 100px;
}

form button input {
  width: 50px;
  border: none;
  margin-top: 0;
}

.format-nav {
  display: flex;
  flex-direction: row;
}

.format-nav button {
  margin: 2px;
}

#container img {
  width: 50%;
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2),
              0 3px 6px 0 rgba(0, 0, 0, 0.19);
  border: 20px solid #eee;
}

.post, form, .tags {
  border: 1px solid #222222;
  border-left: 10px solid #d7686d;
  
  border-radius: 5px;
  box-sizing: border-box;
  
  /* box-shadow: 10px 10px 5px 0px rgba(0,0,0,0.75); */
  
  padding: 5px;
  margin: 5px 0 15px 0;
  max-height: 30rem;

  line-height: 1.5;
  
  overflow-y: auto;
  overflow-x: hidden;
}

form {
  margin: 5px 0;
  box-shadow: none;
  position: relative;
}

.post:hover {
  box-shadow: none;
}

form p {
  font-family: "Space Grotesk", monospace;
  font-size: 16px;
  margin: 7px 0 0 0;
}

.post p, .post ul li, .post ol li {
  line-height: 1.5;
}

pre code {
  font: 14px "Roboto Mono", monospace;
  white-space: pre-wrap;
  line-height: 1.7;
  max-height: 162px;
  overflow-y: auto;
  border: 1px solid #fff;
}

pre code::after {
  content: "\A\A";
  white-space: pre;
}

code, kbd {
  font-family: "Roboto Mono", monospace;
  font-weight: bold;
  cursor: pointer;
  border-radius: 5px;
  border: 1px solid #fff;
}

blockquote, .title {
  font-family: "Space Grotesk", monospace;
  margin-left: 0;
  border-left: 10px solid #222222;
  padding-left: 10px;
}

.date {
  font-family: "Space Grotesk", monospace;
  font-size: 16px;
  font-style: italic;
  font-weight: normal;
  margin: 0;
}

.date::before {
  content: "•";
}

.source {
  margin-bottom: 0;
}

.source strong {
  font-family: "Space Grotesk", monospace;
  font-size: 16px;
  font-weight: bold;
}

ul {
  padding-left: 1rem;
  margin: 0;
}

.date::after {
  content: "|";
  font-style: normal;
  animation: blink 1s infinite;
}

#navbar, #back-trigger, #push-trigger {
  background-color: #084177;
  margin: 0;
  padding: 0;
  list-style: none;
  position: fixed;
  right: 8px;
  bottom: 8px;
  overflow: hidden;
  z-index: 10;
}

.nav-item img {
  width: 18px;
}

#back-trigger {
  z-index: 7;
  white-space: nowrap;
  transition: all 0.5s ease;
  opacity: 0;
  overflow: hidden;
}

#navbar {
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

#navbar li {
  display: grid;
  place-items: center;
  padding: 5px;
}

.nav-item {
  font: bold 20px "Space Grotesk", monospace;
  text-decoration: none;
  color: #fff;
  cursor: pointer;
}

#push-trigger {
  font: 16px "Space Grotesk", monospace;
  width: 300px;
  padding: 8px;
  bottom: 48px;
  text-decoration: none;
  color: #fff;
  z-index: 5;
  transition: all 0.5s ease;
  animation: push-appear 0.5s ease;
}

#close-push-trigger {
  float: right;
  cursor: pointer;
}

#back-trigger a {
  font-size: 20px;
}

/* The side navigation menu */
.sidenav {
  font-family: "Roboto Mono", monospace;
  height: 100%; /* 100% Full-height */
  width: 0; /* 0 width - change this with JavaScript */
  position: fixed; /* Stay in place */
  z-index: 6; /* Stay on top */
  top: 0; /* Stay at the top */
  right: 0;
  background-color: #084177;
  overflow-x: hidden; /* Disable horizontal scroll */
  padding-top: 12px; /* Place content 60px from the top */
  transition: 0.5s; /* 0.5 second transition effect to slide in the sidenav */
}

/* The navigation menu links */
/* .sidenav a {
  padding: 8px 8px 8px 32px;
  text-decoration: none;
  font-size: 20px;
  color: #999999;
  display: block;
  transition: 0.3s;
} */

/* .sidenav input {
  font: bold 13px "Roboto Mono", monospace;
  margin-left: 5%;
  width: 80%;
  background-color: #fff;
  padding: 8px;
  border: none;
} */

#query {
  margin: 10px 0 0 5%;
  color: #fff;
}

.tag-search, .date-section, .tag-suggestion {
  font-family: "Space Grotesk", monospace;
  font-size: 14px;
  font-style: italic;
  font-weight: normal;
  padding: 2px 5px;
  cursor: pointer;
  margin: 5px 2px;
  border-radius: 5px;
  color: #fff;
  border: 1px solid #000;
}

.date-section {
  background-color: #7e1f24;
}

.tag-search, .tag-suggestion {
  background-color: #084177;
}

/* When you mouse over the navigation links, change their color */
.sidenav a:hover {
  color: #f1f1f1;
}

/* Position and style the close button (top right corner) */
.sidenav .closebtn {
  position: absolute;
  top: 0;
  right: 5px;
  font-size: 36px;
  margin-left: 50px;
}

/* Style page content - use this if you want to push the page content to the right when you open the side navigation */
#main {
  transition: margin-left .5s;
  padding: 20px;
}

form {
  background-color: #fff;
  padding: 5px 3px;
  z-index: 5;
}

.tag-results, #tag-queries {
  font-weight: bold;
  overflow-y: auto;
  overflow-x: auto;
  display: flex;
  width: 100%;
  /*transform: rotate(90deg);*/
  /*transform-origin: right top;*/
  font-family: "Roboto Mono", monospace;
}

.tags {
  margin-bottom: 10px;
}

.dark-mode .tag-search,
.dark-mode .tag-suggestion,
.dark-mode input,
.dark-mode textarea,
.dark-mode button,
.dark-mode .date-section,
.dark-mode button input {
  border: 1px solid #fff;
  background-color: #0d83f1;
}

.dark-mode,
.dark-mode form,
.dark-mode input,
.dark-mode textarea {
  background-color: #000;
  color: #fff;
}

.dark-mode form,
.dark-mode .post,
.dark-mode .tags {
  border: 1px solid #fff;
  border-left: 10px solid #e79599;
}

.dark-mode .post a {
  color: #fff;
  font-weight: bold;
}
