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

@mixin mobileWidth {
  @include mobile {
    width: 100%;
  }
}

.PrintModal {
  @extend %modal;

  .modal-container {
    --modal-content-height: min(450px, 60vh);
    width: 480px;
    overflow: hidden;

    .spinner-container {
      justify-content: center;
      align-items: center;
      height: var(--modal-content-height);
      display: flex;
    }

    .settings {
      display: flex;
      flex-direction: column;
      width: 100%;
      height: var(--modal-content-height);
      overflow: auto;
      padding: 24px;

      .ui__choice {
        margin: 10px 4px 4px 0;
      }

      .ui__choice--disabled {
        opacity: 0.5;
      }

      .ui__input {
        border: none;

        &.ui__input--focused {
          box-shadow: none;
        }
      }

      .settings-form {
        margin-bottom: 0;
      }

      .specifyPagesChoiceLabel {
        display: flex;

        .specifyPagesExampleLabel {
          margin-inline-start: 4px;
          color: var(--faded-text);
        }
      }

      .page-number-input-container {
        width: fit-content;
        margin-top: 8px;
      }
    }

    .divider {
      height: 1px;
      width: 100%;
      background: var(--divider);
    }

    .section {
      padding-bottom: 16px;

      &.watermark-section {
        padding-bottom: 0;
      }

      .section-label {
        font-weight: 700;
      }

      .hidden {
        display: none;
      }
    }

    label.ui__choice__label,
    label.section-label {
      padding-top: 2px;
      padding-bottom: 2px;
      padding-inline-start: 4px;
      padding-inline-end: 0px;
    }

    .print-quality-section-label {
      padding: 0;
      margin-bottom: 8px;
    }

    #printQualityOptions {
      button.Dropdown {
        height: 32px;
        margin-top: 8px;
      }

      &.Dropdown__wrapper {
        .Dropdown {
          text-align: start;
        }

        .Dropdown__items {
          width: 274px;
          inset-inline-start: 0;
        }
      }
    }

    input[type='text'] {
      width: 100%;
      height: 32px;
      padding-inline-start: 8px;
      border: 1px solid var(--border);
      border-radius: 4px;
      color: var(--text-color);
      padding-bottom: 6px;
      padding-inline-end: 42px;
      padding-top: 4px;
      margin-top: 6px;

      &:focus {
        outline: none;
        border: 1px solid var(--focus-border);
      }

      &::placeholder {
        color: var(--placeholder-text);
      }

      &.page-number-input--error {
        border-color: var(--error-border-color);
      }
    }

    .total {
      display: flex;
      flex-direction: row;
      padding-bottom: 16px;
      color: var(--text-color);
    }

    .background {
      width: 100%;
      height: 10px;
      transform: translateY(-50%);
      fill: #e2f3fe;
    }

    .progress {
      height: 10px;
      transform: translateY(-50%);
      fill: #077bc5;
    }

    .buttons {
      display: flex;
      flex-direction: row;
      justify-content: flex-end;
      width: 100%;
      padding: 20px;

      .button {
        @include button-reset;
        display: flex;
        justify-content: center;
        align-items: center;
        color: var(--primary-button-text);
        padding: 6px 18px;
        width: auto;
        width: fit-content;
        background: var(--primary-button);
        border-radius: 4px;
        border: 0px;
        height: 32px;
        cursor: pointer;
        font-size: 13px;

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

        &:disabled {
          opacity: 0.5;
          cursor: auto;
        }
      }
    }

    .specify-pages-choice {
      margin-bottom: 18px;

      input {
        width: 195px;
        margin-top: 0;

        @include mobileWidth;
      }

      label {
        display: grid;

        @include mobileWidth;
      }

      &.ui__choice--checked {
        align-items: baseline;
        height: 80px;

        .ui__choice__input {
          inset-block-start: 3px;
        }
      }
    }

    .apply-watermark {
      @extend %secondary-button-selected;
      margin-top: 10px;
      width: auto;
      padding: 6px 16px;

      &:hover {
        @extend %secondary-button-hover;
      }
    }
  }
}