/* ============================================================
   Radzen utility gap-fill — theme independent
   ------------------------------------------------------------
   Radzen ships margin utilities (.rz-me-*, .rz-mt-*, .rz-p-* …) but NOT the
   flex/grid gap utilities. `.rz-gap-1`, `.rz-gap-2` and `.rz-gap-3` are used
   in 16 places across this application and resolve to nothing, so every row of
   buttons written as

       <div class="rz-display-flex rz-gap-2"> … </div>

   renders with the buttons flush against one another — measured at 0px between
   "Fill Script", "Scripts" and "Back to Search" on /patient-medications.

   This is not caused by any theme: no Radzen base theme defines these classes,
   including the material3 files this project used previously. The markup has
   simply never had the spacing it asks for.

   Values follow Radzen's own spacing scale, so .rz-gap-2 matches .rz-me-2
   (0.5rem) and the two are interchangeable.

   Deliberately kept out of cayman-base.css / cayman-chrome.css: this is a
   library gap-fill rather than a look-and-feel choice, and it must keep working
   if the Cayman theme is reverted.
   ============================================================ */

.rz-gap-0  { gap: 0; }
.rz-gap-05 { gap: 0.125rem; }
.rz-gap-1  { gap: 0.25rem; }
.rz-gap-2  { gap: 0.5rem; }
.rz-gap-3  { gap: 0.75rem; }
.rz-gap-4  { gap: 1rem; }
.rz-gap-5  { gap: 1.25rem; }
.rz-gap-6  { gap: 1.5rem; }
.rz-gap-7  { gap: 1.75rem; }
.rz-gap-8  { gap: 2rem; }

/* Row/column variants, for parity with the utilities Radzen does ship. */
.rz-row-gap-1 { row-gap: 0.25rem; }
.rz-row-gap-2 { row-gap: 0.5rem; }
.rz-row-gap-3 { row-gap: 0.75rem; }
.rz-row-gap-4 { row-gap: 1rem; }

.rz-column-gap-1 { column-gap: 0.25rem; }
.rz-column-gap-2 { column-gap: 0.5rem; }
.rz-column-gap-3 { column-gap: 0.75rem; }
.rz-column-gap-4 { column-gap: 1rem; }

/* ------------------------------------------------------------
   Safety net for adjacent buttons that are NOT in a gapped container.

   Catches button pairs whose markup forgot a gap class — including Radzen's
   own grid filter popup (Clear / Apply), which sits in an overlay.

   The exclusions matter more than the rule. Several Radzen controls place two
   buttons side by side *deliberately joined*, and separating them is a visual
   defect, not an improvement:

     rz-numeric      the up/down spinner on numeric and hour/minute pickers.
                     Vertically stacked but inline-margined, so a horizontal
                     margin shifts them out of alignment with their input —
                     this one was caught misaligned before being excluded.
     rz-calendar     the date picker's prev/next month arrows.
     rz-selectbar,   segmented controls, where the segments read as one unit.
     rz-splitbutton
     rz-pager,       paging and toolbar chrome, which space themselves.
     rz-paginator,
     rz-toolbar,
     rz-upload,
     rz-datepicker

   Containers that already carry a rz-gap-* class, or are a RadzenStack (which
   sets --rz-gap inline), are skipped so spacing is never applied twice.
   ------------------------------------------------------------ */
.rz-body :not([class*="rz-gap-"]):not(.rz-stack):not([class*="rz-numeric"]):not([class*="rz-calendar"]):not([class*="rz-selectbar"]):not([class*="rz-splitbutton"]):not([class*="rz-pager"]):not([class*="rz-paginator"]):not([class*="rz-datepicker"]):not([class*="rz-upload"]):not([class*="rz-toolbar"])
    > .rz-button + .rz-button {
    margin-inline-start: 0.5rem;
}
