.modal-container {
  max-width: 85%;
  margin: auto 0;
}

.alert {
  font-size: 1.2rem;
}

.modal {
  display: flex;
  justify-content: center;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  width: 100vw;
  background: rgba(0, 0, 0, 0.6);
  pointer-events: none;
  transition: 0.4s all ease;
  height: 100vh;
  padding: 5rem 0;
  overflow-y: auto;
  z-index: 10000;

  input:read-only {
    background: #f2f2f2;
  }

  &.active {
    opacity: 1;
    pointer-events: all;
    transition: 0.4s all ease;
  }
}

.modal-inner {
  display: flex;
  align-items: center;
}

.modal-window {
  border: 0.1rem solid rgb(229, 229, 229);
  border-radius: 0.8rem;
  background: #fff;
  padding: 5rem;
  padding-top: 2.8rem;
  overflow-x: hidden;
}

.modal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  padding-bottom: 2rem;

  h2 {
    font-size: 2.2rem;
  }

  button {
    padding: 2rem;
    background: none;
    border: none;
    cursor: pointer;

    div {
      width: 2rem;
      height: 2rem;
      img {
        width: 100%;
        height: 100%;
        object-fit: contain;
      }
    }
  }
}

.modal-middle {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr 1.5fr 1fr 1.5fr 1fr 1.5fr 1fr 1.5fr 1fr;

  padding: 3rem 0;
  position: relative;

  &::before {
    position: absolute;
    content: "";
    width: calc(100% + 18rem);
    top: 0;
    height: 0.1rem;
    left: -9rem;
    background: rgb(229, 229, 229);
    pointer-events: none;
  }

  &::after {
    position: absolute;
    content: "";
    width: calc(100% + 18rem);
    height: 0.1rem;
    bottom: 0;
    right: -9rem;
    background: rgb(229, 229, 229);
    pointer-events: none;
  }
}

.icon-title {
  font-size: 1.2rem;
  text-align: center;
  color: rgb(229, 229, 229);
  transition: 0.4s all ease;
  font-weight: normal;
}

.modal-icon {
  fill: rgba(229, 229, 229, 1);
  transition: 0.4s all ease;
}

.icon-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;

  &.active {
    .modal-icon {
      fill: $base-green;
      transition: 0.4s all ease;
    }

    .icon-title {
      color: $base-green;
      transition: 0.4s all ease;
    }
  }
}

.lines {
  stroke: rgba(229, 229, 229, 1);
  transition: 0.4s all ease;
}

.line-block {
  display: flex;
  align-items: center;
  justify-content: center;

  &.active {
    .lines {
      stroke: $base-green;
      transition: 0.4s all ease;
    }
  }
}

.modal-bottom {
  padding-top: 3rem;
}

.card-description {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  padding: 3rem 0;
}

.cd-top {
  display: grid;
  grid-template-columns: 22rem 1fr;
  gap: 3rem;
  align-items: center;
}

.cd-text {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  h2 {
    font-size: 2.2rem;
  }
  h3 {
    font-size: 1.2rem;
    font-weight: normal;
  }
}

.cd-bottom {
  padding: 2rem 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border: 0.1rem solid rgba(229, 229, 229, 1);
}

.cd-bottom-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  border-left: 0.1rem solid rgba(229, 229, 229, 1);
  border-right: 0.1rem solid rgba(229, 229, 229, 1);

  h2 {
    font-size: 2.2rem;
  }

  h3 {
    font-size: 1.2rem;
    color: $base-green;
    font-weight: normal;
  }

  &:first-child {
    border: none;
  }
  &:last-child {
    border: none;
  }
}

.card-button {
  display: flex;
  justify-content: flex-end;
}

.cd-btn {
  max-width: 20rem;
}

.card-stage-2 {
  form {
    display: flex;
    flex-direction: column;
    gap: 3rem;
  }
}

.card-stage-2 {
  .form-top {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
  }
}

.cd-2-title {
  h4 {
    font-size: 1.2rem;
    font-weight: normal;
  }
  span {
    color: red;
  }
}

.input-block {
  span {
    color: red;
  }
}

.card-stage-3-top {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
}

.check-block {
  display: flex;
  gap: 1rem;
  align-items: center;

  input {
    width: 3rem;
    height: 3rem;
    border: 0.1rem solid rgb(229, 229, 229);
    border-radius: 0.5rem;
  }

  label {
    font-size: 1.6rem;
  }
}

.card-stage-3 {
  form {
    display: flex;
    flex-direction: column;
    gap: 3rem;
  }
}

.card-stage-3-middle {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.card-stage-3-bottom {
  h4 {
    font-size: 1.2rem;
    font-weight: normal;
    display: flex;
    flex-direction: column;

    span {
      color: red;
    }
  }
}

.card-stage-4 {
  form {
    display: flex;
    flex-direction: column;
    gap: 3rem;
  }
}

.cd-top-4 {
  display: flex;
  flex-direction: column;
  gap: 3rem;

  h2 {
    font-size: 1.2rem;
    font-weight: normal;
  }
}

.cd-4-files {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  li {
    border-radius: 0.5rem;
    padding: 1.4rem 3rem;
    border: 0.1rem solid #e5e5e5;
    display: flex;
    align-items: center;
    gap: 2rem;
    justify-content: space-between;

    h4 {
      font-size: 1.6rem;
      font-weight: normal;
    }

    .remove {
      width: 1.8rem;
      height: 1.8rem;

      img {
        width: 1.8rem;
        height: 1.8rem;
      }
    }
  }
}

.cd-bottom-4 {
  position: relative;
  input {
    opacity: 0;
    height: 5rem;
    cursor: pointer;
    width: 16.2rem;
    position: absolute;
    left: 0;
  }

  label {
    color: $base-green;
    display: inline-block;
    font-size: 1.6rem;
    padding: 1.4rem 3rem;
    border: 0.1rem solid $base-green;
    border-radius: 0.5rem;
    cursor: pointer;
  }
}

.file {
  display: flex;
  padding: 1.4rem 1.6rem 1.4rem 3rem;
  justify-content: space-between;
  align-items: center;
  border: 0.1rem solid #e5e5e5;
  border-radius: 0.5rem;
  background: transparent;
  transition: 0.4s all ease;

  p {
    font-size: 1.6rem;
  }

  &.filled {
    background: $base-grey;
    transition: 0.4s all ease;
  }
}
.card-stage-4-bottom {
  justify-content: flex-end;
}

.remove {
  width: 1.8rem;
  height: 1.8rem;
  margin: 1rem;
  cursor: pointer;

  img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
}

.card-stage-6 {
  display: flex;
  flex-direction: column;
  gap: 5rem;
}

.cd-6-list {
  display: flex;
  flex-direction: column;

  li {
    padding: 1.4rem 3rem;
    font-size: 1.6rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    &:nth-child(2n - 1) {
      background: #f2f2f2;
    }
  }
}

.cd-6-bottom {
  .sign-btn {
    max-width: 20rem;
  }
}

.modal-middle-mobile {
  display: none;
}

.reject {
  position: relative;

  .reason {
    z-index: 200;
    width: 100%;
    border-radius: 0.5rem;
    position: absolute;
    padding: 2rem;
    right: calc(100% - 6rem);
    top: -50%;
    height: 15rem;
    width: 0;
    opacity: 0;
    overflow: auto;
    background: #f2f2f2;
    border: 0.1rem solid #e5e5e5;
    transition: 0.3s all ease;

    h4 {
      font-size: 1.4rem;
      text-align: left;
    }
  }

  &:hover {
    .reason {
      width: 25rem;
      opacity: 1;
      right: calc(100% + -3rem);
    }
  }
}

.cd-img {
  max-width: 22rem;
  max-height: 13.8rem;
  width: 100%;
  height: 100%;

  img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
}

// MEDIA

@media screen and (max-width: 1300px) {
  .modal-window {
    // max-height: 82.6rem;
    // overflow-y: auto;
    margin: 0 auto;
  }
  .modal-middle {
    display: none;
  }
  .modal-middle-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .card-stage-2 .form-top,
  .card-stage-3-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media screen and (max-height: 1000px) {
  .modal {
    padding: 10rem 0;
  }
}
@media screen and (max-width: 1100px) {
  .card-stage-6 {
    gap: 3rem;
  }
  .modal .cu-bottom,
  .card-stage-3 form,
  .card-stage-4 form {
    gap: 2rem;
  }
  .cd-6-bottom .sign-btn {
    max-width: unset;
  }
  .cd-6-list li {
    padding: 1.4rem 1rem;
    font-size: 1.2rem;
  }
  .cd-bottom-4 p,
  .check-block label,
  .cd-bottom-4 label,
  .cd-4-files li h4 {
    font-size: 1.2rem;
  }

  .cd-4-files li {
    padding: 1.4rem 1rem;
  }
  .modal-window {
    padding: 2rem;
  }
  .file {
    padding: 1.4rem 1rem;
  }
}

@media screen and (max-width: 800px) {
  .card-description {
    gap: 2rem;
  }
  .cd-bottom {
    grid-template-columns: 1fr;
    border: none;
    gap: 1rem;
    padding: 2rem 0;
  }
  .cd-bottom-content {
    border: 0.1rem solid #e5e5e5 !important;
    border-radius: 0.5rem;
    padding: 1.5rem 0rem;
  }
  .card-description {
    padding-bottom: 1rem;
  }
}

@media screen and (max-width: 700px) {
  .cd-bottom-content h2 {
    font-size: 1.8rem;
  }
  .cd-img {
    justify-self: center;
  }
  .cd-text {
    h2 {
      font-size: 1.8rem;
      text-align: center;
    }

    h3 {
      text-align: center;
    }
  }
  .card-stage-2 .form-top,
  .card-stage-3-top {
    grid-template-columns: 1fr;
    input {
      font-size: 1.2rem;
    }
  }
  .cd-top {
    grid-template-columns: 1fr;
  }
}
