/* ============================================================
   Purchase module (ported from RajFilterV2).

   The heavy lifting that used to live here is gone: section 10 of
   _head_css.cshtml no longer forces a fixed height, zero padding and
   overflow:hidden onto every modal in the app, so Bootstrap's own
   modal behaviour applies again and the ported screens need no
   correction for it.

   What remains is the one deliberate choice: a purchase modal is
   capped at 90vh rather than Bootstrap's default, because several of
   these forms (the supplier, the requisition, the priced quotation)
   are long enough to run off the screen otherwise. .rf-modal marks the
   ported modals; nothing else on the site is touched.
   ============================================================ */

.rf-modal .modal-content {
    max-height: 90vh;
}

.rf-modal .modal-body {
    overflow-y: auto;
}

/* A purchase popup asked for modal-xl gets it at any screen width.

   Bootstrap only applies .modal-xl's 1140px above a 1200px viewport and
   falls back to the default 500px below it, so Supplier 360 opened as a
   narrow column on anything smaller than a large desktop. The markup
   previously worked around this with an inline max-width:92vw, which
   overrode modal-xl in the other direction and made the popup span almost
   the whole screen.

   min() keeps it at xl width where there is room and lets it shrink on a
   laptop, without either extreme. */
.rf-modal .modal-dialog.modal-xl {
    max-width: min(1140px, 94vw);
}
