.composite-documents {
  display: flex;
  flex-direction: column;
  gap: 32px;

  .info-box-container {
    margin-top: 128px;
  }

  .composite-documents-grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-gap: 24px;
    padding: 0 16px;
    width: 100%;

    .composite-document-card {
      display: flex;
      flex-direction: column;
      gap: 16px;
      padding: 24px;
      background-color: var(--color-base-white);
      border: 1px solid var(--color-border-secondary);
      border-radius: 12px;
      min-width: 0;

      .composite-document-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 16px;

        .composite-document-title {
          font-size: var(--font-size-sm);
          font-weight: var(--weight-semi-bold);
          line-height: var(--line-height-text-sm);
          color: var(--color-text-primary);
          overflow: hidden;
          white-space: nowrap;
          text-overflow: ellipsis;
          max-width: 70%;
        }

        .composite-document-actions {
          gap: 6px;
          display: flex;
          align-items: center;

          i {
            color: var(--color-fg-quaternary);
            font-size: var(--font-size-sm);
          }
        }
      }

      .composite-document-marking-container {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
        font-size: var(--font-size-xs);
        line-height: var(--line-height-text-xs);
        color: var(--color-text-quaternary);
      }

      .composite-document-statuses {
        display: flex;
        gap: 8px;
        flex-direction: column;

        .composite-document-statuses-row {
          font-size: var(--font-size-xs);
          line-height: var(--line-height-text-xs);
          color: var(--color-text-quaternary);
          display: flex;

          .composite-document-statuses-row-name {
            width: 30%;
          }

          i {
            color: var(--color-fg-success-secondary);
          }
        }
      }

      .composite-document-error-container {
        font-size: var(--font-size-xs);
        line-height: var(--line-height-text-xs);
        color: var(--color-text-warning-primary);
      }

      .composite-document-footer {
        display: flex;
        justify-content: center;
        border-top: 1px solid var(--color-border-secondary);
        padding-top: 16px;
      }

      .composite-document-approved-container {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 4px;
        font-size: var(--font-size-xs);
        font-weight: var(--weight-semi-bold);
        line-height: var(--line-height-text-xs);
        color: var(--color-text-quaternary);
        font-style: italic;

        i {
          color: var(--color-fg-success-secondary);
          font-size: var(--font-size-lg);
        }
      }
    }
  }
}

.composite-document-marking {
  height: 100%;
  width: 100%;

  .composite-document-marking-container {
    display: flex;
    height: 100%;

    .composite-document-marking-container-left {
      flex: 1;
      padding: 32px;
      display: flex;
      flex-direction: column;
      gap: 16px;
      overflow-y: auto;

      .composite-document-marking-container-left-title {
        display: flex;
        justify-content: space-between;
        font-size: var(--font-size-md);
        line-height: var(--line-height-text-md);

        .bold-title {
          font-weight: var(--weight-bold);
        }
      }

      .single-document-list-content {
        display: flex;
        flex-direction: column;
        gap: 16px;
        height: 100%;
        overflow-y: auto;

        /* Hide scrollbar */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
        &::-webkit-scrollbar {
          display: none; /* Chrome, Safari, Opera */
        }

        .single-document-card {
          display: flex;
          flex-direction: column;
          gap: 8px;
          padding: 24px;
          border: 1px solid var(--color-border-primary);
          border-radius: 12px;
          background-color: var(--color-base-white);

          &.highlight {
            border: 2px solid var(--color-border-selected);
          }

          .single-document-card-header {
            display: flex;
            justify-content: space-between;

            .single-document-card-badge {
              width: fit-content;
              font-size: var(--font-size-xs);
              font-weight: var(--weight-semi-bold);
              line-height: var(--line-height-text-xs);
              color: var(--color-base-white);
              background-color: var(--color-bg-secondary-solid);
              padding: 4px 8px;
              border-radius: 16px;
            }

            .single-document-card-actions {
              gap: 6px;
              display: flex;
              align-items: center;

              i {
                color: var(--color-fg-quaternary);
                font-size: var(--font-size-sm);
              }
            }
          }

          .singe-document-card-title {
            font-size: var(--font-size-sm);
            font-weight: var(--weight-semi-bold);
            line-height: var(--line-height-text-sm);
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
            max-width: 90%;
          }

          .single-document-card-pages-info {
            font-size: var(--font-size-sm);
            line-height: var(--line-height-text-sm);
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
            max-width: 90%;

            .numbering {
              color: var(--color-text-quaternary);
            }
          }
        }
      }

      .new-single-document-container {
        display: flex;
        height: 100%;
        flex-direction: column;

        .new-single-document-card-wrapper {
          display: flex;
          flex-direction: column;
          justify-content: center;
          flex: 1;

          .new-single-document-card {
            border: 1px solid var(--color-border-primary);
            border-radius: 12px;
            padding: 24px;
            background-color: var(--color-base-white);
          }
        }
      }
    }

    .pdf-viewer-container {
      flex: 2;
      background-color: var(--color-base-white);
      border-left: 1px solid var(--color-border-secondary);
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;

      .pdf-viewer-actions {
        display: flex;
        justify-content: space-between;
        padding: 24px;
        border-bottom: 1px solid var(--color-border-secondary);
        width: 100%;

        .pdf-viewer-actions-left {
          max-width: 30%;
          font-size: var(--font-size-sm);
          overflow: hidden;
          white-space: nowrap;
          text-overflow: ellipsis;
        }

        .pdf-viewer-actions-separator {
          width: 1px;
          background-color: var(--color-border-primary);
        }

        .pdf-viewer-actions-right {
          display: flex;
          gap: 12px;
          font-size: var(--font-size-sm);

          .pdf-viewer-actions-pagination {
            display: flex;
            gap: 8px;

            .pdf-viewer-actions-current-page {
              font-weight: var(--weight-bold);
            }

            .pdf-viewer-actions-pagination-body {
              min-width: 45px;
              display: flex;
              justify-content: center;
            }
          }

          .pdf-viewer-actions-zoom {
            display: flex;
            gap: 8px;
          }
        }
      }

      .pdf-viewer {
        position: relative;
        text-align: center;
        overflow: auto;
        margin-top: 32px;
        margin-bottom: 32px;
        width: 100%;
        height: 100%;

        /* Hide scrollbar */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
        &::-webkit-scrollbar {
          display: none; /* Chrome, Safari, Opera */
        }

        .pdf-viewer-loader-container {
          position: absolute;
          inset: 0;
          display: flex;
          justify-content: center;
          align-items: center;

          &.hidden {
            display: none;
          }
        }

        canvas {
          max-width: 100%;
          border: 1px solid var(--color-border-secondary);

          &.hidden {
            display: none;
          }
        }
      }
    }
  }
}
