.modal {
  min-width: 100%;
  min-height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  border: 0;

  .modalContainer {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--base-white);
    padding: 2.5rem;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    max-width: 90%;
    width: 32.5rem;

    /* Show scrollbar if the modal is higher than the viewport */
    max-height: calc(100% - 2rem);
    overflow-y: auto;

    &.autoWidth {
      width: auto;
    }

    > button {
      position: absolute;
      top: 1.5rem;
      right: 1.5rem;
      > svg {
        height: 2rem;
        width: 2rem;
        fill: var(--button-icon-modal-close-color-svg);
      }
    }
  }

  .modalBody {
    display: flex;
    flex-direction: column;
    background-color: var(--base-white);
    gap: 1rem;

    > h2 {
      margin: 0;
    }

    > p {
      display: flex;
      flex-direction: column;
      padding-right: 2rem;
      margin: 0;
    }

    > nav {
      margin-top: var(--space-sm);
      display: flex;
      align-items: center;
      min-height: 4rem;
      gap: 1rem;

      > button {
        white-space: nowrap;
      }
    }
  }
}

.noFlex {
  p {
    display: block;
    margin-bottom: 2rem;
  }
}
