src/components/InsertPageModal/InsertUploadedPagePanel/InsertUploadedPagePanel.scss
@import '../../../constants/modal.scss';

.insert-uploaded-page-panel {
  @extend %modal-shared-container-style;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  border-radius: 4px;
  box-shadow: 0px 0px 3px 0px var(--document-box-shadow);
  width: 791px;
  background: var(--component-background);

  @include mobile {
    width: 100%;
    height: 100vh;
    inset-inline-start: 0;
    inset-block-end: 0;
  }

  .header {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 16px;
    line-height: 24px;
    color: var(--gray-9);
    font-weight: 700;
    box-shadow: inset 0px -1px 0px var(--divider);
    padding: 20px 16px 20px 16px;

    .left-header {
      display: flex;
      align-items: center;
      gap: 4px;
    }

    .Button {
      &:hover {
        background: var(--view-header-button-hover);
        border-radius: 4px;
      }
    }
  }

  .insert-page-divider {
    border-top: 1px solid var(--divider);
    margin: 18px -16px 16px -16px;
    width: inherit;
  }

  .insert-blank-page-controls {
    padding-bottom: 32px;
    display: flex;
    gap: 48px;
    height: 90px;

    @include mobile {
      height: auto;
      flex-direction: column;
      gap: 20px;

      label,
      input {
        font-size: 13px;
      }
    }

    .insert-page-titles {
      font-size: 13px;
      font-weight: 700;
      color: var(--text-color);
    }

    .insert-page-location-options {
      display: flex;
      flex-direction: column;

      .insert-page-options {
        display: flex;
        flex-direction: row;
        align-items: baseline;
        gap: 20px;
        padding-top: 11px;
      }
    }

    .insert-page-location {
      display: flex;
      flex-direction: column;

      .insert-page-input {
        display: flex;
        padding-top: 8px;
        gap: 8px;
        align-items: baseline;
        font-size: 13px;
        font-weight: 400;
        -webkit-font-smoothing: auto;
      }

      .page-number-error {
        color: var(--color-message-error);
      }
    }
  }

  .modal-body {
    height: unset;
    display: flex;
    flex-direction: column;
    box-shadow: inset 0px -1px 0px var(--divider);
    padding: 16px;

    @include mobile {
      flex: 1;
    }

    .modal-body-thumbnail-container {
      height: 409px;
      width: 100%;
      padding: 16px 0px 16px 16px;
      border-radius: 4px;
      overflow: auto;
      background-color: var(--gray-2);
      display: flex;
      flex-wrap: wrap;
      gap: 16px;

      &.isLoading {
        display: flex;
        justify-content: center;
        align-items: center;
      }

      &.modular-ui {
        .thumb-card {
          border: none;
          box-shadow: inset 0 0 0 1px var(--lighter-border);

          &:hover {
            @extend %icon-button-hover;
            background: var(--gray-1);
          }
        }
      }

      @include mobile {
        flex-direction: row;
        flex: 1;
        gap: 16px;
        padding: 16px;
        max-height: calc(100vh - 64px - 72px - 160px - 32px);

        .thumb-card {
          flex: 0 0 calc(50% - 8px);
          box-sizing: border-box;
        }

        .thumb-card-img {
          height: 110px;
          width: 83px;
        }

        .thumb-body {
          align-items: center;
        }

        .thumb-image {
          width: 100%;
        }

        .thumb-checkbox {
          position: absolute;
          inset-block-start: 2px;
          inset-inline-end: 2px;
        }
      }
    }
  }

  .insert-page-footer {
    display: flex;
    padding: 16px;
    justify-content: flex-end;

    &.isFileSelected {
      justify-content: space-between;
    }

    .deselect-thumbnails {
      @include button-reset;
      color: var(--secondary-button-text);
      padding: 8px 16px;
      height: 32px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;

      &:hover {
        color: var(--secondary-button-hover);
      }

      &.disabled {
        visibility: hidden;
      }
    }

    .modal-btn {
      @include button-reset;
      border-radius: 4px;
      padding: 8px 16px;
      height: 32px;
      min-width: 100px;
      width: fit-content;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      font-weight: 400;
      cursor: pointer;

      @include mobile {
        height: 32px;
      }

      &:not(:disabled):not(.disabled) {
        background: var(--primary-button);
        color: var(--primary-button-text);

        &:hover {
          background: var(--primary-button-hover);
        }
      }

      &.disabled {
        @extend %default-button-disabled;
        border: none;
      }
    }

    @include mobile {
      button {
        font-size: 13px;
      }
    }
  }
}
