@import url('./visualizer.css');
@import url('./arrows.css');

@media print {
  #view {
    position: static !important;
  }
  #edit, menu {
    display: none;
  }
  article.card {
    page-break-inside: avoid;
  }
}

body {
  color: #000;
  --border: #aaa;
  --databox: #eee;
}

body {
  scrollbar-color: var(--border) var(--databox);
}
body ::-webkit-scrollbar {
  width: 4px;
}
body ::-webkit-scrollbar-thumb {
  background-color: var(--border);
}
body ::-webkit-scrollbar-track {
  background-color: var(--databox);
}

#view {
  font-family: Verdana, "Bitstream Vera Sans", "DejaVu Sans", Tahoma, Geneva, Arial, Sans-serif;;
  font-size: 12px;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: auto;
  padding: 1em 1.5em;
}

body.syntax #view {
  visibility: hidden;
}

#syntax {
  visibility: hidden;
}

body.syntax #syntax {
  visibility: visible;
}

body.loading:before {
  position: absolute;
  z-index: 10;
  top: 1em;
  left: 40%;
  width: 20%;
  overflow: hidden;
  text-align: center;
  content: "LOADING...";
  font-weight: bold;
  border: 1px solid #aaa;
  color: #000;
}
body.loading .card {
  opacity: 0.5;
}

body.edit #view {
  right: 50%;
}

#edit,
#syntax {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  overflow: auto;
}

#edit {
  left: 50%;
  visibility: hidden;
}

body.edit #syntax {
  right: 50%;
  left: 0%;
}

body.edit #edit {
  background-color: #eee;
}

body.edit #edit,
body.edit #syntax {
  box-shadow: 0px 0px 6px 2px rgba(0,0,0,0.4);
  padding: 0.2em;
}

body.edit #edit {
  visibility: visible;
}

#editor {
  visibility: hidden;
}

textarea {
  font-family: Courier;
  font-size: 12px;
  width: 99%;
  height: 90%;
}

body.edit #editor {
  visibility: visible;
}

#view article.card {
  float: left;
  overflow: auto;
}
body.edit #view article.card {
  float: none;
  max-height: inherit;
  overflow: auto;
}

body.edit #view article.card.graph {
  max-width: 99%;
}

#status {
  padding: 0 1em;
  z-index: 1;
  color: #888;
}
#status.error {
  background-color: #ffe;
  color: #b05;
}

menu {
  margin: 0;
  padding: 0 0.1em;
}

section#toggles {
  width: 45%;
  position: fixed;
  bottom: 1em;
  right: 1em;
  text-align: right;
}
section#toggles button {
  width: 2em;
  height: 2em;
  vertical-align: middle;
}
