$modalHeaderAndFooterHeight: 8.375rem;

.PaymentModal {
  &.recurring {
    .Transition {
      height: 33rem;
      max-height: calc(92vh - $modalHeaderAndFooterHeight);
    }
  }

  .modal-backdrop {
    pointer-events: none;
  }

  &.PaymentModal-receipt .modal-backdrop {
    pointer-events: all;
  }

  .header {
    position: relative;

    display: flex;
    flex-direction: row;
    align-items: center;

    width: 100%;
    padding: 0.5rem 1rem 0.25rem;
    border-top-left-radius: var(--border-radius-modal);
    border-top-right-radius: var(--border-radius-modal);

    background: var(--color-background);

    h3 {
      unicode-bidi: plaintext;
      margin-bottom: 0;
      margin-left: 1.5rem;
      text-align: initial;
    }
  }

  .Transition {
    height: min(27rem, 68vh);
  }

  .empty-content {
    display: flex;
    align-items: center;
    justify-content: center;

    height: 25rem;
    max-height: 90%;
  }

  .receipt-content {
    overflow-y: auto;
    height: 25rem;
  }

  .content {
    position: relative;

    overflow: auto;
    overflow-x: hidden;

    width: 100%;
    height: 100%;
  }

  .footer {
    position: relative;
    bottom: 0;

    width: 100%;
    padding: 0.75rem 1rem;
    border-bottom-right-radius: var(--border-radius-modal);
    border-bottom-left-radius: var(--border-radius-modal);

    background: var(--color-background);

    button {
      font-weight: var(--font-weight-medium);
      text-transform: none;
    }

    .button-text {
      text-transform: uppercase;
    }
  }

  .modal-dialog {
    width: 26.25rem;
  }

  .modal-content {
    overflow: hidden;
    padding: 0;
  }

  .ListItem-main-icon {
    margin-inline-end: 1.125rem !important;
  }
}

@media screen and (max-device-width: 640px) and (max-height: 640px) and (orientation: landscape) {
  .PaymentModal,
  .PaymentModal.recurring {
    .modal-dialog {
      max-height: 100%;
    }

    .Transition {
      height: 10rem;
    }
  }
}
