@use '../../../../styles/_globals.scss' as *;

:host {
  display: block;
  text-align: left;
  // min-height: 50px;
  list-style: none;
  // add a little padding to top and bottom, to make drag dropping easier
  padding: 5px 0;
  margin: 0;
  position: relative;

  ::ng-deep task-list & {
    margin: var(--s-quarter) 5px 0 5px;

    @include mq(xs, max) {
      margin: 1px 0 0 10px;
    }
  }
}

// Sub-task drop lists keep their drag-drop padding INSIDE the cdkDropList
// element (`.task-list-inner`) instead of on :host, so the strip above the
// first subtask and below the last one becomes part of the CDK drop rect. A
// task dragged into that strip then enters the list and CDK drops it as the
// first / last child (SingleAxisSortStrategy._shouldEnterAsFirstChild).
// Without it, the only target for the first/last slot is half of the edge row,
// which is awkwardly small to hit (#7905 scenario B). The matching :host
// padding is dropped for sub-lists so the visible gap stays compact.
:host-context(.sub-tasks) {
  padding-top: 0;
  padding-bottom: 0;
}

.task-list-inner[data-list-id='SUB'] {
  padding: var(--s) 0;
}

.done-task-box {
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.no-tasks {
  @include center;
  text-align: center;
  width: 90%;

  color: var(--text-color-muted);
}

.expand-tasks-btn {
  opacity: 0.8;

  &:hover {
    opacity: 1;
  }
}

.cdk-drag-placeholder,
.cdk-drag-preview {
  border-radius: var(--task-border-radius);
  overflow: hidden;

  ::ng-deep .controls {
    display: none;
  }
  ::ng-deep .box {
    display: none;
    box-shadow: none !important;
  }
}
