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

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

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


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

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

  .inline {
      display: inline;
  }

  .choicegroup {
    label.choicegroup_correct:after {
      content: url('../images/correct-icon.png');
    }
  }


  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;
      }
    }

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

    &.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;
      padding: 6px;
      background: #eee;

      span {
        margin-bottom: 0;
      }
    }

    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: 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: 6px;
      }
    }

    .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;
      }

      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;
        }
      }
    }
  }


  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;
    }

    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;
    @include 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;
    @include 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;

    pre {
      @include 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 {
    input.save {
      @extend .blue-button;
    }
  }

  .detailed-solution {
    border: 1px solid #ddd;
    padding: 9px 9px 20px;
    margin-bottom: 10px;
    background: #FFF;
    position: relative;
    @include box-shadow(inset 0 0 0 1px #eee);
    @include border-radius(3px);

    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;
  }

  .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;
          @include 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;
      @include box-shadow(inset 0 0 0 1px #eee);
      @include 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);
      }
    }
  }
}
