@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,600);
@import url(https://fonts.googleapis.com/css?family=Droid+Sans+Mono);
@import url(https://fonts.googleapis.com/css?family=Gentium+Basic&text=Symja%20Talk);

body {
  font-family: 'Open Sans', sans-serif;
  font-size: 100%;
  padding: 0;
  margin: 0;
  background-color: #EEE;
}

pre, ul, button, h2, h3, h4, input, label {
  margin: 0;
  padding: 0;
}

pre {
  font-family: "Droid Sans Mono", monospace;
}

h1 {
  font-family: 'Gentium Basic', serif;
  font-weight: normal;
  color: #FFF;
  margin: 0;
  line-height: 50px;
}

h1 a:link, h1 a:visited, h1 a:active {
  color: #FFF;
  text-decoration: none;
}

h1 a:hover {
  color: #96C56F;
}

h1 a img {
  vertical-align: bottom;
}

.menu {
  padding: 0 0.5em;
  font-family: "Open Sans", sans-serif;
  border-bottom: 1px solid #81B953;
  background: #002200;
}

.menu a:link, .menu a:visited, .menu a:active {
  color: #CCC;
  text-decoration: none;
  font-size: 1em;
  line-height: 1em;
  margin-right: 0.5em;
}

.menu a:hover {
  color: #FFF;
}

.menu a.selected {
  color: #FFF !important;
  text-decoration: none;
}

/* Result cards */

.result_card {
  margin: 10px;
  padding: 10px;
  background: #FFF;
  box-shadow: 0px 0px 5px 2px rgba(0, 0, 0, 0.2);
}

.did_you_mean {
  text-align: center;
  box-shadow: 0px 0px 5px 2px rgba(255, 127, 14, 0.5);
}

.result_card.result_card_error {
  border: 2px solid #F33;
  opacity: 0.7;
}

.result_card.result_card_error .cell_output_plain {
  white-space: pre;
  text-align: left;
}

.fullscreen {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  overflow: auto;
}

/* Highlight position of a syntax error */
.result_card_error .cell_output_plain span:first-child {
  border-right: 1px solid #F33;
}

.card_title {
  font-size: 12pt;
}

.card_title a:link, .card_title a:visited, .card_title a:hover, .card_title a:active {
  color: inherit;
  text-decoration: none;
}

.cell_input {
  color: black;
  margin: 0.25em 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-bottom: 1px solid #777;
  text-align: left;
}

.cell_output {
  color: black;
  padding: 0.25em 0;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  font-family: 'Droid Sans Mono', monospace;
  text-align: center;
}

.cell_output .cell_pre_output {
  text-align: left;
}

.cell_output table {
  border-collapse: collapse;
  border: 1px solid #000;
  margin: auto;
}

.cell_output td, .cell_output th {
  border: 1px solid #000;
  padding: 0.25em 0.5em;
}

.cell_output ul {
  list-style-type: none;
}

.card_options_toggle {
  cursor: pointer;
  font-family: 'Open Sans', sans-serif;
  font-size: smaller;
  display: inline-block;
}

.card_options_more {
  float: right;
}

.card_options_more i {
  display: inline-block;
  margin: 0 0.4em 0 0;
}

.card_options_more.open i {
  -moz-transform: rotate(180deg);
  -webkit-transform: rotate(180deg);
  -o-transform: rotate(180deg);
  -ms-transform: rotate(180deg);
  transform: rotate(180deg);
}

.result_card .card_options {
  border-top: 1px solid #777;
  font-size: 1em;
  font-family: 'Open Sans', sans-serif;
  text-align: left;
}

.result_card .card_options h2 {
  font-size: 1em;
  margin: 0.5em 0;
  padding: 0;
}

.result_card .card_options label {
  margin-left: 0.25em;
}

.result_variables {
  text-align: left;
  font-family: 'Open Sans', sans-serif;
}

.result_variables li {
  display: inline-block;
}

.result_variables button {
  padding: 0.25em 1em;
}

.result_variables button.active {
  background: #444;
  border: 0px;
  cursor: default;
}

.card_actions {
  display: none;
  list-style-type: none;
  font-size: 0.75em;
}

.card_actions li {
  display: inline-block;
  border-bottom: 2px solid #CCC;
}

.input {
  text-align: center;
  padding: 20px 0;
  width: 100%;
}

.footer {
  text-align: center;
  padding: 20px 0;
  width: 100%;
}

.input form {
  margin: 0 auto;
  margin-top: 20px;
  width: 580px;
}

.input input[type="text"] {
  font-family: 'Droid Sans Mono', monospace;
  width: 82%;
  height: 1.5em;
  font-size: 1.25em;
  padding: 0 0.25em;
  border: 0;
  vertical-align: top;
  border-radius: 0;
}

.input input[type="submit"] {
  border-radius: 0;
  vertical-align: top;
  font-family: 'Droid Sans Mono', monospace;
  width: 15%;
  height: 1.5em;
  font-size: 1.25em;
  color: #FFF;
  border: 0;
  background-color: #96C56F;
  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #96C56F), color-stop(100%, #81B953));
  background-image: -webkit-linear-gradient(top, #96C56F, #81B953);
  background-image: -moz-linear-gradient(top, #96C56F, #81B953);
  background-image: -ms-linear-gradient(top, #96C56F, #81B953);
  background-image: -o-linear-gradient(top, #96C56F, #81B953);
  background-image: linear-gradient(top, #96C56F, #81B953);filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=#96C56F, endColorstr=#81B953);
}

.input input[type="submit"]:hover {
  background-color: #7bb64b;
  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#7bb64b), color-stop(100%, #689a3f));
  background-image: -webkit-linear-gradient(top, #7bb64b, #689a3f);
  background-image: -moz-linear-gradient(top, #7bb64b, #689a3f);
  background-image: -ms-linear-gradient(top, #7bb64b, #689a3f);
  background-image: -o-linear-gradient(top, #7bb64b, #689a3f);
  background-image: linear-gradient(top, #7bb64b, #689a3f);filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=#7bb64b, endColorstr=#689a3f);
}

#mobile-keyboard {
  display: none;
}

#mobile-keyboard button {
  color: #FFF;
  border: 0;
  display: inline-block;
  border-left: 1px solid #3B5526;
  background-color: #96C56F;
  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #96C56F), color-stop(100%, #81B953));
  background-image: -webkit-linear-gradient(top, #96C56F, #81B953);
  background-image: -moz-linear-gradient(top, #96C56F, #81B953);
  background-image: -ms-linear-gradient(top, #96C56F, #81B953);
  background-image: -o-linear-gradient(top, #96C56F, #81B953);
  background-image: linear-gradient(top, #96C56F,
  #81B953);filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=#96C56F, endColorstr=#81B953);
}

#mobile-keyboard button:hover {
  background-color: #7bb64b;
  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#7bb64b), color-stop(100%, #689a3f));
  background-image: -webkit-linear-gradient(top, #7bb64b, #689a3f);
  background-image: -moz-linear-gradient(top, #7bb64b, #689a3f);
  background-image: -ms-linear-gradient(top, #7bb64b, #689a3f);
  background-image: -o-linear-gradient(top, #7bb64b, #689a3f);
  background-image: linear-gradient(top, #7bb64b, #689a3f);filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=#7bb64b, endColorstr=#689a3f);
}


.foot {
  text-align: center;
  font-size: 90%;
}

/* Main page columns (saved and example queries) */

.main {
  line-height: 1.15em;
}

.main p {
  margin: 0;
  padding: 0;
}

.col h2 {
  text-align: center;
  font-size: 1.25em;
  font-weight: normal;
}

.col ul {
  list-style-type: none;
}

.col.recent li {
  margin: 0.5em 0;
  border-bottom: 1px solid #777;
}

.col.recent a:link, .col.recent a:visited,
.col.recent a:hover, .col.recent a:active {
  text-decoration: none;
  color: #3B5526;
  width: 70%;
  display: inline-block;
  font-family: 'Droid Sans Mono', monospace;
}

.col.recent a.remove {
  width: auto;
  float: right;
  display: none;
}

.col.recent li:hover a.remove {
  display: block;
}

.col.example {
}

.example-group {
  background: #FFF;
  margin: 0.5em 0;
  box-shadow: 0px 0px 1px 1px rgba(0, 0, 0, 0.2);
}

.example-group h3 {
  font-weight: normal;
  padding: 0;
  cursor: pointer;
  font-size: 100%;
  padding: 0.6em 0.25em 0.5em;
}

.example-group i {
  cursor: pointer;
  float: left;
  margin: 0.4em 0.45em;
  font-size: 1.25em;
}

.example-group h3.shown {
  border-bottom: 1px solid #777;
}

.example-group i.shown {
  -moz-transform: rotate(180deg);
  -webkit-transform: rotate(180deg);
  -o-transform: rotate(180deg);
  -ms-transform: rotate(180deg);
  transform: rotate(180deg);

}

.example-group .contents {
  clear:both;
  padding: 0.5em 0.5em;
}

.example-group h4 {
  font-weight: 600;
  padding: 0.25em 0 0;
}

.example-group li {
  margin: 0 1em;
}

.example-group a:link, .example-group a:visited,
.example-group a:hover, .example-group a:active {
  text-decoration: none;
  color: #3B5526;
  font-family: 'Droid Sans Mono', monospace;
}

.example-group li > span {
  display: block;
  padding: 0.125em 0;
  font-style: italic;
  font-size: 90%;
}

.col button a:link, .col button a:visited,
.col button a:hover, .col button a:active {
  color: #FFF;
  text-decoration: none;
}

#random-example, #clear-all-recent {
  font-size: 90%;
}

#footer {
  margin: auto;
  font-size: 0.75em;
  clear: both;
  padding: 2em 0;
}

/* General styling */

h2 {
  padding: 10px 8px;
}

h3 {
  padding: 5px 8px;
}

p {
  padding: 0px 8px;
}

#random-example, button {
  cursor: pointer;
  display: block;
  font-family: 'Open Sans', sans-serif;
  border: 1px solid #552634;
  color: #FFF;
  padding: 0.25em;
  margin: 0.5em 0.25em 0.5em 0;
  background-color: #552634;
  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #40252D), color-stop(100%, #370C19));
  background-image: -webkit-linear-gradient(top, #40252D, #370C19);
  background-image: -moz-linear-gradient(top, #40252D, #370C19);
  background-image: -ms-linear-gradient(top, #40252D, #370C19);
  background-image: -o-linear-gradient(top, #40252D, #370C19);
  background-image: linear-gradient(top, #40252D, #370C19);
  filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=#40252D, endColorstr=#370C19);
}

#random-example:hover, button:hover {
  background-color: #552634;
  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #552634), color-stop(100%, #40252D));
  background-image: -webkit-linear-gradient(top, #552634, #40252D);
  background-image: -moz-linear-gradient(top, #552634, #40252D);
  background-image: -ms-linear-gradient(top, #552634, #40252D);
  background-image: -o-linear-gradient(top, #552634, #40252D);
  background-image: linear-gradient(top, #552634, #40252D);
  filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=#552634, endColorstr=#40252D);
}

button {
  height: 32px;
}

#random-example {
  height: 25px;
  text-decoration: none;
  display: inline-block;
  margin-top: 0.45em;
  padding: 0.45em 0.45em 0 0.45em;
  margin-bottom: 0;
}
/* Plots */

/* Formatting for the input line */
.plot-card .cell_input span.hidden {
  opacity: 0.5;
}

.plot-card .cell_input span {
  cursor: pointer;
}

.plot-card .cell_input span:after {
  content: " \f06e";
  font-family: "FontAwesome";
  color: #000;
}

.plot-card .cell_input span.hidden:after {
  content: " \f070";
}

.plot {
  width: 400px;
  height: 270px;
  margin: 0 auto;
  border: 1px solid #CCC;
  padding: 10px;
  overflow: hidden;
  resize: both;
}

.plot:hover {
  border: 1px solid #000;
}

.plot .graphs {
  display: none;
}

.plot svg {
  cursor: all-scroll;
}

.plot svg text {
  font-family: monospace;
  font-size: 0.875em;
}

.plot svg path:hover {
  stroke-width: 3;
}

.help {
  margin: 0;
  padding: 0;
  font-size: smaller;
  color: #555;
}

/* Factorization diagrams */

.factorization-diagram p {
  text-align: left;
  font-family: 'Open Sans', sans-serif;
  font-size: smaller;
  margin: 0;
  padding: 0;
}

/* Documentation */

.document {
  text-align: left;
  font-size: 0.9em;
  font-family: 'Open Sans', sans-serif;
}

.document p {
  margin: 0.25em 0;
  padding: 0;
}

.document h1 {
  font-family: inherit;
  color: #000;
  font-size: 1.2em;
  line-height: 1.25em;
  margin: 0.25em 0 0.5em 0;
}

.document pre {
  background-color: #eeffcc;
  color: #333333;
  padding: 5px;
  border: 1px solid #ac9;
  border-left: none;
  border-right: none;
}

.symja-live-eval-button {
  margin-top: 0.25em;
  color: #FFF;
  border: 0;
  background-color: transparent;
  padding: 0.25em;
  height: 25px;
  line-height: 20px;
  display: block;
  font-family: Arial;
  font-size: 13px;
  border-radius: 5px 5px 0 0;
  background-color: #3B5526;
  display: inline-block;
  margin-bottom: -1px;
}

.symja-live-eval-button:hover {
  color: #81B953;
  text-decoration: underline;
}

/* Derivative/integral steps */

.steps {
  text-align: left;
  font-size: 0.9em;
  font-family: 'Open Sans', sans-serif;
  max-width: 1600px;
  overflow: auto;
  margin: auto;
}

.steps li {
  min-width: 300px;
}

/* colors from http://gamedev.stackexchange.com/questions/46463 */
.steps ol {
  list-style-type: decimal;
  border-left: 1px solid #FF8080;
  padding: 0 30px;
}
.steps ol h2 {
  border-bottom: 1px solid #FF8080;
}

.steps ol ol {
  list-style-type: upper-alpha;
  border-left: 1px solid #92D169;
}

.steps ol ol h2 {
  border-bottom: 1px solid #92D169;
}

.steps ol ol ol {
  list-style-type: upper-roman;
  border-left: 1px solid #78BEF0;
}

.steps ol ol ol h2 {
  border-bottom: 1px solid #78BEF0;
}

.steps ol ol ol ol {
  list-style-type: lower-alpha;
  border-left: 1px solid #CC66C9;
}

.steps ol ol ol ol h2 {
  border-bottom: 1px solid #CC66C9;
}

.steps ol ol ol ol ol {
  list-style-type: lower-roman;
  border-left: 1px solid #F2A279;
}

.steps ol ol ol ol ol h2 {
  border-bottom: 1px solid #F2A279;
}

.collapsible > h2 {
  cursor: pointer;
  padding: 0;
  font-size: 1em;
  margin: 0.25em 0;
}

.collapsible > h2:before {
  content: "-";
}

.collapsible > h2.shown:before {
  content: "+";
}

/* Truth table */

.cell_output[data-card-name="truth_table"] td {
  padding: 0;
}

td .true {
  display: block;
  padding: 0.25em 0.5em;
  background-color: #3BB878;
}

td .false {
  display: block;
  padding: 0.25em 0.5em;
  background-color: #F7977A;
}

/* Loading PNG */

.loader {
  width: 32px;
  height: 32px;
  background-size: 256px 32px;
  background-image: url(/static/images/loader.png);
  margin: auto;

  -webkit-animation: loader .8s steps(8) infinite;
  -moz-animation: loader .8s steps(8) infinite;
  -ms-animation: loader .8s steps(8) infinite;
  -o-animation: loader .8s steps(8) infinite;
  animation: loader .8s steps(8) infinite;
}

@-webkit-keyframes loader {
   from { background-position:    0px; }
     to { background-position: -256px; }
}

@-moz-keyframes loader {
   from { background-position:    0px; }
     to { background-position: -256px; }
}

@-ms-keyframes loader {
   from { background-position:    0px; }
     to { background-position: -256px; }
}

@-o-keyframes loader {
   from { background-position:    0px; }
     to { background-position: -256px; }
}

@keyframes loader {
   from { background-position:    0px; }
     to { background-position: -256px; }
}

/* Phones/mobile devices */
@media screen and (max-device-width: 767px) {
  .menu {
    padding: 0.25em 0.5em;
  }

  .menu a {
    font-size: 1.25em;
  }

  .result_card {
    -webkit-box-shadow: none;
    box-shadow: none;
    border: 2px solid #DDD;
    border-radius: 2px;
    margin: 3px;
    padding: 5px;
  }

  .did_you_mean {
    box-shadow: none;
    border: 1px solid #F33;
  }

  .col {
    width: auto;
    margin: 10px 10px;
    font-size: 125%;
  }

  .col.recent a.remove {
    display: inline-block;
  }

  .col.example .example-group li {
    margin: 0.25em 0;
  }

  .col.example .example-group li > span {
    padding-top: 0.25em;
  }

  .col.example .example-group li > span:after {
    content: ":";
  }

  .example-group {
    -webkit-box-shadow: none;
    box-shadow: none;
    border: 1px solid #CCC;
  }

  .input form {
    margin: 0 auto;
    margin-top: 10px;
    width: auto;
  }

  .input input[type="text"] {
    margin: 0 auto;
    width: 90%;
  }

  .input input[type="submit"] {
    width: 50%;
    height: 150%;
    line-height: 150%;
  }

  input {
    border-radius: 0;
  }

  .result, #footer {
    width: 100%;
    margin: 10px auto;
  }

  .cell_output[data-card-name="graph"] {
    overflow-x: hidden;
  }

  .graph {
    width: 100%;
    margin: 0 auto;
    padding: 0;
    border: 0;
  }

  .graph:hover {
    border: 0;
  }

  .menu_right {
    display: inline;
  }

  #mobile-keyboard button {
    width: 2em;
    font-size: 1.25em;
    margin: 0;
  }
}

/* Tablets and base for desktops old width: 600px */
@media screen and (min-device-width: 768px) {
  .result, #footer {
    width: 100%;
    margin: 10px auto;
  }

  .main {
    width: 740px;
    margin: 10px auto;
  }

  .col {
    width: 360px;
  }

  .col.example {
    width: 720px;
  }

  .col.recent+.col.example {
    width: 360px;
  }

  .col.recent {
    float: left;
    height: 100%;
  }

  .col.recent a.remove {
    display: inline-block;
  }

  .col.example {
    margin: auto;
  }

  .col.recent~.col.example {
    float: right;
    height: 100%;
  }

  .col.example div.example-group li {
    margin: 0.25em 0;
  }

  .col.example .example-group li > span:after {
    content: ":";
  }

  .menu_right {
    float: right;
    display: block;
  }

  #mobile-keyboard button {
    width: 3em;
    font-size: 1.5em;
  }
}

@media screen and (min-device-width: 1280px) {
  .main {
    width: 800px;
    margin: 10px auto;
  }

  .col {
    width: 390px;
  }

  .col.example {
    width: 600px;
  }

  .col.recent+.col.example {
    width: 390px;
  }

  .col.example .example-group li {
    margin: 0;
  }

  .col.recent a.remove {
    display: none;
  }

  .fullscreen .steps {
    margin: 2em auto;
    width: 700px;
  }
}

.modal {
    display:    none;
    position:   fixed;
    z-index:    1000;
    top:        0;
    left:       0;
    height:     100%;
    width:      100%;
    background: rgba( 255, 255, 255, .8 ) 
                url('/static/images/loader.gif') 
                50% 50% 
                no-repeat;
}

body.loading .modal {
    overflow: hidden;   
}

body.loading .modal {
    display: block;
}
