@use '../../../../styles/_globals.scss' as *;
@use '../../tasks/task/task.component.mixins' as *;

:host {
  display: flex;
  flex-direction: column;
  min-width: 260px;
  width: 260px;
  overflow: hidden;
  // there needs to be enough space for the fab buttons

  padding-bottom: 96px;
  margin-bottom: var(--s4);

  @include mq(xs, max) {
    width: auto;
    padding: 0;
    margin-bottom: var(--s2);
  }
}

:host header {
  margin-top: var(--s2);
  margin-right: -4px;
  margin-left: -4px;
  border-radius: 8px;
  //position: sticky;
  //top: -2px;
  //&.is-stuck {
  //  background: white;
  //  box-shadow: var(--whiteframe-shadow-2dp);
  //  z-index: 10;
  //}
}

.day-title {
  font-size: 22px;
  text-align: center;
  font-weight: bold;
  vertical-align: middle;
  padding-top: var(--s);

  .date {
    font-size: 12px;
  }
}

.day-counts {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--s) 0;
  border-radius: var(--card-border-radius);
  font-size: 18px;

  mat-icon:last-of-type {
    margin-left: var(--s);
    font-size: 16px;
  }
}

.day-estimate {
  margin-top: var(--s);
  font-size: 16px;
  text-align: center;
}

.section-title {
  display: flex;
  justify-content: center;
  margin: 12px 0 var(--s);
}

.normal-tasks,
.scheduled,
.deadlines {
  margin-top: var(--s-half);
  display: flex;
  flex-direction: column;
}

.scheduled {
  flex-grow: 1;
  /* Additional styles if needed */
  margin-top: var(--s2);
}

.normal-tasks-items,
.scheduled-items,
.deadline-items {
  min-height: var(--planner-item-height);
  flex-grow: 1;
}

.normal-tasks-items > * {
  margin-bottom: var(--s);
}

.scheduled-item {
  display: flex;
  align-items: center;
  margin-bottom: var(--s);

  &.Task .time {
    cursor: pointer;
    border-radius: 50%;
    background: var(--task-c-bg);
  }

  .time {
    text-align: center;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    min-width: 40px;
    margin-right: var(--s-half);
    flex-grow: 0;
    display: flex;
    justify-content: center;
    align-items: center;

    font-size: var(--planner-font-size-smaller-mobile);

    @include mq(xs) {
      font-size: var(--planner-font-size-smaller);
    }

    mat-icon {
      display: none;
    }

    &:hover {
      mat-icon {
        display: block;
      }

      span {
        display: none;
      }
    }
  }

  .time-time {
    line-height: 1;
    text-align: center;
    white-space: wrap;
    display: inline-flex;
    max-width: 30px;

    ::ng-deep span {
      text-align: center;
      font-size: 9px;
    }
  }

  > :nth-child(2) {
    flex-grow: 1;
    min-width: 0;
  }
}

.empty {
  text-align: center;
  font-style: italic;
  line-height: var(--planner-item-height);
  height: 0;
}
