/**
 * Issue box:
 * Huge block (one per page) for storing title, descripion and other information.
 * Used for Issue#show page, MergeRequest#show page etc
 *
 * CLasses:
 *   .issue-box - Regular box
 */

.issue-box {
  color: #666;
  margin:20px 0;
  background: #FFF;
  border: 1px solid #EEE;
  @include box-shadow(0 1px 1px rgba(0, 0, 0, 0.05));

  &.issue-box-closed {
    border-color: $border_danger;
    .state {
      background-color: $bg_danger;
      color: #FFF;
      border-color: $border_danger;
    }
  }

  &.issue-box-merged {
    border-color: $border_primary;
    .state {
      background-color: $bg_primary;
      color: #FFF;
      border-color: $border_primary;
    }
  }

  &.issue-box-open {
    border-color: $border_success;
    .state {
      border-color: $border_success;
      background-color: $bg_success;
      color: #FFF;
    }
  }

  &.issue-box-expired {
    border-color: #cea61b;
    .state {
      border-color: #faebcc;
      background: #cea61b;
      color: #FFF;
    }
  }

  .control-group {
    margin-bottom: 0;
  }

  .state {
    border-bottom: 1px solid #DDD;
    padding: 10px 15px;
  }

  .title {
    font-size: 28px;
    font-weight: normal;
    line-height: 1.5;
    margin: 0;
    color: #333;
    padding: 10px 15px;
  }

  .context {
    border: none;
    border-top: 1px solid #eee;
    padding: 10px 15px;

    // Reset text align for children
    .text-right > * { text-align: left; }

    @media (max-width: $screen-xs-max) {
      // Don't right align on mobile
      .text-right { text-align: left; }

      .row .col-md-6 {
        padding-top: 5px;
      }
    }
  }

  .description {
    padding: 0 15px 10px 15px;

    code {
      white-space: pre-wrap;
    }
  }

  .title, .context, .description {
    .clearfix {
      margin: 0;
    }
  }

  .state-label {
    font-size: 14px;
    float: left;
    font-weight: bold;
  }

  .creator {
    float: right;
    a {
      color: #FFF;
      text-decoration: underline;
    }
  }
}
