.red {
  color: #f2c1c2 !important;
}

body,html {
  width: 100%;
  height: 100%;
  position: relative;
  margin:0;
  padding:0;
  overflow-x: hidden;


  font-size: 12pt;
  font-family: 'Vollkorn', 'Open Sans', serif;

  background-color: white;
  color: #404040;

  -moz-tab-size: 4;
  tab-size: 4;
}

.preventScroll {
  height:100%;
  overflow: hidden;
}

#app {
  padding-bottom: 2rem;
  box-sizing: border-box;
}

ion-icon[name="add-outline"] {
  width: 17px;
  height: 17px;
}
ion-icon{
  width: 19px;
  height: 19px;
}

.displayNone {
  display: none;
}

input, select, button {
  font-family: 'Open Sans';
}

label {
  color: #d8d8d8;
  font-family: 'Open Sans';
  font-size: 0.8rem;
}

label::after {content: ': ';}

button {
  border-width: 0;
  transition: background-color .1s;
  background-color: #8da7c1;
  color: white;
  font-weight: bold;
  border-radius: 0.2rem;
  padding: 0.2rem .5rem;
  cursor: pointer;
}
button:hover {
  background-color: #8da7c1cc;
}
button:active, button:focus  {
  border-width: 0;
  outline: none;
}
button:disabled {
  background-color: #e5e5e5;
  cursor: default;
}

hr {
  border: 1px solid #e5e5e5;
  border-top: 0;
  border-right: 0;
  border-left: 0;
}



details {
  margin: 1rem 0;
  border-radius: 0.5rem;
  outline: none;
  border: 1px solid #e5e5e5;
}

details > * {
  margin-left: 1rem;
  margin-right: 1rem;
}

details summary {
  cursor: pointer;
  font-weight: bold;
  outline: none;
  background: #f7f7f7;
  border-radius: 0.3rem;
  padding: 0.5rem 0.5rem;
  margin: 0;
}

details summary > * {
  display: inline;
}



.main-container {
  max-width: 46rem; /* 60rem is roughly 960px. A normal latex page would be something like 35rem */
  padding-left: 12rem;
  width: calc(90% - 12rem);
  margin: auto;
  position: relative;
}

.katex {
  font-size: 1rem !important;
}

.fl {
  float: left;
}

.fr {
  float: right;
}

.pointer {
  cursor: pointer;
}

.header {
  clear: both;
  overflow: hidden;
  box-sizing: border-box;
  border-bottom: 1px solid #e5e5e5;
  background-color: #fefefe;
  width: 100%;
  padding: 1rem;
  margin-bottom: 2rem;
}

.header h1 {
  display: inline-block;
  margin: 0;
  margin-top: 1rem;
}

.menu {
  z-index: 5;
  background: white;
  position: fixed;
  height: 100%;
}

.menu-list {
  border-right: 1px solid #e5e5e5;
  width: 2.5rem;
  height: 100%;
  padding: 0.5rem;
  box-sizing: border-box;
}

.menu-list ion-icon {
  width: 1.5rem;
  height: 1.5rem;
  cursor: pointer;
}

.menu-expanded {
  position: absolute;
  left: 100%;
  min-width: 8rem;
  padding: 0.5rem;
  top: 0;
  height: 100%;
  background: white;
  border-right: 1px solid #e5e5e5;
}

.menu-expanded .resizer {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 0.5rem;
  cursor: col-resize;
}

.file-explorer ul {
  padding: 0;
  list-style: none;
}

.file-explorer > ul ul {
  padding-inline-start: 0.5rem;
  margin-inline-start: 0.5rem;
  border-left: 1px solid #e5e5e5;
  margin-bottom: 0.3rem;
}

.file-explorer li {
  cursor: pointer;
  -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
      -khtml-user-select: none; /* Konqueror HTML */
        -moz-user-select: none; /* Old versions of Firefox */
        -ms-user-select: none; /* Internet Explorer/Edge */
            user-select: none; /* Non-prefixed version, currently
                                  supported by Chrome, Edge, Opera and Firefox */
}

.file-explorer li span:hover {
  background-color: #e5e5e5;
}

.file-explorer li span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.file-explorer li.open span {
  background-color: #ecf2f9;
}

.context-menu {
  position: absolute;
  top: 10rem;
  right: 10rem;
  z-index: 10;
  border: 1px solid lightgrey;
  border-radius: 0.3rem;
  font-family: 'Open Sans';
  font-size: 0.8rem;
  border-top-right-radius: 0;
}
.context-menu ul {
  margin: 0;
  padding: 0;
}
.context-menu li {   
  background-color: white; 
  padding: 0.4rem 1rem;
  border-bottom: 1px solid lightgrey;
  list-style: none;
  cursor: pointer;
  text-align: center;
}
.context-menu li:hover {
    background-color: #f3f3f3;
}


.notebookElements {
  margin-top: 1rem;
}

.notebook-component:first-child {
}
.notebook-component {
  border-bottom: 1px solid #e5e5e5;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  position: relative;
}
.notebook-component.paste-above::before {
  content: ' ';
  width: 100%;
  height: 2px;
  background: #404040;
  z-index: 20;
  position: absolute;
  top: -0.7rem;
}
.notebook-component.paste-below::after {
  content: ' ';
  width: 100%;
  height: 2px;
  background: #404040;
  z-index: 20;
  position: absolute;
  bottom: 0;
}


.notebook-component .notebook-component-header {
  /* transition: margin .25s, height .25s, opacity .25s; */
  /* transition-delay: 2s; */
  /* height: 0; */
  /* margin: 0; */
  /* overflow: hidden; */
}

.notebook-component:hover .notebook-component-header {
  /* height: 1rem;
  margin: .5rem 0;
  transition-delay: 0s; */
}


.notebook-shoulder-padding {
  width: 4rem;
  height: 100%;
  position: absolute;
  z-index: 0;
}
.notebook-shoulder-padding.leftof { left: -4rem; }
.notebook-shoulder-padding.rightof { right: -4rem; }

.notebook-component .name {
  color: #e5e5e5;
  font-size: 0.75rem;
  font-family: 'Roboto Mono';
}

.notebook-component-shoulder {
  position: absolute;
  top: 0.0rem;
  height: 100%;
}
.notebook-component-shoulder.leftof  { left:  -1.5rem; }
.notebook-component-shoulder.rightof { right: -1.5rem; }


.notebook-component-fold, 
.notebook-component-remove, 
.notebook-drag-handle, 
.notebook-lock-component {
  color: #404040;
  transition: color .1s;
  cursor: pointer;
}

.notebook-drag-handle {
  position: absolute;
  top: 0;
  right: 1.5rem;
  cursor: grabbing;
}

.notebook-lock-component {
  position: absolute;
  top: 0;
  right: 3rem;
  cursor: pointer;
}

.notebook-component-add {
  position: absolute;
  right: -1px;
  cursor: pointer;
}
.notebook-component-add.before {
  top: -17px;
}
.notebook-component-add.after {
  bottom: -14px;
}

.visibleOnComponentHover, .visibleOnComponentHover.shownOnHover {
  transition: opacity .25s;
  opacity: 0;
}
.shownOnHover {
  transition: opacity .25s;
  opacity: 0.25;
}



.notebook-component:hover .visibleOnComponentHover { opacity: 0.25; }
.notebook-component:hover .visibleOnComponentHover.op100 { opacity: 1; }
.shownOnHover:hover { opacity: 1; }


.notebook-component-remove:hover {
  color: #c4383a;
}

.notebook-component-content {
  margin-top: .5rem;
  min-height: 2rem;
}

.hidden-icon,.shown-icon { width: 1rem;}
.hidden-icon {
  position: relative;
  right: 0px;
}

/* .component {
  display: grid;
  grid-template-columns: 49.5% auto 49.5%;
  margin-bottom: 1rem;
}
.component .left, .component .right {
  
}
.component .left {
  grid-column: 1;
}
.component .right {
  grid-column: 3;
} */



.dot {
  max-width: 100%;
}
.graph {
}
.graph > svg {
  /* max-height: calc(100vh - 10rem); */
  width: 100%;
  /* height: 100%; */
}
.generic-component-graphviz {
  position: relative;
}
.generic-component-graphviz .icon {
  position: absolute;
  top: 0;
  right: 0;
  cursor: pointer;
}



h1:focus {
  outline: 0;
  border-bottom: 2px dotted;
}

ion-icon {
  vertical-align: text-top;
}

a {
  color: #597fa6;
}



.markdownDisplay table {
  border-collapse: collapse;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-left: none;
  border-right: none;
  margin: 0 auto;
  margin-block-start: 17px;
  margin-block-end: 17px;
}

.markdownDisplay table > thead {
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}

.markdownDisplay table > tbody td {
  font-family: Roboto Mono, monospace;
  font-size: 0.75rem;
}

.markdownDisplay table td,
.markdownDisplay table th {
  padding: 0.2rem 0.5rem;
}

.markdownDisplay table > tbody tr:hover {
  background-color: rgba(224, 203, 158, 0.15);
}
.markdownDisplay table pre {
  white-space: pre;
}


.markdownDisplay pre > code {
  display: block;
}
.markdownDisplay code {
  display: inline-block;
  padding: .2rem .4rem;
}

.markdownDisplay code,
.markdownDisplay pre > code {
  padding: .2rem;
  background-color: #fefcf5;
  color: #434f54;
  border: 1px solid #e5e5e5;
  font-size: .8rem;
  border-radius: .2rem;
  vertical-align: text-top;
}

.CodeMirror {
  height: auto;

  background: #fefcf5;
  border: 1px solid #e5e5e5;
  border-radius: 0.2rem;
  font-size: .8rem;
  color: #404040;

  font-family: 'Roboto Mono', monospace;
}

.CodeMirror.disabled {
  background-color: #fafaf9;
}

.CodeMirror-scroll {
  height: auto;
}

.clear {
  clear:both;
}

.hide {
  display: none;
}

.toggle {cursor: pointer;}

.toggle.enabled  .enabled-icon,
.toggle.disabled .disabled-icon {
  display: inline-block;
}

.toggle.disabled .enabled-icon,
.toggle.enabled  .disabled-icon {
  display: none;
}

.toggle.enabled:hover  .disabled-icon,
.toggle.disabled:hover .enabled-icon {
  display: inline-block;
}

.toggle.disabled:hover .disabled-icon,
.toggle.enabled:hover  .enabled-icon {
  display: none;
}

.minimalistInput {
  transition: border-color .25s;
  border: 1px solid transparent;
  border-right: 0;
  border-top: 0;
  border-left: 0;
  font-family: 'Roboto Mono', monospace;
  font-size: .8rem;
  color: #8da7c1;
  outline: 0;
  border-color: #e5e5e5 !important;
}

.minimalistInput::placeholder {
  opacity: 0.25;
  transition: opacity .25s;
}

.minimalistInput:hover {
  border-color: #c0c0c0 !important;
}

.minimalistInput:focus {
  border-color: #c0c0c0 !important;
}
.minimalistInput:focus::placeholder { opacity: 5; }


.displayMode .notebook-component {
  border: 0;
  margin: 0;
  padding: 0;
}

.displayMode .hideInPrintAndDisplay {
  display:none;
}

ion-icon { 
  pointer-events: none; /* disable hover text on icons */
}


@media print{
  .hideInPrint, .hideInPrintAndDisplay {
    display:none;
  }
  .notebook-component {
      border: 0;
      margin: 0;
      padding: 0;
  }
  .main-container {
    padding-left: 0;
    width: 16cm;
  }
  body { 
    overflow: auto;
    height: auto; 
    overflow: visible;
  }
  .CodeMirror {
    /* Override locked color */
    background: #fefcf5 !important; 
  }
}