@import (reference) "../defs.less";
@import (reference) "../mixins/upload-diff.less";
@import (reference) "@{STATIC_ROOT}djblets/css/mixins/markdown.less";


@img_base: '../../images';
@djblets_img_base: '../../../djblets/images';


/****************************************************************************
 * Review-specific macros
 ****************************************************************************/

/* Keep the label from shifting when the pencil icon is hidden/shown. */
.inline-editor-label() {
  display: block;
  line-height: 16px;
  vertical-align: top;
}

/* Adds a left-facing arrow to the left-hand side of a box. */
.left-arrow-callout(@color) {
  position: relative;

  &:before, &:after {
    position: absolute;
    left: -19px;
    top: 17px;
    right: 100%;
    border: 1px transparent solid;
    content: " ";
    display: block;
    width: 0;
    height: 0;
  }

  &:before {
    border-right-color: @box-border-color;
    border-width: 10px;
  }

  &:after {
    border-width: 9px;
    border-right-color: @color;
    margin-top: 1px;
    margin-left: 2px;
  }
}

/* Changes the color of an existing callout arrow. */
.left-arrow-callout-color(@color) {
  &:after {
    border-right-color: @color;
  }
}

.review-comments-inline() {
  &.draft {
    dt label a {
      color: #4e9a06;
    }
  }

  dl {
    dt {
      label {
        .inline-editor-label();

        a {
          color: #AB5603;
          font-size: 1.1em;
          font-weight: bold;
          text-decoration: none;
        }

        .gravatar-container {
          background: white;
          .border-radius(50%);
          display: inline-block;
          overflow: hidden;
          width: 32px;
          height: 32px;
        }

        .user-reply-info {
          display: inline-block;
          overflow: hidden;

          time {
            display: block;
          }
        }
      }

      span {
        color: #487858;
        font-weight: normal;
      }
    }
  }
}

/* Sets up an element to appear as a pop-up review request action menu. */
.review-request-action-popup-menu() {
  display: block !important;
  visibility: hidden;
  z-index: @z-index-menu;
  .opacity(0);
  .transition(visibility 0.1s, opacity 0.1s;);
}


/****************************************************************************
 * Actions
 ****************************************************************************/
.actions-container {
  background: @review-request-action-bg;
  border: 1px @review-request-action-border-color solid;
  border-bottom: 0;
  overflow: hidden;
  .border-radius(@box-inner-border-radius @box-inner-border-radius 0 0);
  .box-sizing(border-box);

  /*
   * This adds some content to the actions list, ensuring that even if it's
   * empty, there will be a suitable height.
   */
  .actions:before {
    content: ".";
    float: left;
    visibility: hidden;
    padding: @review-request-action-padding-vert 0;
  }
}


.actions {
  .box-sizing(border-box);
  float: right;
  list-style: none;
  margin: 0;
  padding: 0;
  white-space: nowrap;

  &.actions-left {
    float: left;

    #hide-review-request-link {
      padding: 0.6em 0.6em 0.3em 0.6em;
    }
  }

  a {
    color: black;
    cursor: pointer;
    display: block;
    text-decoration: none;
    padding: @review-request-action-padding-vert
             @review-request-action-padding-horiz;
  }

  img {
    vertical-align: middle;
  }

  li {
    float: left;
    margin: 0;
    padding: 0;

    .on-mobile-medium-screen-720({
      /* Give some extra room for tapping. */
      padding: @review-request-action-mobile-padding;
    });

    &:hover {
      background-color: @review-request-action-hover-bg;
    }

    &:active {
      background-color: @review-request-action-active-bg;
    }

    &.has-menu {
      &:hover > ul {
        visibility: visible;
        .opacity(100);
      }

      > .menu {
        .review-request-action-popup-menu();

        .on-mobile-medium-screen-720({
          margin-left: -@review-request-action-mobile-padding;
          margin-top: @review-request-action-mobile-padding;
        });
      }
    }

    &.action-view-diff {
      background: #FFFFEE;
      font-size: 105%;

      a {
        padding-left: 1.5em;
        padding-right: 1.5em;
      }
    }
  }

  .menu {
    background: @review-request-action-menu-bg;
    border: 1px @review-request-action-menu-border-color solid;
    float: none;
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    z-index: @z-index-menu;
    .border-radius(0 0 @box-border-radius @box-border-radius);
    .box-shadow(@box-shadow);

    li {
      background: @review-request-action-bg;
      border: 0;
      float: none;
      margin: 0;
      padding: 0;

      .on-mobile-medium-screen-720({
        /* Give some extra room for tapping. */
        padding: @review-request-action-mobile-padding;
      });

      &:last-child {
        .border-radius(0 0 @box-border-radius @box-border-radius);
      }

      &:hover {
        background-color: @review-request-action-menu-item-hover-bg;
      }

      a {
        color: black;
        border: 0;
        display: block;
        margin: 0;
        padding: 8px 10px;
        text-decoration: none;
      }
    }
  }
}

.actions-right-container {
  > li {
    &:hover {
      /* Don't let the action bar's background change by default. */
      background: inherit;

      .on-mobile-medium-screen-720({
        background: @review-request-action-hover-bg;
      });
    }

    & > .actions-right {
      .on-mobile-medium-screen-720({
        /* Mimic the styling of a standard menu, on mobile only. */
        .actions > .menu();
        .review-request-action-popup-menu();

        background: @review-request-action-bg;
        display: none;
        margin-left: 0;
        position: absolute;
        left: 0;
        width: 100%;
        white-space: normal;
      });

      > li {
        .on-mobile-medium-screen-720({
          background: transparent;
          .border-radius(0);
          display: inline-block;
          padding: @review-request-action-mobile-padding;
          text-align: left;
        });

        &:last-child {
          .border-radius(0 @box-inner-border-radius 0 0);

          .on-mobile-medium-screen-720({
            .border-radius(0);
          });
        }
      }
    }
  }

  .mobile-actions-menu-label {
    display: none;

    .on-mobile-medium-screen-720({
      display: inline-block;
    });
  }
}

.actions.page-tabs {
  background: @review-request-action-bg;
  border: 1px @review-request-border-color solid;
  border-bottom-width: 0;
  .border-radius(@box-border-radius @box-border-radius 0 0);
  margin-left: 1.5em;
  overflow: hidden;

  .review-ui-box & {
    .active {
      background: @review-ui-header-bg;
    }
  }

  li {
    border-bottom: 1px @review-request-action-border-color solid;
    min-width: 6em;
    text-align: center;

    &.active {
      background: @review-request-bg-gradient-start;
      border: 1px @review-request-border-color solid;
      border-bottom-color: transparent;
      border-top: 0;

      &:first-child {
        border-left: 0;
      }

      &:last-child {
        border-right: 0;
      }
    }
  }
}

.review-request-header {
  border-bottom: 1px @review-request-action-border-color solid;

  .on-mobile-medium-screen-720({
    text-align: center;
  });
}


/****************************************************************************
 * Code Mirror
 ****************************************************************************/
.CodeMirror {
  border: @textarea-border;
  height: auto;
  margin: @textarea-editor-margin;
  cursor: text;

  .CodeMirror-lines {
    padding: @textarea-editor-padding;
  }

  .CodeMirror-scroll {
    overflow-y: hidden !important;
    overflow-x: auto !important;
  }

  pre {
    padding: 0;
  }

  .cm-header {
    color: black;
  }

  .cm-rb-markdown-code {
    color: #4444cc;
  }

  .cm-variable-2 {
    color: black;
  }
}


/****************************************************************************
 * Review Request Box
 ****************************************************************************/
.markdown-info {
  color: blue;
  font-size: 8pt;
  font-weight: normal;
  float: right;
  line-height: 25px;
  margin-right: 0.5em;
  text-decoration: none;

  .on-mobile-medium-screen-720({
    /* Let the Markdown Reference link flow to the next line. */
    display: block !important;
    float: none;
    margin-top: 0.5em;
  });

  &:hover {
    text-decoration: underline;
  }
}

.review-request {
  /*
   * Any changes to this need to be reflected in _resizeLayout in
   * reviewRequestEditorView.js
   */
  @details-width: 300px;

  background: none;
  border: 0;

  label {
    color: @review-request-label-color;
    font-weight: bold;
  }

  noscript form {
    margin: 10px 5px 5px 5px;
    text-align: right;
  }

  textarea {
    border: @textarea-border;
    height: 1.5em;
    overflow: hidden;
  }

  .box-inner {
    background-image: none;
  }

  .content {
    padding: @box-padding;
    position: relative;

    &.sliding {
      margin-top: -5px;
    }

    img {
      border: none;
    }

    .field-container {
      position: relative;

      &>pre {
        .pre-wrap;
        background-color: #FFFFFF;
        border: @textarea-border;
        margin: @textarea-editor-margin;
        padding: @textarea-editor-padding;
      }
    }
  }

  .content-divider {
    border-top: 1px #C2C1B0 solid;
  }

  .inline-editor-form {
    &.summary-editor {
      margin-top: -2px;
      margin-left: -3px;
    }

    input[type='text']:not(:focus) {
      .box-shadow(0px 0px 4px rgba(255, 0, 0, .75));
    }
  }

  .main {
    background-color: @review-request-bg;
    #gradient > .vertical(@review-request-bg-gradient-start,
                          @review-request-bg-gradient-end);
    border: 1px @review-request-border-color solid;
    border-top: 0;
    .border-radius(0 0 @box-border-radius @box-border-radius);
    clear: both;
    padding: 0.5em;
  }

  #required-field-legend {
    color: darkRed;
    font-weight: bold;
    padding: @box-padding;
  }

  .header {
    padding: @box-padding;
  }

  .star {
    float: left;
    margin-right: 10px;
  }

  #review_request_details {
    border-spacing: 0px;
    float: right;
    width: @details-width;
    padding: @box-padding;

    .on-mobile-medium-screen-720({
      /* Give the details pane its own full row above the textareas. */
      float: none;
      width: auto;
    });

    a {
      color: @review-request-link-color;
      text-decoration: none;
    }

    th {
      color: #39350b;
      font-weight: bold;
      text-align: left;
      white-space: nowrap;
    }

    tbody {
      td, th {
        padding: 0;
        vertical-align: top;
      }

      th, td .field {
        padding-top: 3px;
      }

      td {
        padding-left: 1em;

        span {
          display: inline-block;
          margin-right: 4px;
          word-wrap: break-word;
        }

        .editicon {
          margin-left: 0;
        }
      }

      th {
        padding-bottom: 1.5em;
        padding-left: 1em;
        text-align: right;
        white-space: nowrap;
      }
    }

    thead {
      &.first-fieldset th {
        padding-top: 0;
      }

      th {
        color: @review-request-label-color;
        font-size: 120%;
        padding: 2em 0 1em 0;
      }
    }

    #target_people .inactive {
      text-decoration: line-through;
    }

    .buttons {
      display: block;
      margin-bottom: 1em;
      padding: 6px 0 0 0;

      input {
        font-size: 11px;
      }
    }
  }

  #review_request_extra {
    clear: both;

    h3 {
      color: @review-request-label-color;
      font-size: 120%;
      margin: 0;
      padding: 0;
    }

    label.textarea-label {
      display: block;
      min-height: 16px;

      img {
        vertical-align: middle;
      }
    }
  }

  #review_request_main {
    margin-right: (@details-width + 10px);
    position: relative;

    .on-mobile-medium-screen-720({
      margin-right: 0;
    });

    label {
      font-size: 120%;
    }
  }

  #review-request-warning {
    background-color: @review-request-warning-bg;
    border: 1px solid @review-request-warning-border-color;
    display: none;
    font-weight: bold;
    padding: 5px;
    text-align: center;
  }

  #diff_revision {
    font-weight: bold;
    text-align: right;
    vertical-align: bottom;
  }

  #status {
    color: #39350b;
    margin: 5px 0;
  }

  #summary_wrapper {
    @line-height: 2.6em;

    line-height: @line-height;
    padding: 0;

    .on-mobile-medium-screen-720({
      margin-bottom: 1em;
    });

    label, #field_summary {
      font-size: 14px;
    }

    label {
      margin-right: 0.5em;

      .on-mobile-medium-screen-720({
        /* Hide the Summary label on mobile. */
        display: none;
      });
    }

    .rb-icon-edit {
      vertical-align: text-bottom;
    }

    #field_summary {
      display: inline;

      .on-mobile-medium-screen-720({
        font-size: 120%;
      });

      a {
        color: black;
        text-decoration: none;
      }
    }
  }

  .actions-container {
    .star {
      margin: 5px;
    }
  }

  #updated_time, #created_time {
    text-align: right;
    vertical-align: bottom;
  }

  .editicon {
    text-decoration: none;
  }

  .required-flag {
    color: @required-flag-color;
    font-size: 10px;
    font-weight: bold;
    padding: 0 2px;
  }
}

#review_request_form {
  input[type='text'], textarea {
    width: 400px;
  }
}


/****************************************************************************
 * Review UIs
 ****************************************************************************/
.review-ui-box {
  &.has-review-ui-box-content .actions-container {
    .border-radius(@box-inner-border-radius @box-inner-border-radius 0 0);

    .actions > li:last-child {
      .border-radius(0 @box-inner-border-radius 0 0);
    }
  }

  .actions-container {
    .border-radius(@box-inner-border-radius);

    .actions > li:last-child {
      .border-radius(0 @box-inner-border-radius @box-inner-border-radius 0);
    }
  }

  .review-ui-box-content {
    border: 1px @review-request-border-color solid;
    border-top: 0;
    clear: both;
    padding: 0;
    min-height: 5em;
  }

  .review-ui-header {
    border-bottom: 1px @diff-file-border-color solid;
    background: @review-ui-header-bg;
    min-height: 2em;

    h1 {
      margin: 0;
      padding: 8px;
      font-size: 10pt;
    }
  }
}


/****************************************************************************
 * Reviews
 ****************************************************************************/

#reviews {
  margin-left: @reviews-padding-horiz;
  margin-right: @reviews-padding-horiz;

  .on-mobile-medium-screen-720({
    margin: 0;
  });

  .box {
    margin: 2em 0;
    .left-arrow-callout(white);

    .on-mobile-medium-screen-720({
      margin-top: 1em;
    });
  }

  .box-container {
    padding-left: 75px;
    width: auto;

    .on-mobile-medium-screen-720({
      padding-left: 0;
    });
  }

  .box-statuses {
    float: left;
    text-align: center;

    .on-mobile-medium-screen-720({
      margin-top: 3em;
      float: none;
    });

    .box-status {
      position: relative;
      .transition(0.2s linear all);

      &.has-issues {
        .gravatar-container {
          border-color: darken(@issue-opened-bg, 45%);
        }
      }

      &.ship-it {
        .gravatar-container {
          border-color: #6ebf20;
        }

        .fix-it-label {
          -webkit-transition-delay: 0.2s;
          transition-delay: 0.2s;
        }
      }

      &.ship-it.has-issues {
        .gravatar-container {
          border-color: darken(@issue-opened-bg, 45%);
        }

        .fix-it-label {
          z-index: 1;
        }

        .ship-it-label {
          position: absolute;
          top: 3px;
          margin-left: 2px;
          padding-left: 2px;
          padding-right: 2px;
        }
      }

      .gravatar-container {
        background: white;
        border: 2px #CCC dotted;
        .border-radius(50%);
        overflow: hidden;
        width: 48px;
        height: 48px;
        margin: 0 5px;
        .transition(border-color 0.4s ease-in-out);

        .on-mobile-medium-screen-720({
          display: inline-block;
          vertical-align: top;
        });

        img {
          border: 2px white solid;
          .border-radius(50%);
          .box-sizing(border-box);
        }
      }

      .labels-container {
        margin-top: -5px;
        position: relative;

        .on-mobile-medium-screen-720({
          display: inline-block;
          margin-top: 0;
          top: 4px;
        });
      }

      label {
        border: 1px #888888 solid;
        .border-radius(@box-border-radius);
        display: block;
        line-height: 1.5;
        margin-bottom: @page-container-padding;
        padding: 2px 4px;
        position: absolute;
        left: 0;
        top: 0;
        width: 4.5em;

        .on-mobile-medium-screen-720({
          margin-bottom: 0;
        });

        &.ship-it-label {
          border: 1px darken(#aeff60, 40%) solid;
          background: #aeff60;

          /*
           * NOTE: The ';' at the end here is intentional. It forces Less to
           *       preserve the commas, rather than assuming they're separating
           *       arguments to the mixin.
           */
          .transition(padding 0.2s ease-in-out,
                      top 0.2s ease-in-out,
                      margin 0.2s ease-in-out
                      ;);
        }

        &.fix-it-label {
          border: 1px darken(@issue-opened-bg, 50%) solid;
          background: @issue-opened-bg;

          .transition(left 0.5s ease-in-out,
                      opacity 0.8s ease
                      ;);
        }
      }
    }
  }

  > .changedesc,
  > .review {
    clear: both;
  }
}

#reviews .box {
  border: 0;

  .on-mobile-medium-screen-720({
    &:after, &:before {
      content: none
    }
  });

  &.collapsed {
    .left-arrow-callout-color(#ECECEE);

    .body {
      display: none;
    }

    .box-inner {
      background: #ECECEE;
    }

    .banner {
      border-bottom: 0;
      margin-bottom: 0;
    }
  }

  .box-inner {
    background: none;
    min-height: 5em;
    overflow: hidden;
  }

  .collapse-button {
    border: 1px #333333 solid;
    cursor: pointer;
    float: left;
    margin-right: 0.5em;
    margin-top: -1px;
    padding: 0;
  }
}

#reviews .review {
  &.has-draft {
    .box {
      .left-arrow-callout-color(@draft-bg-color);
    }

    .header {
      background: @draft-bg-color;
    }
  }

  .banners {
    .banner {
      border-left: 0;
      border-right: 0;
      border-top: 0;
      .box-sizing(border-box);

      &.floating {
        border-top: 0;
        margin-top: 0;
      }
    }
  }

  .body {
    clear: both;

    pre {
      margin-bottom: 0;
      .pre-wrap;
    }

    .comment-text:target {
      background-color: #E7EDF3;
      border: 1px solid @dark-blue;
      padding: 1em;
    }

    .body_top, .body_bottom {
      margin: 2em;
    }
  }

  .body-top-comment-section,
  .body-bottom-comment-section,
  .comments > dd,
  .review-comments > dd {
    margin: 0 2em 4em 2em;

    &:last-child {
      margin-bottom: 2em;
    }
  }

  .box {
    background: white;
    border: 0;

    .box-main {
      padding: 0;
    }
  }

  .box-inner {
    background: white;
    border: 1px @review-box-border-color solid;
  }

  .controls {
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: left;

    a {
      color: black;
      display: inline-block;
      text-decoration: none;
      background: #ECECEC;
      border: 1px #C3C3C3 solid;
      padding: 0.6em 1em;
      .border-radius(@box-border-radius);

      &:hover {
        background: #F3F3F3;
      }

      .fa {
        margin-right: 5px;
      }
    }

    li {
      display: inline;
    }
  }

  .comments, .review-comments {
    border: 0;
    margin: 0;
    padding: 0;

    /*
     * Cover up the left and right borders we add for <dt> to get a clean
     * rounded border. We don't want them sticking out of the box.
     */
    overflow: hidden;

    & > dd {
      margin-top: 2em;
    }

    & > dt {
      thead th {
        font-weight: normal;
      }
    }

    .comment_container {
      border-top: 1px #C0C0C0 solid;
      border-bottom: 1px #C0C0C0 solid;
    }

    .filename a {
      color: black;
      font-weight: bold;
    }

    .file-attachment {
      background: #F0F0F0;
      border-bottom: 1px #C0C0C0 solid;
      padding: 5px;

      .file-attachment-comment-header {
        font-size: 120%;
        white-space: nowrap;

        a {
          text-decoration: none;
        }

        img {
          padding-right: 10px;
          vertical-align: middle;
        }

        .caption {
          color: black;
          margin: 5px 0 0 32px;
        }

        .filename {
          color: black;
          font-weight: bold;
          margin: 0;
          vertical-align: middle;
        }
      }

      .thumbnail {
        margin-top: 0.5em;
      }
    }

    .screenshot {
      background: #F0F0F0;
      border: 1px #C0C0C0 solid;
      font-size: 120%;

      img {
        padding: 5px;
      }

      .filename {
        display: block;
        margin: 0;
        padding: 5px 10px;
      }
    }

    .sidebyside {
      th {
        /*
         * The line numbers aren't clickable in the comment fragments in
         * reviews, so show a standard cursor instead of a pointer cursor.
         */
        cursor: initial;
      }

      .filename-row th {
        background: #F0F0F0;
      }
    }
  }

  .diff-error tbody {
    border: 1px @diff-error-border-color solid;
  }

  .reply-comments {
    margin: 2.5em 0 2em 0;
    padding: 0;

    &>li {
      display: inline;

      .review-comments-inline();

      dl {
        /*
         * Set a border-bottom to prevent a bug in IE where, without a
         * border-bottom, the content of the dl will shift left by the
         * border-left size for every following item.
         */
        border-bottom: 1px transparent solid;
        margin: 4em 0 2em 0;
        padding: 0;

        dd {
          margin-left: 0;
        }
      }
    }
  }
}

#view_controls {
  list-style: none;
  margin: 1em 0;
  padding: 1em;
  text-align: center;

  a {
    background: #E0E0E0;
    border: 1px #C3C3C3 solid;
    .border-radius(@box-border-radius);
    color: black;
    display: inline-block;
    padding: 0.6em 1em;
    text-decoration: none;

    &:hover {
      background: #ECECEC;
    }
  }

  li {
    display: inline-block;
    margin: 1em;
    padding: 0;
  }

  .rb-icon {
    vertical-align: top;
  }
}

.sidebyside.loading {
  /* Helps us better keep the size, as long as the comment is within a chunk. */
  padding: 2px 2px 1px 2px;
  width: 100%;

  tbody {
    background-color: #F3F3F3;

    td {
      padding: 4px;
      font-size: 20px;
      text-align: center;
    }
  }
}


/****************************************************************************
 * Change Descriptions
 ****************************************************************************/
#field_changedescription {
  .pre-wrap;
  background-color: @textarea-editor-background;
  border: @textarea-border;
  margin: @textarea-editor-margin;
  padding: @textarea-editor-padding;
}

.changedesc {
  &.box {
    background-color: #fefadf;
    #gradient > .vertical(lighten(@review-request-bg, 5%), @review-request-bg);

    .box-inner {
      border: 1px @review-request-border-color solid;
    }
  }

  .body {
    clear: both;
    padding: @box-padding;

    &>ul {
      list-style: none;
      margin: 1em 0 1em 0;
      padding: 0;

      &>li {
        margin: 3em 0 0 0;

        &:first-child {
          margin-top: 0;
        }
      }
    }

    a {
      color: default;
      text-decoration: none;

      &:hover {
        text-decoration: underline;
      }
    }

    /* Field labels */
    h3 {
      color: @review-request-label-color;
      font-size: 110%;
      margin: 1em 0 0.5em 0;
      padding: 0;

      &.status {
        /* Add some separation between this and the other fields. */
        margin-bottom: 2em;

        &:last-child {
          /*
           * If it's the last child, we don't want that separation, or it'll
           * have an odd amount of extra space.
           */
          margin-bottom: 0.5em;
        }

        .value {
          color: black;
          font-weight: normal;
        }
      }
    }

    /* Used in the textarea field diffs and the Change Summary section. */
    > pre {
      background-color: #FFFFFF;
      border: @textarea-border;
      padding: @textarea-editor-padding;
      font-size: 9pt;
      .pre-wrap;
    }

    /*
     * File attachment/screenshot change lists.
     *
     * These differ from the other field change lists in that they have
     * mini-section labels underneath for each file.
     */
    .caption-changed {
      margin: 2em 0 0 2em;
      padding: 0;

      a {
        /* Treat the link like a field. */
        font-weight: bold;
      }

      td, th {
        vertical-align: top;
      }

      td {
        padding-left: 1em;
      }

      th {
        text-align: right;
      }
    }

    /* Displays changes for field values, with "-" and "+" markers. */
    .changed {
      border: @textarea-border;
      border-collapse: collapse;
      display: inline-block;
      margin: 0;
      padding: 0;
      vertical-align: top;

      a {
        color: blue;
        text-decoration: none;

        &:first-child {
          margin-left: 0;
        }

        &:hover {
          text-decoration: underline;
        }
      }

      td, th {
        font-family: @textarea-font-family;
        padding: 0.3em 0.6em;
      }

      td {
        background: #FEFEFE;
      }

      .new-value .marker {
        background: @diff-insert-linenum-color;
      }

      .old-value .marker {
        background: @diff-delete-linenum-color;
      }
    }

    /* The "Change Summary" section. */
    .changedesc-text {
      margin-bottom: 2em;

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

    /* The diff for text areas. */
    .diffed-text-area {
      background: white;
      border: @textarea-border;
      border-collapse: collapse;
      padding: 0;
      width: 100%;

      a {
        text-decoration: underline;
      }

      pre {
        background: none;
        border: 0;
        margin: 0;
        padding: 0;
        .pre-wrap;
      }

      td {
        font-family: @textarea-font-family;
        padding: 2px 4px;
        vertical-align: top;
        .pre-wrap;
      }

      .delete {
        .line {
          background: @diff-delete-color;
        }

        /* The '-' or '+' marker. */
        .marker {
          color: #990000;
          background: @diff-delete-linenum-color;
        }
      }

      .insert {
        .line {
          background: @diff-insert-color;
        }

        /* The '-' or '+' marker. */
        .marker {
          background: @diff-insert-linenum-color;
        }
      }

      .line {
        width: 100%;

        /*
         * Make sure any images in the Markdown-rendered text are kept
         * small, but with the correct aspect ratio.
         */
        img {
          width: auto;
          max-height: 100px;
        }
      }

      /* The '-' or '+' marker. */
      .marker {
        background: #F9F9F9;
        font-family: @textarea-font-family;
        font-size: @textarea-font-size;
        font-weight: bold;
        text-align: center;
      }

      .replace-new {
        .line {
          background: @diff-insert-color;

          .hl {
            background: desaturate(darken(@diff-insert-color, 15%), 30%);
          }
        }

        /* The '-' or '+' marker. */
        .marker {
          background: @diff-insert-linenum-color;
        }
      }

      .replace-old {
        .line {
          background: @diff-delete-color;

          .hl {
            background: desaturate(darken(@diff-delete-color, 10%), 20%);
          }
        }

        /* The '-' or '+' marker. */
        .marker {
          background: @diff-delete-linenum-color;
        }
      }
    }

    /* Styling for the "Diff" field updates. */
    .diff-changes {
      .line-counts {
        margin-left: 0.5em;

        .delete-count {
          color: @diff-delete-line-count-color;
        }

        .insert-count {
          color: @diff-insert-line-count-color;
        }
      }
    }

    /* Styles for the file listing for the "Diff" field. */
    .diff-index {
      margin-bottom: 0;

      .diff-file-icon {
        min-width: 20px;
        min-height: 20px;
      }

      .diff-file-info {
        /* Compensate for the lack of diff-chunks-cell column. */
        width: 100%;
      }
    }

    .primary-fields {
      h3:first-child {
        margin-top: 2em;
      }
    }

    /*
     * Secondary fields are in more of a Field: Value display, with the
     * fields lining up.
     */
    .secondary-fields {
      width: 100%;

      .on-mobile-medium-screen-720({
        display: block;
      });

      h3 {
        margin: 2px 1em 0 0;
        padding: 0;
        text-align: right;

        .on-mobile-medium-screen-720({
          margin: 0;
          text-align: left;
        });
      }

      &>tbody>tr {
        &>td,
        &>th {
          padding: 0.5em 0;
          vertical-align: top;
          white-space: nowrap;

          .on-mobile-medium-screen-720({
            display: block;
            white-space: normal;
          });
        }

        &>td {
          /*
           * Between this and the white-space: nowrap above, the field labels
           * will end up taking the minimum size without wrapping, and the
           * rest of the width will be given to the value.
           */
          width: 100%;

          &>p {
            /*
             * If the field value is rendered inside a <p>, make sure it
             * aligns with the field label.
             *
             * Note that the label has a larger font than this, so we can't
             * reuse the same pixel value. We have to bump it.
             */
            &:first-child {
              margin-top: 3px;
            }

            /* Don't take up more room than we need in the last <p>. */
            &:last-child {
              margin-bottom: 0;
            }
          }
        }

        &>th {
          .on-mobile-medium-screen-720({
            margin-top: 2em;
          });
        }
      }
    }
  }
}

.box .header {
  .border-radius(@box-border-radius @box-border-radius 0 0);
  padding: 9px;

  a {
    color: black;
    text-decoration: none;
  }

  .header-details {
    overflow: hidden;
  }

  .reviewer {
    float: left;
    font-size: 110%;
    font-weight: bold;
    padding-top: 1px;

    .on-mobile-medium-screen-720({
      float: none;
    });

    a {
      position: relative;
    }
  }

  .posted_time {
    color: #555;
    text-align: right;
    padding-top: 2px;

    .on-mobile-medium-screen-720({
      margin-top: 0.5em;
      text-align: left;
    });
  }

}


/****************************************************************************
 * Updates Bubble
 ****************************************************************************/

#updates-bubble {
  background: #FFF1AB;
  border-top: 1px #888866 solid;
  border-left: 1px #888866 solid;
  bottom: 0;
  .border-radius(10px 0 0 0);
  .box-shadow(-1px -1px 2px rgba(0, 0, 0, 0.15));
  font-size: 110%;
  padding: 1em;
  position: fixed;
  right: 0;
  z-index: @z-index-page-overlay;

  a, a:visited {
    color: #0000CC;
    text-decoration: none;
  }

  #updates-bubble-buttons {
    margin-left: 2em;
  }
}


/****************************************************************************
 * Review Form
 ****************************************************************************/
#review-form {
  overflow: auto;
  padding: 10px;

  .add-link {
    font-size: 110%;

    &:visited {
      color: @link-color;
    }
  }

  label {
    color: black;
    font-weight: bold;
    margin-top: 10px;
  }

  dt label {
    color: #AB5603;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
  }

  .comment-text-field > .edit-field {
    margin: 1em 0;

    .comment-text-field {
      label {
        .inline-editor-label();
      }
    }
  }

  #review-form-comments {
    background: none;

    pre {
      .pre-wrap;
    }

    .spinner {
      font-size: 20px;
    }

    .comments {
      list-style: none;
      margin: 0;
      padding: 0;

      > li {
        margin: 2em 0;
        padding: 0;

        .edit-fields {
          margin-left: 2em;
        }

      }
    }

    .review-comments-inline();

    dd {
      margin: 0;
    }
  }
}


/****************************************************************************
 * Uploaded files
 ****************************************************************************/
.file-container {
  float: left;

  .on-mobile-medium-screen-720({
    float: none;
  });

  .file:hover .file-actions-container {
    display: block;
  }

  .file {
    @file-attachment-bg: white;
    @file-attachment-overlay-bg: #FCFCFC;
    @file-attachment-overlay-border-color: #EEEEEE;
    @file-attachment-height: 150px;
    @file-attachment-width: 300px;
    @file-attachment-border-color: #CCCCCC;
    @file-attachment-caption-height: 31px;

    border: 1px @file-attachment-border-color solid;
    display: block;
    position: relative;
    margin: 1em 1.5em 0.5em 0;
    max-width: @file-attachment-width;
    .transition(0.2s opacity linear);
    width: @file-attachment-width;
    .box-shadow(@box-shadow);
    .box-sizing(border-box);

    .on-mobile-medium-screen-720({
      margin: 1.5em 0 0 0;
    });

    .fa-spinner {
      font-size: @file-attachment-height / 4;
      line-height: @file-attachment-height;
      vertical-align: middle;
      text-align: center;
    }

    /*
     * This container provides the padding necessary to display a shadow
     * around all but one edges of the actions list. We clip the shadow on
     * the side sharing a border with the file attachment thumbnail.
     */
    .file-actions-container {
      @shadow-padding: 4px;

      display: none;
      overflow: hidden;
      padding: @shadow-padding;
      position: absolute;
      left: 100%;
      top: -(@shadow-padding + 1px);
      z-index: @z-index-menu;

      &.left {
        padding-right: 0;

        .file-actions {
          border-right-color: @file-attachment-overlay-border-color;
          margin-left: @shadow-padding;
        }
      }

      &.right {
        padding-left: 0;

        .file-actions {
          border-left-color: @file-attachment-overlay-border-color;
        }
      }
    }

    .file-actions {
      background-color: @file-attachment-overlay-bg;
      border: 1px @file-attachment-border-color solid;
      .box-shadow(@box-shadow);
      .box-sizing(border-box);
      height: @file-attachment-height - @file-attachment-caption-height;
      list-style: none;
      margin: 0;
      padding: 0;
      white-space: nowrap;

      li {
        margin: 0;
        padding: 0;

        a {
          color: #333;
          display: block;
          padding: 0.5em 1em;
          text-decoration: none;

          &:hover {
            background: darken(@file-attachment-overlay-bg, 5%);
          }
        }
      }
    }

    .file-thumbnail-container {
      background: @file-attachment-bg;
      height: @file-attachment-height;
      text-align: center;

      a {
        color: black;
        text-decoration: none;
      }

      pre {
        font-size: x-small;
      }

      .thumbnail-properties () {
        max-height: @file-attachment-height;
        max-width: 100%;
        margin: 0;
        padding: 0;
        .box-sizing(border-box);
      }

      .file-thumbnail-overlay {
        .thumbnail-properties();
        position: absolute;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: @z-index-event-overlay;
      }

      .file-thumbnail {
        .thumbnail-properties();
        border: 0;
        overflow: hidden;
        text-align: center;
        white-space: nowrap;
        vertical-align: middle;
        margin: auto;
      }

      .file-thumbnail-clipped {
        border: 0;
        overflow: hidden;
        text-align: left;
        padding: 1em 0 0 1em;
        font-size: 8pt;

        /* Override the styling used for the <pre>s for fields. */
        pre {
          background-color: transparent;
          border: 0;
          margin: 0;
          padding: 0;
        }
      }
    }

    .file-caption-container {
      @file-caption-padding: 30px;

      .box-sizing(border-box);
      .opacity(90);
      background-color: @file-attachment-overlay-bg;
      border-top: 1px @file-attachment-overlay-border-color solid;
      bottom: 0;
      line-height: 2.5em;
      padding: 0 @file-caption-padding;
      position: absolute;
      text-align: center;
      z-index: @z-index-subevent-overlay;
      // The 2px here is to make it fit within the border of the parent element
      max-width: @file-attachment-width - 2px;
      width: @file-attachment-width - 2px;

      a {
        color: black;
        text-decoration: none;

        &.empty-caption {
          color: gray;
          font-style: italic;
        }
      }

      .file-caption {
        .ellipsize();
        .opacity(100);
        line-height: @file-attachment-caption-height;
        height: @file-attachment-caption-height;
        text-shadow: 0px 0px 2px white;

        .buttons {
          /*
           * This provides enough padding to cleanly cover much of any file
           * attachment's header below.
           */
          @buttons-padding-vert: 5px;

          position: absolute;
          padding: @buttons-padding-vert 0;

          /* Line up with .file's side borders. */
          margin: 0 0 0 (-1px - @file-caption-padding);

          text-align: center;
          background: darken(@file-attachment-bg, 5%);
          border: 1px @file-attachment-border-color solid;
          border-top: 0;
          display: block;
          width: @file-attachment-width;
          .border-radius(0 0 @box-border-radius @box-border-radius);
          .box-sizing(border-box);
          .box-shadow(@box-shadow);
          z-index: @z-index-deco;
        }
      }

      .inline-editor-form > input[type='text'] {
        background: transparent;
        border: 0;
        font-family: inherit;
        font-size: inherit;
        height: @file-attachment-caption-height;
        margin: 0;
        padding-top: 0;
        padding-bottom: 0;

        /*
         * The 4px is needed to align the input with the text. It matches
         * the margin between the text and pencil.
         */
        padding: 0 @edit-icon-margin 0 0;

        text-align: inherit;
        vertical-align: bottom;
        .box-sizing(border-box);

        &:focus {
          outline: 0;
        }

        /*
         * The box shadow doesn't display correctly in file attachment
         * thumbnails, so hide it. There will be a red background instead.
         */
        &:not(:focus) {
          background: rgba(255, 0, 0, 0.15);
          .box-shadow(none);
        }

        &::-ms-clear {
          display: none;
        }
      }

      .rb-icon-edit {
        vertical-align: middle;
        position: absolute;
        right: 6px;
        bottom: 6px;
      }
    }
  }
}


/****************************************************************************
 * Screenshots
 ****************************************************************************/
.screenshot-caption {
  background-color: #F6F6F6;
  border: 1px #999999 solid;
  border-top: 1px #CCCCCC solid;
  padding: 2px 8px;
  .border-radius(0 0 @box-border-radius @box-border-radius);

  img {
    vertical-align: bottom;
  }
}

.screenshot-container {
  background: white;
  float: left;
  display: inline;
  margin-bottom: 10px;
  margin-right: 10px;
  max-width: 400px;
  min-width: 130px;
  text-align: center;
  vertical-align: middle;
  position: relative;
  .border-radius(@box-border-radius);

  &:hover {
    background-color: #F6F6F6;

    .screenshot-caption {
      background-color: #E6E6E6;
    }
  }

  a {
    color: black;
    text-decoration: none;
  }

  .image {
    border: 1px #999999 solid;
    border-bottom: 0;
    cursor: pointer;
    height: 100px;
    line-height: 100px;
    margin: 0 auto;
    vertical-align: bottom;
    .border-radius(@box-border-radius @box-border-radius 0 0);

    img {
      vertical-align: middle;
      .border-radius(@box-inner-border-radius @box-inner-border-radius 0 0);
    }
  }
}


/****************************************************************************
 * Screenshot Thumbnails
 ****************************************************************************/
#screenshot-thumbnails {
  margin: 2px;
  padding: 0.5em;

  &.dragover {
    border: 2px green dashed;
    display: block;
    margin: 0;
  }
}


/****************************************************************************
 * List of Attached Files
 ****************************************************************************/
#file-list {
  margin: 0;
  padding: 0;

  &.dragover {
    border: 2px green dashed;
    display: block;
    margin: 0;
  }

  /*
   * When hovering over a thumbnail, fade out all the other thumbnails, to both
   * provide focus to the thumbnail the user is hovering over, and to help
   * separate out the actions menu from other thumbnail contents.
   */
  .file.faded {
    opacity: 0.5;
  }

  h1.drop-indicator {
    clear: both;
    text-align: center;
  }
}


/****************************************************************************
 * Comment detail dialog
 ****************************************************************************/
.comment-dlg {
  border: 1px @comment-dlg-border-color solid;
  .border-radius(@box-border-radius);
  .box-shadow(@box-shadow);
  cursor: default;
  margin-top: 8px;
  overflow: hidden;
  position: absolute;

  form {
    background-color: @comment-dlg-bg;
    display: block;
    padding: @comment-dlg-padding;

    .buttons {
      margin: 0;

      input[type="button"] {
        margin-right: (@comment-dlg-padding / 2);
      }
    }
  }

  h1 {
    background: transparent;
    border: 0;
    margin: 0;
    padding: 0;
  }

  img.ui-resizable-grip {
    /* Use -1 for bottom and right so it overlaps the resize borders. */
    bottom: -1px;
    cursor: se-resize;
    padding: 0.5em;
    position: absolute;
    right: -1px;
    z-index: @z-index-deco;
  }

  .comment-dlg-body,
  .comment-dlg-footer,
  .comment-dlg-header {
    position: relative;
  }

  .comment-dlg-footer {
    padding: @comment-dlg-padding 0 0 0;

    .status {
      display: none;
      font-style: italic;
      margin-bottom: @comment-dlg-padding;
    }
  }

  .comment-dlg-header {
    padding: 0 0 @comment-dlg-padding 0;
    line-height: 16px;

    .markdown-info {
      line-height: inherit;
    }
  }

  .comment-dlg-options {
    list-style: none;
    margin: 0;
    padding: @comment-dlg-padding 0 0 0;

    li {
      margin: (@comment-dlg-padding / 2) 0;
      padding: 0;

      &:first-child {
        margin-top: 0;
      }

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

  .markdown-info {
    line-height: 16px;
  }

  .other-comments {
    background-color: @comment-dlg-other-comments-bg;
    border-right: 1px @comment-dlg-border-color solid;
    padding: @comment-dlg-padding;

    ul {
      background-color: white;
      border: 1px #333333 solid;
      list-style: none;
      margin: @comment-dlg-padding 0 0 0;
      overflow: auto;
      padding: 0;
      position: relative;

      li {
        padding: @comment-dlg-padding;

        &.even {
          background-color: #F3F3F3;
        }

        h2 {
          font-size: 90%;
          margin: 0 0 @comment-dlg-padding 0;
          padding: 0;

          .actions {
            font-weight: normal;
            right: @comment-dlg-padding;

            a {
              color: blue;
              cursor: pointer;
              text-decoration: none;
              margin-left: @comment-dlg-padding;
              padding: 3px;

              &:hover {
                background-color: #F6F6F6;
              }
            }
          }
        }

        pre {
          .pre-wrap;
          font-size: 90%;
        }
      }
    }
  }

  .text-editor {
    border: @textarea-border;
    margin: 0;

    .CodeMirror, textarea {
      border: 0;
    }
  }

  .ui-icon-gripsmall-diagonal-se {
    background: url('@{img_base}/resize-grip.png') no-repeat top left;
  }
}

.issue-state {
  @issue-state-height: 26px;

  font-weight: bold;
  line-height: @issue-state-height;
  margin-bottom: 2em;
  min-height: @issue-state-height;
  padding: 0.6em;
  .transition(0.1s linear all);

  input, .back-to-issue-summary {
    /*
     * This keeps a consistency with the browser. By default, Chrome uses
     * a margin of 2px, and changing it to 0 actually makes things look
     * off-center.
     */
    margin: 2px 2px 2px 0.2em;
    vertical-align: middle;
  }

  .issue-container {
    position: relative;
  }

  .rb-icon {
    margin: 0 0.2em;
  }

  &.dropped {
    background: @issue-discarded-bg;
    border: 1px @issue-discarded-border-color solid;

    .back-to-issue-summary, .back-to-issue-summary:visited {
      color: @issue-discarded-link-color;
    }
  }

  &.open {
    background: @issue-opened-bg;
    border: 1px @issue-opened-border-color solid;

    .back-to-issue-summary, .back-to-issue-summary:visited {
      color: @issue-opened-link-color;
    }
  }

  &.resolved {
    background: @issue-resolved-bg;
    border: 1px @issue-resolved-border-color solid;

    .back-to-issue-summary, .back-to-issue-summary:visited {
      color: @issue-resolved-link-color;
    }
  }

  .back-to-issue-summary {
    font-size: 13px;
    font-weight: normal;
    text-decoration: none;
    padding: 0 0.5em;
    position: absolute;
    right: 0;
    height: 24px;
    line-height: 24px;

    &:hover {
      text-decoration: underline;
    }
  }

  .issue-message {
    margin-right: 0.5em;
    vertical-align: middle;
  }

  .on-mobile-medium-screen-720({
    .back-to-issue-summary {
      display: none;
    }

    .issue-actions {
      display: block;
      margin-top: 0.5em;

      input:first-child {
        margin-left: 0;
      }
    }

    .issue-details {
      display: inline-block;
      overflow: hidden;
      vertical-align: top;
    }
  });
}


/****************************************************************************
 * Banners
 ****************************************************************************/
#discard-banner,
#submitted-banner {
  background: #E0E0E0;
  border: 1px #808080 solid;
}

#draft-banner,
#discard-banner,
#submitted-banner {
  border-top: 0;
  border-left: 0;
  border-right: 0;
  .box-shadow(@box-shadow);
  margin-top: -@page-container-padding;
  margin-left: -@page-container-padding;
  margin-right: -@page-container-padding;
  margin-bottom: @page-container-padding;
  padding: @page-container-padding;

  .interdiff-link {
    margin-top: 1em;
  }

  .on-mobile-medium-screen-720({
    .banner-actions {
      margin-bottom: 2em;
    }
  });

  p label {
    .inline-editor-label();
    padding-top: 1em
  }

  &>p {
    margin: 1em 0 0 0;
  }
}

#review-banner {
  padding-bottom: 4em;

  .banner {
    border-left: 0;
    border-right: 0;
    border-top: 0;
    left: 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: @z-index-banner;
    .box-shadow(@box-shadow);
  }
}


/****************************************************************************
 * Tooltips
 ****************************************************************************/
.tooltip {
  background-color: #fef6b3;
  border: 1px #a58600 solid;
  padding: 4px;
  position: absolute;
  max-width: 60em;

  &.comments {
    border: 1px black solid;
    border-bottom: 0;
    padding: 0;

    > ul {
      list-style: none;
      margin: 0;
      padding: 0;

      > li {
        background-color: #a1c0e3;
        border-bottom: 1px #5170b3 solid;
        margin: 0;
        padding: 5px;

        &.draft {
          background-color: #aceb6f;
          border-bottom: 1px black solid;
        }

        div {
          &.reviewer {
            font-weight: bold;
          }
        }

        pre {
          .pre-wrap;
          font-size: 8pt;
          margin: 0;
          padding: 0;
        }
      }
    }
  }
}


/****************************************************************************
 * Bubbles
 ****************************************************************************/
.bubble {
  background-color: white;
  border: 1px black solid;
  font-size: 10pt;
  font-weight: bold;
  padding: 6px;
  position: absolute;
  white-space: nowrap;
  z-index: @z-index-dialog;
  .border-radius(8px);
}


/****************************************************************************
 * Issue Summary
 ****************************************************************************/

.issue-table-wrapper {
  clear: both;
}

#issue-summary-table {
  @issue-status-gravatar-width: 24px;
  @issue-status-icon-width: 16px;
  @issue-status-icon-right-margin: 2px;

  border: 1px @issue-table-border-color solid;
  .border-radius(@box-border-radius);
  border-spacing: 0;
  overflow: hidden;
  width: 100%;

  .on-mobile-medium-screen-720({
    border: 1px @dark-yellow solid;
  });

  tr {
    td {
      border-top: 1px transparent solid;
      cursor: pointer;
      padding: @issue-table-cell-padding;
      vertical-align: middle;

      a {
        color: #0000CC;
        text-decoration: none;
      }

      .rb-icon {
        margin-right: @issue-status-icon-right-margin;
      }

      .on-mobile-medium-screen-720({
        display: block;
      });
    }

    &.hidden {
      display: none;
    }
  }

  thead {
    .on-mobile-medium-screen-720({
      display: none !important;
    });

    th {
      background: @issue-table-header-bg;
      border-bottom: 1px #BBB solid;
      cursor: pointer;
      height: 21px;
      padding: 2px 8px;
      text-align: left;
      white-space: nowrap;

      &:hover {
        background: @issue-table-header-hover-bg;
      }
    }
  }

  .issue {
    /*
     * Sets the background and hover colors for an issue row of a given type.
     */
    .issue-row-colors(@bg, @hover-bg) {
      &:hover td {
        background-color: @hover-bg;
      }

      td {
        background-color: @bg;
      }
    }

    /* Add borders separating groups of different types of statuses. */
    &:not(.hidden) {
      &.open + .issue:not(.open),
      &.dropped + .issue:not(.dropped),
      &.resolved + .issue:not(.resolved) {
        td {
          border-top-color: @issue-table-row-border-color;

          .on-mobile-medium-screen-720({
            border-top-color: transparent;
          });
        }
      }
    }

    .issue-text {
      vertical-align: middle;
    }

    .summary-table-description {
      line-height: 16px;
      overflow: hidden;
      vertical-align: top;
      width: 100%;
    }

    &.open {
      .issue-row-colors(@issue-opened-bg, @issue-opened-hover-bg);
    }

    &.dropped {
      .issue-row-colors(@issue-discarded-bg, @issue-discarded-hover-bg);
    }

    &.resolved {
      .issue-row-colors(@issue-resolved-bg, @issue-resolved-hover-bg);
    }

    .reviewer {
      padding: 0 @issue-table-cell-padding;

      a {
        padding: @issue-table-cell-padding 0;
      }
    }

    .last-updated {
      padding: @issue-table-cell-padding;
    }

    .on-mobile-medium-screen-720({
      @issue-status-icon-mobile-margin-horiz: (@issue-status-gravatar-width -
                                               @issue-status-icon-width) / 2;

      /*
       * Add a border betwen all sections, but don't add it to the very top.
       * This sort of selector will guarantee all visible rows following the
       * first visible row will have a top border set.
       */
      &:not(.hidden) ~ .issue:not(.hidden) {
        td:first-child {
          border-top-color: @issue-table-row-border-color;
        }
      }

      td {
        &.summary-table-description,
        &.reviewer,
        &.last-updated {
          padding-left: 1em;
          padding-right: 1em;
        }

        &.summary-table-description {
          padding-top: 1em;
        }

        &.last-updated {
          padding-bottom: 1em;
        }
      }

      .issue-icon {
        margin: 0 @issue-status-icon-mobile-margin-horiz;
      }

      .last-updated time {
        /* Align the text. */
        margin-left: (@issue-status-gravatar-width +
                      @issue-status-icon-mobile-margin-horiz);
      }

      .status, .summary-table-description {
        width: auto;
      }
    });
  }

  .no-issues {
    td {
      background-color: #FFF;
    }
  }

  .comment-id, .last-updated, .reviewer, .status {
    vertical-align: middle;
    white-space: nowrap;

    img {
      vertical-align: middle;
    }

    .on-mobile-medium-screen-720({
      white-space: normal;
    });
  }
}

#issue-summary {
  @tabs-margin-left: 2.5em;

  .issue-summary-header {
    margin: 1.5em 0 -1px 0;
    padding-bottom: 0;
    position: relative;

    .issue-summary-tabs {
      list-style: none;
      margin: 0 0 0 @tabs-margin-left;
      padding: 0;

      .issue-summary-tab {
        border: 1px transparent solid;
        border-bottom: 0;
        .border-radius(@box-border-radius @box-border-radius 0 0);
        cursor: pointer;
        display: inline-block;
        margin: 0 0.5em 1px 0;
        padding: 0.5em 1em;
        vertical-align: bottom;

        * {
          cursor: pointer;
          vertical-align: middle;
        }

        &:hover {
          background: @issue-table-tab-hover-bg;
          border-color: @issue-table-tab-hover-border-color;
        }

        &.active {
          background: @issue-table-tab-bg;
          border-color: @issue-table-tab-border-color;

          /*
           * Make the tab flush with the top border of the issue table,
           * along with the -1px margin-bottom in .issue-summary-header.
           */
          margin-bottom: 0px;

          label, span {
            /*
             * Compensate for the 1px vertical difference in content
             * between the active and inactive tabs.
             */
            padding-bottom: 1px;
          }
        }

        &.issue-summary-total {
          label, span {
            display: inline-block;
          }
        }

        label {
          color: black;
          font-weight: normal;
          margin-right: 3px;
          line-height: 16px;
        }

        .issue-counter-value {
          vertical-align: middle;
        }
      }
    }

    .issue-summary-filters {
      position: absolute;
      bottom: 0;
      right: @box-padding;
      margin-bottom: 1em;

      .on-mobile-medium-screen-720({
        position: initial;
        text-align: right;
      });

      .issue-summary-filter-wrapper {
        display: inline;
        margin: 0 0.5em;

        .on-mobile-medium-screen-720({
          display: block;
          margin: 1em 0.5em;
        });

        &:first-child {
          margin-left: 0;
        }

        select {
          margin-left: 0.2em;
        }
      }
    }
  }
}


/****************************************************************************
 * Rich text
 ****************************************************************************/

.rich-text {
  .markdown-wysiwyg();
}


/****************************************************************************
 * "Update Diff" dialog
 ****************************************************************************/

.update-diff {
  width: 60em;
  height: 16em;

  #error-contents,
  #parent-diff-error-contents {
    margin: 0 5em;
  }

  .input {
    height: 16em;
    line-height: 16em;
    margin: 2em 2em 6em 2em;
    border: 1px solid @grey;
  }

  .upload-diff-ui();
}


// vim: set et ts=2 sw=2:
