@import "./issues/issue_count_badge";

.issues-list {
  .issue {
    padding: 10px 0 10px $gl-padding;
    position: relative;

    .title {
      margin-bottom: 2px;
    }

    .issue-labels {
      display: inline-block;
    }

    .icon-merge-request-unmerged {
      height: 13px;
      margin-bottom: 3px;
     }
  }
}

.issue-realtime-pre-pulse {
  opacity: 0;
}

.issue-realtime-trigger-pulse {
  transition: opacity $fade-in-duration linear;
  opacity: 1;
}

.check-all-holder {
  line-height: 36px;
  float: left;
  margin-right: 15px;
}

.issues_content {
  .title {
    height: 40px;
  }

  form {
    margin: 0;
  }
}

form.edit-issue {
  margin: 0;
}

ul.related-merge-requests > li {
  display: -ms-flexbox;
  display: -webkit-flex;
  display: flex;
  align-items: center;

  .merge-request-id {
    flex-shrink: 0;
  }

  .merge-request-info {
    margin-left: 5px;
  }

  .row_title {
    vertical-align: bottom;
  }

  gl-emoji {
    font-size: 1em;
  }
}

.merge-requests-title,
.related-branches-title {
  font-size: 16px;
  font-weight: $gl-font-weight-bold;
}

.merge-request-id {
  display: inline-block;
}

.merge-request-status {
  font-size: 13px;
  padding: 0 5px;
  color: $white-light;
  height: 20px;
  border-radius: 3px;
  line-height: 18px;

  &.merged {
    background: $blue-500;
  }

  &.closed {
    background: $red-500;
  }

  &.open {
    background: $green-500;
  }
}

.merge-request,
.issue {
  &.today {
    background: $issues-today-bg;
    border-color: $issues-today-border;
  }

  &.closed {
    background: $gray-light;
    border-color: $border-color;
  }

  &.merged {
    background: $gray-light;
    border-color: $border-color;
  }
}

.merge-request-ci-status,
.related-merge-requests {
  .ci-status-link {
    display: block;
    margin-right: 5px;
  }

  svg {
    display: block;
  }
}

@media (max-width: $screen-xs-max) {
  .detail-page-header,
  .issuable-header {
    display: block;

    .issuable-meta {
      line-height: 18px;
    }
  }

  .issuable-actions {
    margin-top: 10px;

    .issue-btn-group {
      width: 100%;

      .btn {
        width: 100%;
      }
    }
  }
}

.issue-form {
  @include new-style-dropdown;

  .select2-container {
    width: 250px !important;
  }
}

.issues-footer {
  padding-top: $gl-padding;
  padding-bottom: 37px;
}

.issue-email-modal-btn {
  padding: 0;
  color: $gl-link-color;
  background-color: transparent;
  border: 0;
  outline: 0;

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

.email-modal-input-group {
  margin-bottom: 10px;

  .form-control {
    background-color: $white-light;
  }

  .btn {
    background-color: $gray-light;
    border: 1px solid $border-gray-normal;
  }
}

.recaptcha {
  margin-bottom: 30px;
}

.new-branch-col {
  padding-top: 10px;
}

.create-mr-dropdown-wrap {
  @include new-style-dropdown;

  .btn-group:not(.hide) {
    display: flex;
  }

  .js-create-merge-request {
    flex-grow: 1;
    flex-shrink: 0;
  }

  .dropdown-menu {
    width: 300px;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    display: none;
  }

  .dropdown-toggle {
    .fa-caret-down {
      pointer-events: none;
      color: inherit;
      margin-left: 0;
    }
  }

  li:not(.divider) {
    &.droplab-item-selected {
      .icon-container {
        i {
          visibility: visible;
        }
      }
    }

    .icon-container {
      float: left;
      padding-left: 6px;

      i {
        visibility: hidden;
      }
    }

    .description {
      padding-left: 30px;
      font-size: 13px;

      strong {
        display: block;
        font-weight: $gl-font-weight-bold;
      }
    }
  }
}

.discussion-reply-holder .note-edit-form {
  display: block;
}

@media (min-width: $screen-sm-min) {
  .emoji-block .row {
    display: flex;

    .new-branch-col {
      padding-top: 0;
      text-align: right;
      align-self: center;
    }

    .create-mr-dropdown-wrap {
      .btn-group:not(.hide) {
        display: inline-block;
      }
    }
  }
}
