.CodeMirror, .inlineExample { line-height: 1.5; border: 1px solid black; background: #f8f8f8; color: #eee; }
.replMain .CodeMirror {
  line-height: 1.3;
  border-top: none;
  border-bottom: none;
}
.repl .CodeMirror {
  background-color: hsl(0,0%,95%);
  line-height: 1.3;
  border: none;
  padding: 0;
  margin: 0;
  padding-bottom:2px;
}
.repl .CodeMirror-lines {
  padding: 0;
}
.repl .CodeMirror pre {
  padding: 0;
}
.CodeMirror div.CodeMirror-cursors { z-index: 9500; }
.CodeMirror div.CodeMirror-cursor { border-left: 2px solid #111; }
.cm-s-default.CodeMirror { color: black; }
.cm-s-default .cm-comment { color: #cd7054; }
.cm-s-default .cm-boolean { color: darkred; }
.cm-s-default .cm-builtin { color: #555; }
.cm-s-default .cm-function-name { color: #374049; }
.cm-s-default .cm-variable { color: #4d5966; }
.cm-s-default .cm-keyword { color: black; font-weight: bold; }
.cm-s-default .cm-number { color: navy; }
.cm-s-default .cm-roughnum { color: blue; }
.cm-s-default .cm-bad-number { color: red; font-weight: bold; }
.cm-s-default .cm-string { color: forestgreen; }
.cm-s-default .cm-unterminated-string { color: red; font-weight: bold; }
.cm-s-default .cm-type { color: #374049; }
.cptteach-fixed { line-height: 1.5; background: #ddd; }
.cm-s-default .rationalNumber, .cm-s-default .rationalNumber .cm-number { color: #af1180; }
.cm-s-default .rationalRepeat { text-decoration: overline; }

div.CodeMirror-selected,
span.CodeMirror-selectedtext {
  background-color: #ccc!important;
}

.CodeMirror-matchingbracket {
  position: relative;
}

.CodeMirror-matchingbracket::before {
  content: "";
  position: absolute;
  height: 100%;
  width: 100%;
  border: 0px solid rgb(90, 149, 217);
  z-index: 1000;
}

.CodeMirror-matchingbracket.open::before {
  border-width: 0.3ex 0px 0px 0.3ex;
  border-top-left-radius: 0.4ex;
  margin: -0.3ex;
}

.CodeMirror-matchingbracket.close::before {
  border-width: 0px 0.3ex 0.3ex 0px;
  border-bottom-right-radius: 0.4ex;
  margin: 0.3ex;
}




div.CodeMirror span.CodeMirror-matchingbracket-region {
  position: relative;
  background-color: hsl(220, 100%, 95%);
  border-top: 0.1em solid hsl(220, 100%, 95%);
  border-bottom: 0.1em solid hsl(220, 100%, 95%);
}

div.CodeMirror span.CodeMirror-matchingbracket-region:last-of-type {
    box-shadow: 0.5em 0 0.25em hsl(220, 100%, 95%);
}
div.CodeMirror span.CodeMirror-matchingbracket-region:first-of-type {
    box-shadow: -0.5em 0 0.25em hsl(220, 100%, 95%);
}
div.CodeMirror span.CodeMirror-matchingbracket-region:first-of-type:last-of-type {
    box-shadow: -0.5em 0 0.25em hsl(220, 100%, 95%), 0.5em 0 0.25em hsl(220, 100%, 95%);
}
div.CodeMirror span.CodeMirror-matchingbracket.open {
  box-shadow: -0.3ex 0 0.3ex hsl(220, 100%, 95%);
}
div.CodeMirror span.CodeMirror-matchingbracket.open:last-of-type {
  box-shadow: 0.5em 0 0.25em hsl(220, 100%, 95%), -0.3ex 0 0.3ex hsl(220, 100%, 95%);
}
div.CodeMirror span.CodeMirror-matchingbracket.close {
  box-shadow: 0.3ex 0 0.3ex hsl(220, 100%, 95%);
}
div.CodeMirror span.CodeMirror-matchingbracket.close:first-of-type {
  box-shadow: -0.5em 0 0.25em hsl(220, 100%, 95%), 0.3ex 0 0.3ex hsl(220, 100%, 95%);
}

div.CodeMirror span.CodeMirror-matchingbracket {
  font-weight: 600;
  color: initial;
}


div.CodeMirror span.CodeMirror-nonmatchingbracket {
  font-weight: bold;
  background-color: #fdd;
  color: #e11;
}

div.CodeMirror span.CodeMirror-nonmatchingbracket-region {
  background-color: #fdc;
  border-top: 0.1em solid #fdd;
  border-bottom: 0.1em solid #fdd;
  z-index: 4000;
}

#REPL {
  font-family: sans-serif;
}

.replTextOutput .CodeMirror {
  border: none;
  background-color: transparent;
}

#output {
  font-family : monospace;
}

.inlineExample {
    font-family: monospace;
    padding: 0 2px;
}

/* from http://codemirror.net/demo/resize.html */
.CodeMirror {
  height: auto;
}

.CodeMirror-scroll {
  overflow-y: scroll;
  overflow-x: auto;
  height: auto;
}


.replMain .CodeMirror {
  height: 100%;
  box-sizing: border-box;
  -moz-box-sizing: border-box;
}
.replMain .CodeMirror-scroll {
  height: 100%;
}

.repl {
  padding-left: 0.5em;
  height: 100%;
  overflow-y: scroll;
  background-color: #f8f8f8;
  cursor: text;
}
.check {
  font-family: monospace;
  border: 1px solid black;
  border-radius: 3px;
  padding: 10px;
  margin: 10px;
}

.check-success {
  background-color: #cfc;
}

.check-failure {
  background-color: #fcc;
}

.check-block {
  background-color: #ddd;
  border: 1px solid black;
  border-radius: 3px;
  margin: 5px;
  padding: 5px;
}

.check-block-failed {
  background-color: #fcc;
}

.check-block-success {
  background-color: #cfc;
}

.repl-output {
  padding: 0;
  margin: 0;
}

.steppedGutter {
    width: 25px;
}


.progressContainer {
    width: 90%;
    height: 2em;
    padding: 5px;
    text-align: center;
}

.progressStep {
    display: inline-block;
    vertical-align: top;
    height: 10px;
    border: 1px solid black;
}

.progressStep.done {
    background-color: green;
}

.progressDone {
    color: green;
    font-style: italic;
    text-align: center;
    width: 50%;
    margin: auto;
}

.steppedGutterPart {
    width: 25px;
    padding-right: 3px;
}

.instructionsWidget {
    background-color: #fcf;
    border: 1px dotted #c0c;
    color: #111;
    padding: 3px;
    margin: 5px;
    cursor: pointer;
    margin: 5px 5px 5px auto;
}

.instructionsWidget.hidden {
    width: 90px;
}

.instructionsWidget .instructionsContent {
    font-family: serif;
}

.instructionsWidget .toggleInstructions {
    color: #666;
    float: right;
    font-size: 0.8em;
    padding: 3px;
}

.prompt-container {
  padding-top: 5px;
}
.echo-container {
  padding-top: 5px;
}

.repl-prompt {
  width: 90%;
  display: inline-block;
}

.repl-prompt-arrow {
  font-family: monospace;
  vertical-align: top;
  display: inline-block;
  line-height: 1.3;
}

.repl-echo {
  width: 90%;
  display: inline-block;
}

body {
  margin: 0;
  padding: 0;
}

.replMain {
  position: absolute;
  z-index: 7000;
  left: 0;
  width: 50%;
  top:0;
  height: 100%;
  max-height: 100%;
  padding-top: 75px;
  padding-bottom: 5px;
  box-sizing: border-box;
  -moz-box-sizing: border-box;
  margin:0;
}

.replContainer {
  position: absolute;
  z-index: 7000;
  right: 0;
  width: 50%;
  top:0;
  height: 100%;
  max-height: 100%;
  padding-top: 80px;
  padding-bottom: 5px;
  box-sizing: border-box;
  -moz-box-sizing: border-box;
  margin:0;
}

.replContainer.maximized {
    width: 90%;
    z-index: 9000;
}

.replContainer.minimized {
    margin-right: -35%;
}

.blueButton {
    font-family: sans-serif;
/*  darker blue option #2a348b */
    background-color: #469ad4;
    border: 1px solid #469ad4;
    border-radius: 3px;
    color: #eee;
    text-align: center;
}

.blueButton:hover {
    background-color: #eee;
    color: #469ad4;
    cursor: pointer;
}

.blueButton:disabled {
    background-color: #9cc;
    border: 1px solid #9cc;
    color: #ddd;
    cursor: default;
}


.runButton {
    width: 50px;
}

#loader {
  position: fixed;
  left: 0px;
  top: 0px;
  width: 100%;
  height: 100%;
  z-index: 9999;
  background: url('./../../img/pyret-spin.gif') 50% 50% no-repeat rgb(249,249,249);
  background-size: 200px 200px;
}

#loader p {
  position: fixed;
  top: 20%;
  text-align: center;
  width: 100%;
}

#header {
  position: fixed;
  z-index: 9000;
  top: 0;
  width: 100%;
  height: 50px;
  background: url("./../../img/patch-logo.png") 0 0 no-repeat #2a348b;
  background-size: 150.15px 50px;
  padding-left: 200px;
}

#header div {
  width: 100px;
  margin-top: 15px;
  float: left;
  padding-right: 2em;
}

#header a {
  color: #eee;
  font-family: sans-serif;
}

#main {
  width: 100%;
  z-index: 5000;
  height: 100%;
  padding-top: 75px;
  padding-bottom: 5px;
  box-sizing: border-box;
  -moz-box-sizing: border-box;
}

#toolbar {
  position: fixed;
  z-index: 8000;
  top: 50px;
  height: 25px;
  width: 100%;
  background-color: #111;
}

#footer {
  height: 5px;
  background-color: #111;
  position: fixed;
  bottom: 0;
  width: 100%;
}

#program-name-container {
  color: #eee;
  float: left;
  font-family: sans-serif;
}

#saveButton {
  float: left;
}
#shareButton {
  float: left;
}

.rhs {
  float: right;
}

.replPrint {
  padding-top: 0;
  padding-bottom: 0.5em;
  padding-left: 0.5em;
  color: #111;
}

.replOutput {
  padding-top: 0;
  padding-bottom: 0.5em;
  color: #1f1180;
}

.replImageThumbnail canvas {
  cursor: pointer;
  border: 1px solid #111;
  margin: 1px;
}

.replImageThumbnail canvas:hover {
  cursor: pointer;
  border: 2px solid #111;
  margin: 0px;
}

.error-highlight {
  background-color: #FCC;
  border-bottom: 2px solid #F33;
}

.compile-error {
  font-family: sans-serif;
  border: 1px solid #F33;
  border-radius: 1em;
  padding: 1em;
}

.compile-error:hover {
  background-color: #FCC;
}

.compile-error .code {
  font-family: monospace; 
}

.compile-error .srcloc {
  font-family: monospace; 
}

.warning-upper {
   position: absolute;
   top: 0;
   width: 100%;
   text-align: center;
   display:none;
   background: -moz-linear-gradient(top,  rgba(221,44,44,1) 0%, rgba(145,78,78,0) 50%); /* FF3.6+ */
   background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(221,44,44,1)), color-stop(50%,rgba(145,78,78,0))); /* Chrome,Safari4+ */
   background: -webkit-linear-gradient(top,  rgba(221,44,44,1) 0%,rgba(145,78,78,0) 50%); /* Chrome10+,Safari5.1+ */
   background: -o-linear-gradient(top,  rgba(221,44,44,1) 0%,rgba(145,78,78,0) 50%); /* Opera 11.10+ */
   background: -ms-linear-gradient(top,  rgba(221,44,44,1) 0%,rgba(145,78,78,0) 50%); /* IE10+ */
   background: linear-gradient(to bottom,  rgba(221,44,44,1) 0%,rgba(145,78,78,0) 50%); /* W3C */
}

.warning-lower {
   background: -moz-linear-gradient(top,  rgba(145,78,78,0) 50%, rgba(221,44,44,1) 100%); /* FF3.6+ */
   background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(145,78,78,0)), color-stop(100%,rgba(221,44,44,1))); /* Chrome,Safari4+ */
   background: -webkit-linear-gradient(top,  rgba(145,78,78,0) 50%,rgba(221,44,44,1) 100%); /* Chrome10+,Safari5.1+ */
   background: -o-linear-gradient(top,  rgba(145,78,78,0) 50%,rgba(221,44,44,1) 100%); /* Opera 11.10+ */
   background: -ms-linear-gradient(top,  rgba(145,78,78,0) 50%,rgba(221,44,44,1) 100%); /* IE10+ */
   background: linear-gradient(to bottom,  rgba(145,78,78,0) 50%,rgba(221,44,44,1) 100%); /* W3C */
   position: absolute;
   bottom: 0;
   width: 100%;
   text-align: center;
   display:none;
}

.topbar {
  position: fixed;
  width: 100%;
  background-color: #eee;
}

/* From internet: http://stackoverflow.com/questions/5663137/jquery-modal-dialog-is-hidden-by-overlay-div-if-dialogs-parent-has-fixed-positi */
.ui-widget-overlay{
  position:fixed;
  z-index: 9500;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  opacity: 0.5;
  background: #111;
}
/* end from internet */

.ui-dialog {
  border: 2px solid #111;
  background-color: #eee;
  border-radius: 5px;
  z-index: 10000;
}

.ui-dialog-titlebar {
  background-color: #2a348b;
}

.ui-dialog-title {
  color: #eee;
  font-family: sans-serif;
  position: relative;
  left: 30px;
}

.ui-dialog-titlebar-close {
  position: relative;
  left: 5px;
  top: 5px;
}

.ui-dialog-titlebar-close .ui-button-text {
  display: none;
}

.ui-dialog-titlebar-close .ui-button-icon-primary:before {
  content: "×"
}

