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

    .title {
      margin-bottom: 2px;
    }

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

    .issuable-meta {
      .author_link {
        display: inline-block;
      }

      .issuable-comments {
        height: 18px;
      }
    }

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

@include media-breakpoint-down(xs) {
  .detail-page-header {
    .issuable-meta {
      line-height: 18px;
    }
  }
}

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

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

.issues-export-modal {
  .modal-header {
    justify-content: flex-start;

    .export-svg-container {
      flex-grow: 1;

      > svg {
        float: right;
      }
    }
  }

  .modal-body {
    padding: 0;

    .export-modal-subheader {
      justify-content: flex-start;
      align-items: center;
      border-bottom: 1px solid $modal-border-color;
      padding: 14px;
    }

    .export-modal-text {
      padding: 24px 16px;
      line-height: 1.5;
      min-height: $modal-body-height;
    }
  }

  .export-svg-container {
    height: 56px;
    padding: 10px 10px 0;
  }

  svg {
    height: 100%;
  }

  .export-checkmark {
    color: $green-400;
  }
}

.issuable-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 {
  .ref::selection {
    color: $placeholder-text-color;
  }

  .dropdown {
    .dropdown-menu-toggle {
      min-width: 285px;
    }

    .dropdown-select {
      width: 285px;
    }
  }

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

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

  .create-merge-request-dropdown-menu {
    width: 300px;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    display: none;
    margin-top: 4px;

    // override dropdown item styles
    .btn.btn-success {
      @include btn-default;
      @include btn-green;

      border-style: solid;
      border-width: 1px;
      line-height: $line-height-base;
      width: auto;
    }
  }

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

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

@include media-breakpoint-up(sm) {
  .emoji-block .row {
    display: flex;

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

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


.issue-token {
  display: inline-flex;
  align-items: stretch;
  max-width: 100%;
  line-height: 1.75;
  white-space: nowrap;
}

.issue-token-link {
  display: inline-flex;
  min-width: 0;

  color: $gl-text-color-secondary;

  &[href] {
    color: $gl-link-color;
  }

  &:hover,
  &:focus {
    outline: none;
    text-decoration: none;
  }
}

.issue-token-reference {
  display: flex;
  align-items: center;
  margin-right: 1px;
  padding-left: 0.5em;
  padding-right: 0.5em;
  background-color: $gray-lighter;
  border-top-left-radius: 2px;
  border-bottom-left-radius: 2px;
  transition: background $general-hover-transition-duration $general-hover-transition-curve, color $general-hover-transition-duration $general-hover-transition-curve;

  .issue-token:hover &,
  .issue-token-link:focus > & {
    background-color: $gray-normal;
    color: $gl-link-hover-color;
    text-decoration: none;
  }
}

.issue-token-state-icon-open {
  color: $green-500;
}

.issue-token-state-icon-closed {
  color: $blue-500;
}

.issue-token-title {
  overflow: hidden;
  display: flex;
  align-items: baseline;
  padding-left: 0.5em;
  background-color: $gray-normal;
  color: $gl-text-color-secondary;
  transition: background $general-hover-transition-duration $general-hover-transition-curve;

  .issue-token:hover &,
  .issue-token-link:focus > & {
    background-color: $border-gray-normal;
  }

  > .fa {
    line-height: inherit;
  }
}

.issue-token-title-standalone {
  padding-right: 0.5em;
  border-top-right-radius: 2px;
  border-bottom-right-radius: 2px;
}

.issue-token-title-text {
  overflow: hidden;
  max-width: 264px;
  text-overflow: ellipsis;
}

.issue-token-remove-button {
  display: flex;
  align-items: center;
  padding: 0 0.5em;
  background-color: $gray-normal;
  border: 0;
  border-top-right-radius: 2px;
  border-bottom-right-radius: 2px;
  color: $gl-text-color-secondary;
  transition: background $general-hover-transition-duration $general-hover-transition-curve;

  &:hover,
  &:focus,
  .issue-token:hover &,
  .issue-token-link:focus + & {
    background-color: $border-gray-normal;
    outline: none;
  }

  > .fa {
    font-size: 0.9em;
  }
}
