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

:host {
  position: relative;
  flex: 1;
  display: flex;
  align-items: stretch;
  flex-direction: row;
  border: 1px solid var(--separator-color);
  border-radius: var(--task-border-radius);
  opacity: 0.9;
  min-height: var(--planner-item-height);
  cursor: pointer;

  &.isBeingSubmitted {
    opacity: 0.4;
    pointer-events: none !important;
  }

  border-color: var(--extra-border-color);

  &:hover {
    border-color: var(--c-accent);
    color: var(--c-accent);
  }

  mat-icon {
    margin-left: var(--s);
    margin-right: var(--s);
    opacity: 0.8;
    font-size: var(--planner-item-ico-size);
    height: var(--planner-item-ico-size);
    width: var(--planner-item-ico-size);
    min-width: var(--planner-item-ico-size);
    max-width: var(--planner-item-ico-size);
  }
}

.event-content {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  padding-top: var(--s-quarter);
  padding-bottom: var(--s-quarter);
}

.menu-trigger {
  position: absolute;
  width: 0;
  height: 0;
  visibility: hidden;
}

.title {
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  font-size: var(--planner-font-size-mobile);

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

// Clock start time at the far right, mirroring a scheduled task's time badge.
.start-time {
  flex-shrink: 0;
  align-self: center;
  padding-right: var(--s);
  text-align: right;
  line-height: 1;
  white-space: nowrap;
  font-size: var(--planner-font-size-mobile);

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

  ::ng-deep span {
    font-size: 10px;
  }
}
