/**
 * Dashboard Todos
 *
 */

.navbar-nav {
  li {
    .badge.todos-pending-count {
      margin-top: -5px;
      font-weight: normal;
      background: $todo-alert-blue;
      margin-left: -17px;
      font-size: 11px;
      color: white;
      padding: 3px;
      padding-top: 1px;
      padding-bottom: 1px;
      border-radius: 3px;
    }
  }
}

.todos-list > .todo {
  // workaround because we cannot use border-colapse
  border-top: 1px solid transparent;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: row;
  flex-direction: row;

  &:hover {
    background-color: $row-hover;
    border-color: $row-hover-border;
    cursor: pointer;
  }

  // overwrite border style of .content-list
  &:last-child {
    border-bottom: 1px solid transparent;

    &:hover {
      border-color: $row-hover-border;
    }
  }

  .todo-actions {
    display: -webkit-flex;
    display: flex;
    -webkit-justify-content: center;
    justify-content: center;
    -webkit-flex-direction: column;
    flex-direction: column;
    margin-left: 10px;
    min-width: 55px;
  }

  .todo-item {
    -webkit-flex: auto;
    flex: auto;
  }
}

.todo-item {
  .todo-title {
    @include str-truncated(calc(100% - 174px));
    overflow: visible;
  }

  .status-box {
    margin: 0;
    float: none;
    display: inline-block;
    font-weight: normal;
    padding: 0 5px;
    line-height: inherit;
    font-size: 14px;
  }

  .todo-body {
    .todo-note {
      word-wrap: break-word;

      .md {
        color: #7f8fa4;
        font-size: $gl-font-size;

        .label {
          color: $gl-text-color;
          font-size: inherit;
        }

        p {
          color: #5c5d5e;
        }
      }

      code {
        white-space: pre-wrap;
      }

      pre {
        border: none;
        background: $gray-light;
        border-radius: 0;
        color: #777;
        margin: 0 20px;
        overflow: hidden;
      }

      .note-image-attach {
        margin-top: 4px;
        margin-left: 0;
        max-width: 200px;
        float: none;
      }

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

@media (max-width: $screen-sm-max) {
  .todos-filters {
    .dropdown-menu-toggle {
      width: 135px;
    }
  }
}

@media (max-width: $screen-xs-max) {
  .todo {
    .avatar {
      display: none;
    }
  }

  .todo-item {
    .todo-title {
      white-space: normal;
      overflow: visible;
      max-width: 100%;
      margin-bottom: 10px;
    }

    .todo-body {
      margin: 0;
      border-left: 2px solid #ddd;
      padding-left: 10px;
    }
  }

  .todos-filters {
    .row-content-block {
      padding-bottom: 50px;
    }

    .dropdown-menu-toggle {
      width: 100%;
    }
  }
}

.todos-empty {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;

  @media (min-width: $screen-sm-min) {
    -webkit-flex-direction: row;
    flex-direction: row;
    padding-top: 80px;
  }
}

.todos-empty-content {
  -webkit-align-self: center;
  align-self: center;
  max-width: 480px;
  margin-right: 20px;
}

.todos-empty-hero {
  width: 200px;
  margin-left: auto;
  margin-right: auto;

  @media (min-width: $screen-sm-min) {
    width: 300px;
    margin-right: 0;
    -webkit-order: 2;
    order: 2;
  }
}

.todos-all-done {
  padding-top: 20px;

  @media (min-width: $screen-sm-min) {
    padding-top: 50px;
  }

  > svg {
    display: block;
    max-width: 300px;
    margin: 0 auto 20px;
  }

  p {
    max-width: 470px;
    margin-left: auto;
    margin-right: auto;
  }

  a {
    font-weight: 600;
  }
}
