.wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;

  .dialog__title {
    display: flex;
    justify-content: space-between;

    margin-bottom: 15px;
    padding-top: 20px;
    padding-bottom: 12px;

    background-color: #f9f9f9;
    border-bottom: 1px solid #bebebe;

    .title__header {
      display: flex;
      margin-left: 35px;
      font-size: 1.25rem;
      line-height: 1.21;

      .title__text {
        display: flex;
        align-items: center;
        margin-right: 10px;
      }

      .document-approved,
      .document-notapproved {
        display: block;

        height: fit-content;
        margin-top: 4px;

        font-size: 0.875rem;
        font-weight: 400;
        color: #28a529;
      }

      .document-notapproved {
        color: var(--color-alert-red);
      }
    }

    .close-btn {
      cursor: pointer;
      display: flex;
      margin-right: 20px;
      margin-left: 40px;
    }
  }

  .dialog__body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;

    padding: 0 35px;

    line-height: 1.21;

    .is-draft-approve-icon {
      cursor: pointer;
    }

    .need-approve {
      display: flex;
      margin-bottom: 15px;

      .need-approve__text {
        padding: 2px;
        font-size: 0.875rem;
      }
    }

    .approval-sheet {
      height: calc(100% - 60px);

      .approval-sheet__row {
        display: flex;
        height: 50%;

        .approval-sheet__item {
          width: 50%;
          height: 100%;

          &:first-child {
            padding-right: 20px;

            .approval-item__body {
              flex-grow: 0;
              height: 100%;
            }
          }

          &:last-child {
            .approval-item__body {
              height: calc(100% - 20px);
            }
          }
        }
      }

      .approval-sheet__item {
        display: flex;
        flex-direction: column;

        .approval-item__title {
          display: inline-block;
          font-size: 1rem;
          font-weight: 500;
        }

        .approval-item__body {
          flex-grow: 1;
          padding: 10px;
          border: 1px solid #e8e8e8;
          border-radius: 5px;
        }

        &.explain,
        &.diff {
          .approval-item__body {
            min-height: 70px;
            max-height: 100%;
          }

          .text {
            padding-left: 10px;
          }
        }

        &.diff {
          height: 50%;
        }
      }

      .approval-sheet__table {
        border-collapse: collapse;
        width: 100%;
        font-size: 0.875rem;

        th,
        td {
          padding: 5px;
          font-weight: 400;
          border: none;

          &.strong {
            font-weight: 500;
          }
        }

        .mat-header-row {
          border-bottom: 1px solid #d9d9d9;
        }

        .mat-row {
          border-bottom: 1px solid #f2f2f2;

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

        .name {
          max-width: 50%;
          padding-left: 10px;
        }

        .signature {
          min-width: 80px;
          max-width: 125px;
        }

        .stamp {
          max-width: 40px;
        }

        .signer-icon {
          display: flex;
          align-items: center;
        }

        .approval-table__scrollbox {
        }
      }
    }
  }

  .dilog__buttons {
    display: flex;
    justify-content: space-between;
    margin: 0 35px 15px;

    .create-btn {
      margin-left: 10px;
      color: #3d87ff;
      border: 1px solid #3d87ff;
    }

    .ok-btn {
      width: 115px;
      color: #fff;
      background-color: #3d87ff;
      border: 1px solid #005df4;
    }
  }
}

ngx-simplebar {
  overflow: hidden auto;
  height: 100%;
}

.field {
  display: flex;
}

.not-signed {
  opacity: 0.3;
}

.empty-value {
  color: #999;
}

::ng-deep .documentSignDialog {
  width: 100%;
  height: 100%;

  .mat-dialog-container {
    padding: 0;
  }

  .mat-dialog-title {
    margin: 0;
  }

  .mat-dialog-content {
    margin: 0;
    padding: 0;
  }

  .mat-dialog-actions {
    min-height: unset;
    margin: 0;
    padding: 0;
  }
}

:host ::ng-deep .approval-sheet__table {
  .mat-header-cell,
  .mat-cell {
    font-size: 0.875rem;
  }

  .mat-header-cell {
    font-weight: 600;
    color: inherit;
  }

  tr.mat-header-row {
    height: 0.875rem;
  }
}
