h2 {
  margin-top: 0;
  margin-bottom: 15px;

  &.problem-header {
    display: inline-block;
    section.staff {
      margin-top: 30px;
      font-size: 80%;
    }
  }

  @media print {
    display: block;
    width: auto;
    border-right: 0;
  }
}


iframe[seamless]{
    background-color: transparent;
    border: 0px none transparent;
    padding: 0px;
    overflow: hidden;
}

.inline-error {
  color: darken($error-red, 11%);
}

section.problem-progress {
  display: inline-block;
  color: #999;
  font-size: em(16);
  font-weight: 100;
  padding-left: 5px;
}

section.problem {
  @media print {
    display: block;
    width: auto;
    padding: 0;

    canvas, img {
      page-break-inside: avoid;
    }
  }

  .inline {
      display: inline;
  }

  .choicegroup {
    @include clearfix;

    label.choicegroup_correct{
      &:after{
        content: url('../images/correct-icon.png');
        margin-left:15px
      }
    }

    label.choicegroup_incorrect{
      &:after{
        content: url('../images/incorrect-icon.png');
        margin-left:15px;
      }
    }

    min-width:100px;
    width: auto !important;
    width: 100px;

    .indicator_container {
      float: left;
      width: 25px;
      height: 1px;
      margin-right: 15px;
    }

    fieldset {
      @include box-sizing(border-box);
      border-left: 1px solid #ddd;
      padding-left: 20px;
      margin: 0px 0px 20px;
    }

    input[type="radio"],
    input[type="checkbox"] {
      float: left;
      margin: 4px 8px 0 0;
    }

    text {
      display: inline;
      margin-left: 25px;
    }
  }

  ol.enumerate {
    li {
      &:before {
        content: " ";
        display: block;
        height: 0;
        visibility: hidden;
      }
    }
  }

  .solution-span {
    > span {
      margin: 20px 0;
      display: block;
      border: 1px solid #ddd;
      padding: 9px 15px 20px;
      background: #FFF;
      position: relative;
      box-shadow: inset 0 0 0 1px #eee;
      border-radius: 3px;

      &:empty {
        display: none;
      }
    }
  }

  div {
    p {
      &.answer {
        margin-top: -2px;
      }
      &.status {
        text-indent: -9999px;
        margin: 8px 0 0 10px;
      }
    }

    &.unanswered {
      p.status {
        @include inline-block();
        background: url('../images/unanswered-icon.png') center center no-repeat;
        height: 14px;
        width: 14px;
      }
    }

    &.correct, &.ui-icon-check {
      p.status {
        @include inline-block();
        background: url('../images/correct-icon.png') center center no-repeat;
        height: 20px;
        width: 25px;
      }

      input {
        border-color: green;
      }
    }

    &.processing {
      p.status {
        @include inline-block();
        background: url('../images/spinner.gif') center center no-repeat;
        height: 20px;
        width: 20px;
      }

      input {
        border-color: #aaa;
      }
    }

    &.incorrect, &.ui-icon-close {
      p.status {
        @include inline-block();
        background: url('../images/incorrect-icon.png') center center no-repeat;
        height: 20px;
        width: 20px;
        text-indent: -9999px;
      }

      input {
        border-color: red;
      }
    }

    > span {
      display: block;
      margin-bottom: lh(.5);
    }

    p.answer {
      @include inline-block();
      margin-bottom: 0;
      margin-left: 10px;

      &:before {
        content: "Answer: ";
        font-weight: bold;
        display: inline;

      }
      &:empty {
        &:before {
          display: none;
        }
      }
    }

    div.equation {
      clear: both;
      margin-top: 3px;

      span {
        margin-bottom: 0;

        &.math {
          padding: 6px;
          background: #f1f1f1;
          border: 1px solid #e3e3e3;
          @include inline-block;
          border-radius: 4px;
          min-width: 30px;
        }
      }
    }

    span {
      &.unanswered, &.ui-icon-bullet {
        @include inline-block();
        background: url('../images/unanswered-icon.png') center center no-repeat;
        height: 14px;
        position: relative;
        top: 4px;
        width: 14px;
      }

      &.processing, &.ui-icon-processing {
        @include inline-block();
        background: url('../images/spinner.gif') center center no-repeat;
        height: 20px;
        position: relative;
        top: 6px;
        width: 25px;
      }

      &.correct, &.ui-icon-check {
        @include inline-block();
        background: url('../images/correct-icon.png') center center no-repeat;
        height: 20px;
        position: relative;
        top: 3px;
        width: 25px;
      }

      &.partially-correct {
        @include inline-block();
        background: url('../images/partially-correct-icon.png') center center no-repeat;
        height: 20px;
        position: relative;
        top: 6px;
        width: 25px;
      }

      &.incorrect, &.ui-icon-close {
        @include inline-block();
        background: url('../images/incorrect-icon.png') center center no-repeat;
        height: 20px;
        width: 20px;
        position: relative;
        top: 3px;
      }
    }

    .reload
    {
      float:right;
      margin: 10px;
    }


    .grader-status {
      padding: 9px;
      background: #F6F6F6;
      border: 1px solid #ddd;
      border-top: 0;
      margin-bottom: 20px;
      @include clearfix;

      span {
        text-indent: -9999px;
        overflow: hidden;
        display: block;
        float: left;
        margin: -7px 7px 0 0;
      }

      .grading {
        background: url('../images/info-icon.png') left center no-repeat;
        padding-left: 25px;
        text-indent: 0px;
        margin: 0px 7px 0 0;
      }

      p {
        line-height: 20px;
        text-transform: capitalize;
        margin-bottom: 0;
        float: left;
      }

      &.file {
        background: #FFF;
        margin-top: 20px;
        padding: 20px 0 0 0;

        border: {
          top: 1px solid #eee;
          right: 0;
          bottom: 0;
          left: 0;
        }

        p.debug {
          display: none;
        }

        input {
          float: left;
        }
      }

    }
    .evaluation {
        p {
            margin-bottom: 4px;
        }
    }


    .feedback-on-feedback {
        height: 100px;
        margin-right: 20px;
    }

    .evaluation-response {
        header {
            text-align: right;
            a {
                font-size: .85em;
            }
        }
    }

    .evaluation-scoring {
        .scoring-list {
            list-style-type: none;
            margin-left: 3px;

            li {
                &:first-child {
                    margin-left: 0px;
                }
                display:inline;
                margin-left: 50px;

                label {
                    font-size: .9em;
                }

            }
        }

    }
    .submit-message-container {
        margin: 10px 0px ;
    }
  }

  form.option-input {
    margin: -10px 0 20px;
    padding-bottom: 20px;

    select {
      margin-right: flex-gutter();
    }
  }

  ul {
    list-style: disc outside none;
    margin-bottom: lh();
    margin-left: .75em;
    margin-left: .75rem;
  }

  ol {
    list-style: decimal outside none;
    margin-bottom: lh();
    margin-left: .75em;
    margin-left: .75rem;
  }

  dl {
    line-height: 1.4em;
  }

  dl dt {
    font-weight: bold;
  }

  dl dd {
    margin-bottom: 0;
  }

  dd {
    margin-left: .5em;
    margin-left: .5rem;
  }

  li {
    line-height: 1.4em;
    margin-bottom: lh(.5);

    &:last-child {
      margin-bottom: 0;
    }
  }

  p {
    margin-bottom: lh();
  }

  table {
    margin-bottom: lh();
    border-collapse: collapse;
    table-layout: auto;

    th {
      font-weight: bold;
      text-align: left;
    }

    td {
      text-align: left;
    }

    caption, th, td {
      padding: .25em .75em .25em 0;
      padding: .25rem .75rem .25rem 0;
    }

    caption {
      background: #f1f1f1;
      margin-bottom: .75em;
      margin-bottom: .75rem;
      padding: .75em 0;
      padding: .75rem 0;
    }

    tr, td, th {
      vertical-align: middle;
    }

  }

  code {
    margin: 0 2px;
    padding: 0px 5px;
    white-space: nowrap;
    border: 1px solid #EAEAEA;
    background-color: #F8F8F8;
    border-radius: 3px;
    font-size: .9em;
  }

  pre {
    background-color: #F8F8F8;
    border: 1px solid #CCC;
    font-size: .9em;
    line-height: 1.4;
    overflow: auto;
    padding: 6px 10px;
    border-radius: 3px;

    > code {
      margin: 0;
      padding: 0;
      white-space: pre;
      border: none;
      background: transparent;
    }
  }

  .CodeMirror {
    border: 1px solid black;
    font-size: 14px;
    line-height: 18px;
    resize: both;

    .cm-tab {
        background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAMCAYAAAAkuj5RAAAAAXNSR0IArs4c6QAAAGFJREFUSMft1LsRQFAQheHPowAKoACx3IgEKtaEHujDjORSgWTH/ZOdnZOcM/sgk/kFFWY0qV8foQwS4MKBCS3qR6ixBJvElOobYAtivseIE120FaowJPN75GMu8j/LfMwNjh4HUpwg4LUAAAAASUVORK5CYII=);
        background-position: right;
        background-repeat: no-repeat;
    }

    pre {
      border-radius: 0;
      border-radius: 0;
      border-width: 0;
      margin: 0;
      padding: 0;
      background: transparent;
      font-family: inherit;
      font-size: inherit;
      white-space: pre;
      word-wrap: normal;
      overflow: hidden;
      resize: none;

      &.CodeMirror-cursor {
        z-index: 10;
        position: absolute;
        visibility: hidden;
        border-left: 1px solid black;
        border-right: none;
        width: 0;
      }
    }
  }

  .CodeMirror-focused pre.CodeMirror-cursor {
    visibility: visible;
  }

  hr {
    background: #ddd;
    border: none;
    clear: both;
    color: #ddd;
    float: none;
    height: 1px;
    margin: 0 0 .75rem;
    width: 100%;
  }

  .hidden {
    display: none;
    visibility: hidden;
  }

  #{$all-text-inputs} {
    display: inline;
    width: auto;
  }

  // this supports a deprecated element and should be removed once the center tag is removed
  center {
    display: block;
    margin: lh() 0;
    border: 1px solid #ccc;
    padding: lh();
  }

  section.action {
    margin-top: 20px;

    .save, .check, .show {
      height: ($baseline*2);
      font-weight: 600;
      vertical-align: middle;
    }

    .save {
      @extend .blue-button !optional;
    }

    .show {

      .show-label {
        font-size: 1.0em;
        font-weight: 600;
      }
    }

    .submission_feedback {
      // background: #F3F3F3;
      // border: 1px solid #ddd;
      // border-radius: 3px;
      // padding: 8px 12px;
      // margin-top: 10px;
      @include inline-block;
      font-style: italic;
      margin: 8px 0 0 10px;
      color: #777;
      -webkit-font-smoothing: antialiased;
    }
  }

  .detailed-solution {
    > p:first-child {
      font-size: 0.9em;
      font-weight: bold;
      font-style: normal;
      text-transform: uppercase;
      color: #AAA;
    }

    p:last-child {
      margin-bottom: 0;
    }
  }

  div.capa_alert {
    padding: 8px 12px;
    border: 1px solid #EBE8BF;
    border-radius: 3px;
    background: #FFFCDD;
    font-size: 0.9em;
    margin-top: 10px;
  }

  div.capa_reset {
    padding: 25px;
    border: 1px solid $error-red;
    background-color: lighten($error-red, 25%);
    border-radius: 3px;
    font-size: 1em;
    margin-top: 10px;
    margin-bottom: 10px;
  }
  .capa_reset>h2 {
    color: #AA0000;
  }
  .capa_reset li {
    font-size: 0.9em;
  }

  .hints {
    border: 1px solid #ccc;

    h3 {
      border-bottom: 1px solid #e3e3e3;
      text-shadow: 0 1px 0 #fff;
      padding: 9px;
      background: #eee;
      font-weight: bold;
      font-size: em(16);
    }

    div {
      border-bottom: 1px solid #ddd;

      &:last-child {
        border-bottom: none;
      }

      p {
        margin-bottom: 0;
      }

      header {
        a {
          display: block;
          padding: 9px;
          background: #F6F6F6;
          box-shadow: inset 0 0 0 1px #fff;
        }
      }

      > section {
        padding: 9px;
      }
    }
  }

  .test {
    padding-top: 18px;

    header {
      margin-bottom: 12px;

      h3 {
        font-size: 0.9em;
        font-weight: bold;
        font-style: normal;
        text-transform: uppercase;
        color: #AAA;
      }
    }

    > section {
      border: 1px solid #ddd;
      padding: 9px 9px 20px;
      margin-bottom: 10px;
      background: #FFF;
      position: relative;
      box-shadow: inset 0 0 0 1px #eee;
      border-radius: 3px;

      p:last-of-type {
        margin-bottom: 0;
      }

      .shortform {
        margin-bottom: .6em;
      }

      a.full {
        @include position(absolute,  0 0 1px 0px);
        font-size: .8em;
        padding: 4px;
        text-align: right;
        width: 100%;
        display: block;
        background: #F3F3F3;
        @include box-sizing(border-box);
      }
    }
  }

  .external-grader-message {
    section {
      padding-left: 20px;
      background-color: #FAFAFA;
      color: #2C2C2C;
      font-family: monospace;
      font-size: 1em;
      padding-top: 10px;
      header {
          font-size: 1.4em;
      }

      .shortform {
        font-weight: bold;
      }

      .longform {
        padding: 0px;
        margin: 0px;

        .result-errors {
          margin: 5px;
          padding: 10px 10px 10px 40px;
          background: url('../images/incorrect-icon.png') center left no-repeat;
          li {
            color: #B00;
            }
        }

        .result-output {
          margin: 5px;
          padding: 20px 0px 15px 50px;
          border-top: 1px solid #DDD;
          border-left: 20px solid #FAFAFA;

          h4 {
            font-family: monospace;
            font-size: 1em;
          }

          dl {
            margin: 0px;
          }

          dt {
            margin-top: 20px;
          }

          dd {
            margin-left: 24pt;
          }
        }

        .result-correct {
          background: url('../images/correct-icon.png') left 20px no-repeat;
          .result-actual-output {
            color: #090;
          }
        }

        .result-incorrect {
          background: url('../images/incorrect-icon.png') left 20px no-repeat;
          .result-actual-output {
            color: #B00;
          }
        }

        .markup-text{
          margin: 5px;
          padding: 20px 0px 15px 50px;
          border-top: 1px solid #DDD;
          border-left: 20px solid #FAFAFA;

          bs {
            color: #BB0000;
          }

          bg {
            color: #BDA046;
          }
        }
      }
    }
  }

  .rubric {
      tr {
          margin:10px 0px;
          height: 100%;
      }
      td {
          padding: 20px 0px;
          margin: 10px 0px;
          height: 100%;
      }
      th {
          padding: 5px;
          margin: 5px;
      }
      label,
      .view-only {
          margin:3px;
          position: relative;
          padding: 15px;
          width: 150px;
          height:100%;
          display: inline-block;
          min-height: 50px;
          min-width: 50px;
          background-color: #CCC;
          font-size: .9em;
      }
      .grade {
        position: absolute;
        bottom:0px;
        right:0px;
        margin:10px;
      }
      .selected-grade {
        background: #666;
        color: white;
      }
      input[type=radio]:checked + label {
        background: #666;
        color: white; }
      input[class='score-selection'] {
        display: none;
      }
  }

  .annotation-input {
    $yellow: rgba(255,255,10,0.3);

    border: 1px solid #ccc;
    border-radius: 1em;
    margin: 0 0 1em 0;

    .annotation-header {
      font-weight: bold;
      border-bottom: 1px solid #ccc;
      padding: .5em 1em;
    }
    .annotation-body { padding: .5em 1em; }
    a.annotation-return {
      float: right;
      font: inherit;
      font-weight: normal;
    }
    a.annotation-return:after { content: " \2191" }

    .block, ul.tags {
      margin: .5em 0;
      padding: 0;
    }
    .block-highlight {
      padding: .5em;
      color:  #333;
      font-style: normal;
      background-color: $yellow;
      border: 1px solid darken($yellow, 10%);
    }
    .block-comment { font-style: italic; }

    ul.tags {
      display: block;
      list-style-type: none;
      margin-left: 1em;
      li {
        display: block;
        margin: 1em 0 0 0;
        position: relative;
        .tag {
          display: inline-block;
          cursor: pointer;
          border: 1px solid rgb(102,102,102);
          margin-left: 40px;
          &.selected {
            background-color: $yellow;
          }
        }
        .tag-status {
          position: absolute;
          left: 0;
        }
        .tag-status, .tag { padding: .25em .5em; }
      }
    }
    textarea.comment {
      $num-lines-to-show: 5;
      $line-height: 1.4em;
      $padding: .2em;
      width: 100%;
      padding: $padding (2 * $padding);
      line-height: $line-height;
      height: ($num-lines-to-show * $line-height) + (2*$padding) - (($line-height - 1)/2);
    }
    .answer-annotation { display: block; margin: 0; }

    /* for debugging the input value field. enable the debug flag on the inputtype */
    .debug-value {
        color: #fff;
        padding: 1em;
        margin: 1em 0;
        background-color: #999;
        border: 1px solid #000;
        input[type="text"] { width: 100%; }
        pre { background-color: #CCC; color: #000; }
        &:before {
          display: block;
          content: "debug input value";
          text-transform: uppercase;
          font-weight: bold;
          font-size: 1.5em;
        }
    }
  }
  .choicetextgroup{
    input[type="text"]{
      margin-bottom: 0.5em;
    }
    @extend .choicegroup;

    label.choicetextgroup_correct, section.choicetextgroup_correct{
      @extend label.choicegroup_correct;

      input[type="text"] {
        border-color: green;
      }
    }

    label.choicetextgroup_incorrect, section.choicetextgroup_incorrect{
      @extend label.choicegroup_incorrect;
    }

    label.choicetextgroup_show_correct, section.choicetextgroup_show_correct{
      &:after{
        content: url('../images/correct-icon.png');
        margin-left:15px;
      }
    }
    span.mock_label{
      cursor : default;
    }
  }
}
