/* input */
.checkbox {
  position: absolute;
  left: -999em;
  top: -999em;
  visibility: hidden;
  opacity: 0;

  & + .label-checkbox {
    display: flex;
    align-items: center;
    column-gap: var(--space-4);
    padding: var(--space-4) var(--space-8);
    border-radius: var(--bdrxs);
    background: var(--gray-600);
    color: var(--white);
    border-radius: var(--bdrxs);
    transition: width 0.35s;
    cursor: pointer;
  }
  &:checked + .label-checkbox {
    background: var(--color-primary);
  }
}

/* header */
.header {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--space-12);
  background: var(--color-primary);

  & .header-title {
    color: var(--white);
  }
  & .header-info {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    color: var(--white);
    column-gap: var(--space-4);
  }
  & .header-info li {
    display: flex;
    align-items: center;
    column-gap: var(--space-4);
    font-size: var(--font-size-12);
  }
  & .header-info li:before {
    content: "";
    width: 1px;
    height: 12px;
    display: block;
    background: var(--gray-400);
  }
  & .header-info li:first-of-type:before {
    display: none;
  }

  & .status-info li {
    margin-top: auto;
  }
}
.status-bar-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  width: 150px;
  row-gap: var(--space-8);
  align-items: flex-end;

  & strong {
    margin-top: auto;
  }
}
.status-bar-tit {
  font-size: var(--font-size-20);
}
.status-bar {
  overflow: hidden;
  position: relative;
  width: 150px;
  height: 10px;
  border-radius: var(--bdrmd);
  background: var(--gray-400);
  box-shadow: inset 0 5px 5px var(--gray-600);

  & .status-bar-inner {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: var(--enabled);
    border-top-right-radius: var(--bdrxs);
    border-bottom-right-radius: var(--bdrxs);
    transition: width 0.15s 0.35s;
  }
}
/* status legend */
.box-status-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  column-gap: var(--space-8);

  & .tit-status {
    margin: 0;
    font-size: var(--font-size-12);
  }
  & .list-status {
    display: flex;
    align-items: center;
    column-gap: var(--space-8);
    font-size: var(--font-size-12);
    font-weight: bold;
  }
}
.item-status {
  display: flex;
  align-items: center;
  column-gap: var(--space-4);
  padding: var(--space-4) var(--space-8);
  color: var(--white);
  border-radius: var(--bdrxs);
}
.box-status-legend .reported-date {
  margin-right: auto;
  font-size: var(--font-size-12);
  font-weight: bold;
}
.todo {
  background: var(--gray-800);
}
.on-track {
  background: var(--normal);
}
.done {
  background: var(--enabled);
}
.at-risk {
  background: var(--warning);
}
.high-risk {
  background: var(--critical);
}

/* box-status-util */
.box-status-util {
  display: flex;
  align-items: center;
  column-gap: var(--space-8);
  margin-top: 16px;
}
.status-checkbox {
  display: flex;
  align-items: center;
  column-gap: var(--space-8);
}
.filter-status ul {
  display: flex;
  align-items: center;
  font-size: var(--font-size-12);
  column-gap: var(--space-4);

  & li {
    display: flex;
    align-items: center;
    column-gap: var(--space-4);
  }
  & .checkbox:checked + .label-checkbox.on-track {
    background: var(--normal);
  }
  & .checkbox:checked + .label-checkbox.at-risk {
    background: var(--warning);
  }
  & .checkbox:checked + .label-checkbox.high-risk {
    background: var(--critical);
  }
}

/* table */
.table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--white);
  font-size: var(--font-size-12);

  & thead {
    box-shadow: var(--space-4) var(--space-4) 10px rgba(0, 0, 0, 0.1);
  }

  & td {
    padding: var(--space-8);
    border-bottom: 1px solid var(--gray-400);
    text-align: center;
  }
  & td.txt-left {
    text-align: left;
  }

  & th {
    padding: var(--space-8);
    text-align: center;
    border-top: 2px solid var(--black);
    border-bottom: 2px solid var(--black);
    color: var(--black);
  }

  & tbody tr:hover {
    background-color: var(--gray-50);
    cursor: pointer;
  }

  & .status-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    column-gap: var(--space-4);
  }
  & .status {
    display: inline-flex;
    width: 10px;
    height: 10px;
    border-radius: var(--bdrfull);
  }
}

.page-list {
  margin-top: 16px;
}

/* comment style */
.comment-list li {
  display: flex;
  align-items: center;
  gap: var(--space-4);

  &:before {
    content: "";
    width: 3px;
    height: 3px;
    border-radius: var(--bdrxs);
    background: var(--gray-800);
  }
  &.nodata {
    justify-content: center;
  }
  &.nodata::before {
    display: none;
  }
}

.icon-new {
  display: inline-block;
  margin-right: var(--space-4);
  padding: var(--space-4);
  font-size: var(--font-size-8);
  color: var(--white);
  font-style: normal;
  border-radius: var(--bdrxs);
  background: var(--color-primary);
}

/* 우선순위 */
.wrap-priority {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  padding: 0 2px;
  column-gap: 2px;
  border-style: solid;
  border-width: 2px;
  border-radius: var(--bdrxs);
  height: 12px;
  width: calc(100% - 10px);
  background: var(--white);

  & .item-priority {
    height: calc(100% - 2px);

    &:nth-child(1) {
      border-top-left-radius: var(--bdrxxs);
      border-bottom-left-radius: var(--bdrxxs);
    }
    &:nth-child(5) {
      border-top-right-radius: var(--bdrxxs);
      border-bottom-right-radius: var(--bdrxxs);
    }
  }
  &.lv-1 {
    border-color: var(--enabled);
  }
  &.lv-1 .item-priority {
    background: var(--enabled);
  }
  &.lv-2 {
    border-color: var(--normal);
  }
  &.lv-2 .item-priority {
    background: var(--normal);
  }
  &.lv-3 {
    border-color: var(--caution);
  }
  &.lv-3 .item-priority {
    background: var(--caution);
  }
  &.lv-4 {
    border-color: var(--warning);

    & .item-priority {
      background: var(--warning);
    }
  }
  &.lv-5 {
    border-color: var(--critical);
  }
  &.lv-5 .item-priority {
    background: var(--critical);
  }
}

/* 기능명세 */
.wrap-specs {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);

  & .item-specs {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin: 0;
    font-size: var(--font-size-12);
  }
}

/* 수정사항 */
.progress {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4) 2px;
  border-radius: var(--bdrxs);
  color: var(--white);

  &.status-pending {
    background: var(--disabled);
  }
  &.status-ongoing {
    background: var(--normal);
  }
  &.status-done {
    background: var(--enabled);
  }
}
