src/components/PageReplacementModal/PageReplacementModal.scss
@import '../../constants/styles';
@import '../../constants/modal';
@import '../../constants/tabs';

.PageReplacementModal,
.OpenFileModal {
  @extend %modal;

  .container {
    @extend %modal-shared-container-style;
    @extend %modal-shared-container-style-mobile;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    border-radius: 4px;
    box-shadow: 0px 0px 3px 0px var(--document-box-shadow);
    padding: 0;
    background: var(--component-background);
    overflow-y: visible;
    width: 480px;

    @include mobile {
      border-radius: 0;
    }

    @include tiny-browser-height {
      display: grid;
      height: 100%;
      position: fixed;
      inset-block-start: 0;
      grid-template-rows: 100px auto 70px;
      justify-content: normal;
    }

    .Button {
      height: 100%;
      justify-content: right;

      &.close-button {
        justify-content: center;
      }

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

    .page-replacement-divider {
      border-top: 1px solid var(--divider);
      margin: 0;
    }

    .modal-container {
      overflow-y: unset;
    }

    .tabs-header-container {
      padding: 16px;
    }

    .header {
      margin: 0;
      display: flex;
      justify-content: space-between;
      width: 100%;
      font-size: 16px;
      line-height: 24px;
      font-weight: 700;
    }

    .footer {
      margin-top: 0px;
      padding: 16px;
      justify-content: flex-end;

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

      .deselect-thumbnails {
        @include button-reset;
        color: var(--secondary-button-text);
        padding: 0 8px;
        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: 0 20px;
        height: 32px;
        width: 67px;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        cursor: pointer;
        background-color: var(--primary-button);
        @extend %default-button-selected;

        @include mobile {
          height: 32px;
          width: 100px;
          font-size: 13px;
        }

        &:hover:not(:disabled) {
          @extend %default-button-hover;
        }

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

      .modal-btn.noFile {
        opacity: 0.5;
        cursor: default;
      }
    }

    .modal-body {
      height: unset;
      display: flex;
      flex-direction: column;
      font-size: 13px;

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

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

        @include mobile {
          padding: 12px 0px 12px 12px;
        }
      }
    }

    @extend %tab-panel;

    .tab-panel .panel-body {
      width: 100%;
      height: 240px;
      position: relative;
      padding: 0px 16px 16px 16px;
      font-size: 13px;
      border-radius: 4px;

      &.upload {
        background: transparent;
      }
    }

    .tab-list {
      .tab-options-button {
        @include button-reset;
      }
    }

    @extend %tab-list;
    @include tab-border-defaults;
  }

  &.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);
      }
    }
  }
}
