@import '../../style/theme/color';
@import '../../style/theme/corner';
@import '../../style/core/_font';

:host {
  display: block;
  height: 36px;
  line-height: 18px;
}

.devui-gantt-scale {
  display: inline-block;
  color: $devui-placeholder; // TODO: Color-Question
  text-align: center;
  position: absolute;
  height: 36px;
  font-weight: normal;

  &.day {
    &:not(.milestone) {
      &:hover .devui-scale-start {
        display: none;
      }
    }

    &.milestone {
      background-image: linear-gradient(180deg, rgba(254, 204, 85, 0) 0%, rgba(62, 204, 166, 0.1) 100%);
    }
  }

  & .devui-scale-start {
    width: 100%;
    height: 18px;
    position: absolute;
    left: 1px;
    white-space: nowrap;

    &.milestone {
      color: $devui-success;
    }
  }

  & .devui-scale-unit {
    height: 18px;
    position: absolute;
    top: 18px;
    width: 100%;

    & .border-left {
      height: 18px;
      border-left: 1px solid $devui-list-item-selected-bg;
    }

    & .scale-highlight {
      position: absolute;
      height: 18px;
      border-radius: $devui-border-radius;
      background-color: $devui-brand;
      padding: 0 4px 0 4px;

      & div {
        color: $devui-base-bg;
        font-size: $devui-font-size;
        font-weight: normal;
      }
    }

    .today {
      background: rgba(255, 121, 14, 0.2);
      border-radius: $devui-border-radius;
      height: 16px;
    }
  }

  & .milestone-new {
    display: none;
    position: absolute;
    width: 18px;
    height: 18px;
    margin-left: 16px;
    border: 1px solid $devui-list-item-selected-bg; // TODO: Color-Question
    cursor: pointer;

    & div {
      line-height: 16px;
    }
  }

  &:not(.milestone) {
    &:hover .milestone-new.day {
      display: block;
    }
  }
}

.devui-day-split-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  z-index: 1;
  background: $devui-area;
  opacity: 1;
}

.devui-mark-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  z-index: 1;
  background: $devui-line;
  opacity: 0.5;

  &.today {
    opacity: 0.2;
    background: #ff790e;

    &.day {
      width: 40px;
    }

    &.week {
      margin-left: 9px;
    }

    &.month {
      margin-left: 4px;
    }
  }

  &.milestone {
    opacity: 0.2;
    background: $devui-success;

    &.day {
      margin-left: 24px;
    }

    &.week {
      margin-left: 9px;
    }

    &.month {
      margin-left: 4px;
    }
  }
}

.devui-mark-stripe {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  background: $devui-area;
  background-size: 6px 6px;

  &.day {
    width: 80px;
  }

  &.week {
    width: 40px;
  }

  &.month {
    width: 20px;
  }
}
