/*
 * @link https://www.humhub.org/
 * @copyright Copyright (c) 2018 HumHub GmbH & Co. KG
 * @license https://www.humhub.com/licences
 *
 */

@tasks-text-color: #555;
@tasks-info-color: #21A1B3;

#task-assignment-info {
  margin: 5px 0 0;
}


#task-container {

  .task-head {
    padding-left: 5px;
  }

  .panel-heading {
    background-color: #f7f7f7;

    .task-header-panel {
      padding-right: 10px;
      float: left;

      border-right: 2px solid #ededed;
      padding-left: 10px;

      strong {
        font-size: 13px;
      }
    }

    .task-header-panel:last-child {
      border-right: 0;
    }

    .task-header-panel:first-child {
      padding-left: 0;
    }

    .col-sm-12 {
      overflow: visible;
    }

    .task-change-state-button {
      margin-top: 20px;
    }

    .assigned-anyone {
      font-size: 14px;
      font-style: italic;
      margin: 2px;
      color: #7a7a7a;
    }
  }

  .panel-heading .media {
    .updated {
      color: #bebebe;
      font-size: 11px;
      font-weight: bold;
    }

    .author a {
      color: #bebebe;
      font-size: 11px;
    }
  }
}

.task-overview {

  #filter-tasks-list {
    margin-top: 15px;
    .empty {
      margin: 15px 0;
    }

    .media-list {
      margin-bottom: 0;

      li:last-of-type {
        border-bottom: 0;
      }
      li, .empty {
        background: #FFF;
        box-shadow: 0 0 4px rgba(0, 0, 0, 0.08);
        border-radius: 4px;
        padding: 20px;
        color: @tasks-text-color;
        font-size: 13px;
      }
    }
  }

  li {
    cursor: pointer;
    margin-bottom: 4px;
    &:last-child {
      border-bottom: 0;
    }
  }

  .media-list {

    .progress {
      margin-top: 2px;
      margin-bottom: 3px;
    }

    .summary, .empty {
      font-size: 12px;
      color: #bac2c7;
      padding-left: 10px;
    }

    .pagination {
      margin-bottom: 0;

      li {
        border: 0;
        padding: 0 !important;
      }

      li:hover {
        border: 0;
      }
    }
  }



  #task-export-button {
    float:right;
  }

  @media (max-width: 767px) {
    #task-filter-nav {
      overflow: auto;
    }

    #task-export-button {
      float:none;
    }

  }

  label {
    display: block;
    font-size: 13px;
    font-weight: bold;
    color: @tasks-text-color;
  }

  #task-filter-nav {
    background: #FFF;
    border-radius: 4px;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.08);
    padding: 20px;

    .filter-list a {
      white-space: nowrap;
    }

    .filter-root {
      margin: 0;

      .filterInput {
        font-size: 13px;
        margin: 5px;
      }
      .filterInput.task-date-picker , .select2-search__field {
        font-size: 14px;
      }

      ul.filter-list li {
        padding: 2px 0;
      }
    }

    .filter-panel {
      vertical-align: top;
      width: auto !important;
      padding: 0 40px;
      &:first-child {
        padding-left: 0;
      }
      &:last-child {
        padding-right: 0;
      }
    }

    .task-filter-picker-container {
      width: 200px;
    }

    #task-filter-loader {
      padding-top: 12px;
    }

    .task-bottom-panel {
      margin: 16px 0;
      .filterInput {
        margin: 5px;
        &[data-filter-type=checkbox] .fa {
          width: 18px;
          height: 18px;
          margin: 0 4px -4px -5px;
          border: 2px solid #D7D7D7;
          border-radius: 4px;
          &:before {
            content: "";
          }
          &.fa-check-square-o {
            border-color: #21A1B3;
            background: #21A1B3;
          }
        }
      }

      .filterInput.task-date-picker {
        margin: 0;
        height: 45px;
        width: 200px;
      }
    }

    .select2 {
      width: 260px !important;
      display: inline-block;
    }
  }
}

#task-list-loader {
  float: right;
}

.task-items {
  list-style: none;
  padding: 0;
  margin: 0;
  height: auto !important;
}

.task-details {
  h1 {
    font-size: 22px;
    margin-bottom: 5px;
  }

  h2 {
    font-size: 17px;
    color: #919191;
    font-weight: 300;
    margin-top: 0;
  }

  h1.task-item-title {
    font-size: 20px;
  }
}

.wall-entry .media .task {

  .progress {
    margin-top: 2px;
    margin-bottom: 3px;
  }
}

.task-infos {
  display: flex;
  flex-wrap: wrap;
}

.task-info {
  flex: 1;
  display: inline-block;
  padding: 0 10px 10px 0;
  white-space: nowrap;
  &.task-info-id {
    flex: 0.5;
  }

  > strong {
    display: block;
    margin-bottom: 5px;
  }

  .task-info-text {
    font-size: 13px;
  }

  div {
    font-style: italic;
    padding-bottom: 2px;
    font-size: 13px;
  }
}

@media (max-width: 991px) {
  .agenda-point {
    display: none !important;
  }

  .edit-link {
    display: inline-block !important;
  }

  //.task-item-container:before {
  //  display: none !important;
  //}
}

@media (max-width: 1119px) {
  //.task-item-container:before {
  //  //left: 5% !important;
  //  display: none !important;
  //}
}


.field-task-all_day label {
  padding: 0 !important;
}


.closed-task-list-view {
  ul.media-list {
    margin-bottom: 0;
  }
  li {
    border-left: 0 !important;
  }

  li:hover {
    background-color: #fff8e0 !important;
    border-left: 0 !important;
  }
}

.task-list-header {
  margin-bottom: 30px;
  .panel-body {
    padding: 20px;
  }
  h4 {
    color: @tasks-text-color;
    font-weight: 600;
    margin-top: 0;
  }
  .help-block {
    &, &:hover {
      color: @tasks-text-color !important;
      font-size: 13px;
    }
  }
}

.task-list-tabs {
  margin-bottom: 12px;
}
#task-space-menu {
  background: none;
  padding: 0 0 8px 0;
  border-bottom: 1px solid #D7D7D7;
  li {
    a {
      background: none;
      border-top: 0 !important;
      border-left: 0 !important;
      border-bottom: 0 !important;
      border-right: 1px solid #C4C4C4;
      border-radius: 0;
      padding: 3px 8px;
    }
    &:first-child {
      a {
        padding-left: 0;
      }
    }
    &.active {
      a {
        color: @tasks-info-color;
      }
    }
  }
}
#toggle-lists {
  padding: 1px 16px 0 0;
  &, &:hover, &:active {
    background: none;
    border: none;
    box-shadow: none;
    color: #435F6F !important;
    font-weight: 600;
    font-size: 13px;
  }
  .fa {
    font-size: 22px;
    vertical-align: middle;
    margin: -3px 6px 0 0;
  }
}

.task-list {
  .toggleItems {
    font-size: 22px;
    line-height: 16px;
    margin-left: 22px;
  }

  .fa-bars {
    color: #9b9b9b;
  }

  .task-list-title-bar.collapsable {
    cursor: pointer;
  }

  .task-list-title-bar > i:first-of-type, .task-list-item-title > i:first-of-type {
    margin-right: 10px;
  }
}

.task-list .empty, .closed-task-list-view .empty {
  padding: 15px 10px;
  font-size: 13px;
}

.closed-task-lists-container {

}

.task-list .panel-body {
  padding-bottom: 0;
}

.task-list .pagination-container {
  background-color: #f7f7f7;
  border-bottom: 1px solid #ddd;
  border-radius: 4px;

  li {
    border: 0 !important;
  }

  li:hover {
    background: transparent;
  }
}

// LIST VIEW
.task-list-container {
  border-left: 3px solid;
  border-radius: 4px;
  padding: 0 10px 0 7px;
  .task-list-task-title-bar, .task-moving-handler:hover {
    cursor: pointer;
  }
  .task-list-title-bar > div {
    margin: 0 -10px;
    .task-moving-handler, .task-list-edit {
      display: none;
    }
    padding: 7px 10px;
    &:hover {
      background: #F0F0F0;
      border-radius: 4px;
      .task-moving-handler, .task-list-edit {
        display: inline-block;
      }
    }
  }
}


.task-list-title-bar {
  border-bottom: 1px solid #ddd;
  padding: 10px 0;
  margin: 0 10px;

  button {
    margin-left: 5px;
  }

  .task-list-title-text {
    font-weight: 600;
    font-size: 14px;
  }
}

.task-list-ul {
  margin: 0;
  padding: 0;
}
.task-list-li {
  margin-bottom: 8px;
  background: #FFF;
  border-radius: 4px;
  border: 1px solid #ddd;
  .closed-task-lists-container {
    background: #F9F9F9;
  }
  .task-toggled-color {
    color: @tasks-info-color;
  }
  &.task-list-li-collapsed {
    .task-toggled-color {
      color: #000;
    }
    .task-list-title-bar {
      border-bottom: none;
    }
  }
}

.ui-sortable-helper {
  background-color: white;
  border: 1px solid #ddd;
}

.task-checklist {
  ul {
    margin-left: 10px;
  }

  .task-item:hover {
    background: #f7f7f7;
  }

  .task-item-content {
    margin-left: 8px;
  }

  label.item-finished {
    text-decoration: line-through;
    font-style: italic;

    input[type=checkbox]:checked {
      border-color: #bdbdbd;
      background: #bdbdbd;
    }
  }
}

#task-container {
  .task-list-task-details {
    border: 0;
  }

  .task-list-task-details-body {
    padding: 0;
  }
}

.task-list-items {
  min-height: 20px;
  margin: 0 10px;
  .task-list-item {
    .task-list-task-details {
      border-top: 1px dashed #ddd;

      .wall-entry-controls, .wall-entry-controls a {
        margin-top: 0;
      }

      .task-details-body {
        margin: 10px 0;
      }
    }

    .task-list-task-title-bar {
      padding: 10px 0;
      margin: 0 -10px;
      .fa {
        &.fa-arrows, &.fa-ellipsis-v {
          color: @tasks-info-color;
        }
      }
      .toggleTaskDetails {
        font-size: 13px;
      }
      > div {
        padding: 3px 10px;
        .task-moving-handler {
          display: none;
        }
        &:hover {
          background: #F0F0F0;
          border-radius: 4px;
          .task-moving-handler {
            display: inline-block;
          }
        }
      }
    }
    .task-list-task-details {
      padding: 15px 0;
    }

    .task-list-item-title .label {
      margin-left: 10px;
    }

    .task-list-task-title-bar.highlighter {
      background-color: #fff8e0;
      border-radius: 4px;
      padding: 5px;
      margin-top: 5px;
      margin-bottom: 5px;
      > div {
        padding: 3px 5px;
      }
    }

    border-bottom: 1px solid #ddd;
  }

  .task-list-item:last-child {
    border-bottom: 0;
  }

  .task-list-task-completed-show-more {
    text-align: center;
    padding: 5px;
    background-color: #f7f7f7;
  }


}

.tasks-completed {
  min-height: 0 !important;
  .task-list-item:first-child {
    border-top: 1px solid #ddd;
  }
}

.task-list-state-highlight {
  height: 60px !important;
  line-height: 1.2em;
  background-color: #fff8e0;
  margin: 10px 0;
}

.task-state-highlight {
  height: 30px;
  line-height: 1.2em;
  background-color: #fff8e0
}

.task-list-color {
  display: inline-block;
  width: 1.2em;
  height: 1.2em;
  border-radius: 4px;
  margin: -2px 2px 0 0;
  vertical-align: middle;
  box-shadow: 0.2px 0.2px 1px;
}

.task-controls {
  font-size: 12px;
  margin-right: 10px;
  border-right: 1px solid #eee;
  padding-right: 10px;

  .dropdown-toggle {
    width: 20px;
    padding: 0;
    display: inline-block;
    text-align: center;
    box-shadow: none;
  }

}

.task-controls.end {
  font-size: 12px;
  margin-right: 0;
  border-right: none;
  padding-right: 0;
}


.task-controls .fa {
  font-size: 14px;
  margin-top: 4px;
}

.task-controls a {
  color: #999;
}

.task-controls a:hover {
  color: #3b4854;
}

.task-empty-list-alert {
  margin-bottom: 10px;
}

#task-form .ProseMirror-menubar-wrapper {
  z-index: 8;
}

#task-form .ProseMirror {
  min-height: 150px !important;
}

.wall-entry-task h1 {
  font-size: 14px;
  font-weight: 500;
}

.nav-pills.task-preferences {
  position: inherit;
  top: 0;
  left: 0;
  .dropdown .dropdown-toggle i {
    font-weight: normal;
  }
}
