@import '../../../styles/vars/breakpoints.css';

.content {
  margin-top: 25px;
  height: 100%;
  padding-left: 70px;
  border-top: 1px solid #dedede;
  width: 100%;
  box-sizing: border-box;
  &:before{
    content: '';
    position: absolute;
    top: calc(100% + 15px);
    left: 0;
    width: 100%;
    height: 10px;
    background: linear-gradient(0deg, rgba(244,247,251,0) 0%, #F6F6F6 100%);
    transform: scaleY(-1);
  }
  @media (--ms-and-down) {
    padding-left: 34px;
    margin-top: 17px;

    &:before{
      top: calc(100% + 7px);
    }
  }
}

.popup {
  border-top: none;
  padding-left: 60px;
  &:before{
    display: none;
  }
  /* 
.elementIsTable {
  &:last-child {
    margin-bottom: 20px;
  }
}  */
}

.progress {
  .element:last-child {
    padding-bottom: 15px;
  }
}

.isTable {
  padding-left: 60px;
  &:before{
    display: none;
  }
  .element:last-child {
    padding-bottom: 15px;
  }
}


.element {
  width: 100%;
  padding: 22px 7px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  font-size: 15px;
  letter-spacing: 0.38px;
  line-height: 19px;
  border-bottom: 1px solid #DEDEDE;
  position: relative;
  /* opacity: 0.7; */
  @media (--ms-and-down) {
    padding-top: 15px;
    padding-bottom: 17px;
  }

  &:first-child {
    .piece {
      top: 32px;
    }
    .line {
      top: 53px;
      height: calc(100% - 26px);
    }
  }

  &:only-child {
    .piece {
      top: 30px;
    }
  }

  &:last-child {
    border-bottom: unset;
    padding-bottom: 5px;
    .line {
      display: none;
    }
  }

  &.passed .line {
    background-color: #4FC62C;
  }

  &.lastPassed .piece,
  &.passed .piece {
    background-color: #4FC62C;
  }

  &.lastPassed .line {
    background: linear-gradient(180deg, #4FC62C 0%, #E4E7ED 100%);
  }

  &.activeElement {
    box-shadow: 0 2px 24px 0 rgba(0,0,0,0.1);
    cursor: default;
    border-top: unset;
    /* opacity: 1; */
  }
  +.activeElement {
    border-top: unset;
  }

  &.lastPassed:not(.activeElement),
  &.passed:not(.activeElement),
  &.opened:not(.activeElement) {
    cursor: pointer;
    /* opacity: 1; */
    .title,
    .type {
      cursor: pointer;
    }
    &:hover {
      background-color: #F8FBFF;
      .title {
        color: var(--primary-color);
      }
    }
  }
}

.activeElement + .element {
  border-top: unset;
}

.left {
  display: flex;
  flex-direction: column;
  width: calc(100% - 25px);
  position: relative;
  @media (--ms-and-down) {
    width: 100%;
  }
}

.top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex-wrap: wrap;

}

.elementIcon {
  font-size: 18px;
  margin-right: 10px;
  flex-shrink: 0;
}

.type {
	color: rgba(40, 40, 40, 0.5);
  font-weight: normal;
  flex-shrink: 0;
  margin-right: 15px;
  cursor: default;
}

.elementType {
  margin-bottom: 10px;
}

.title {
  width: 100%;
  color: #282828;
  font-weight: 500;
  word-break: break-word;
  box-sizing: content-box !important;
  white-space: normal;
  cursor: default;
  transition: color 0.1s ease-in;
  span {
    width: 100%;
    word-break: break-word;
  }
}

.label {
  box-sizing: border-box;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.28px;
  line-height: 16px;
  color: #FC5D5D;
  border: 2px solid #FC5D5D;
  margin-top: 10px;
  &.passed {
    color: #4FC62C;
    border-color: #4FC62C;
  }
  &.rejected {
  }
}

.elementTitle {
  cursor: pointer;
  word-break: break-word;
}

.activeLine {
  height: 100%;
  width: 3px;
  position: absolute;
  justify-self: left;
  background-color: var(--primary-color);
  left: 0;
  top: 0;
}

.elementIsPopup {
  border-top: 1px solid #DEDEDE;
  border-bottom: none;
  padding: 27px 20px !important;
  &:last-child {
    border-bottom: 1px solid #DEDEDE;
    padding: 27px 0;
    margin-bottom: 20px;
  }
  .href {
    display: none;
  }
}

.elementIsTable {
  border-top: 1px solid #DEDEDE;
  border-bottom: none;
  &:last-child {
    border-bottom: none;
    /* padding: 27px 0; */
    margin-bottom: 0;
  }
  &:first-child {
    padding-top: 23px;
    border-top: none;
  }
}

.link {
  font-size: 23px;
  cursor: pointer;
  color: #C0C2C5;
  transition: color 0.2s ease-in;
  outline: 0;
  &:hover {
    color: var(--primary-color);
  }
  &:active,
  &:visited {
    color: #C0C2C5;
  }
}

.disabledLink {
  pointer-events: none;
  opacity: 0.3;
}

.piece {
  height: 16px;
  width: 16px;
  background-color: #E4E7ED;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  position: absolute;
  top: 31px;
  left: -35px;
  @media (--ms-and-down) {
    top: 30px;
  }
}

.check {
  font-size: 10px;
  color: #fff;
}

.lock {
  font-size: 16px;
  color: #E4E7ED;
  position: absolute;
  top: 31px;
  left: -35px;
  @media (--ms-and-down) {
    top: 30px;
  }
}

.line {
  width: 2px;
  height: calc(100% - 23px);
  min-height: 50%;
  background-color: #E4E7ED;
  border-radius: 4px;
  display: block;
  position: absolute;
  top: 51px;
  left: -28px;
  /* transform: translateY(13px); */
  @media (--ms-and-down) {
    top: 48px;
    min-height: 60%;
    height: calc(100% - 20px);
  }
}

/* .lock+.line {
  top: 45px;
  min-height: 45%;
} */

.href {
  display: none;
  margin-left: 17px;
  .link:hover {
    color: var(--primary-color);
  }

  @media (--sm-and-up) {
    display: block;
  }

}

:global(.dir--rtl) {
  .content {
    padding-left: 0;
    padding-right: 70px;
  }

  .piece,
  .lock {
    left: unset;
    right: -40px;
  }
  .line {
    left: unset;
    right: -33px;
  }

  .elementIcon {
    margin-right: 0;
    margin-left: 10px;
  }

  .type {
    margin-right: 0;
    margin-left: 15px;
  }

  /* .label {
    margin-left: 0;
    margin-right: 17px;
  } */
  
  .href {
    margin-left: 0;
    margin-right: 17px;
  }
}
