/* ==========================================================================
   QZONE OMS — UTILITIES
   A small, deliberate set. Bootstrap's spacing/flex/grid utilities still
   apply; these only cover what the new design language needs on top.
   ========================================================================== */

/* ---- Layout ------------------------------------------------------------- */
.qz-stack        { display: flex; flex-direction: column; gap: var(--qz-s-4); }
.qz-stack--sm    { gap: var(--qz-s-2); }
.qz-stack--lg    { gap: var(--qz-s-6); }
.qz-row          { display: flex; align-items: center; gap: var(--qz-s-3); }
.qz-row--between { justify-content: space-between; }
.qz-row--end     { justify-content: flex-end; }
.qz-row--wrap    { flex-wrap: wrap; }
.qz-row--top     { align-items: flex-start; }
.qz-spacer       { flex: 1 1 auto; }

/* Two-column content split that collapses on tablet */
.qz-split { display: grid; gap: var(--qz-s-4); grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.qz-split--even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.qz-split--aside-first { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
@media (max-width: 991.98px) {
  .qz-split, .qz-split--even, .qz-split--aside-first { grid-template-columns: minmax(0, 1fr); }
}

/* ---- Text --------------------------------------------------------------- */
.qz-t-2xs  { font-size: var(--qz-fs-2xs); }
.qz-t-xs   { font-size: var(--qz-fs-xs); }
.qz-t-sm   { font-size: var(--qz-fs-sm); }
.qz-t-md   { font-size: var(--qz-fs-md); }
.qz-t-lg   { font-size: var(--qz-fs-lg); }
.qz-t-mono { font-family: var(--qz-font-mono); font-variant-numeric: tabular-nums; }
.qz-t-caps { font-size: var(--qz-fs-2xs); font-weight: 600; letter-spacing: var(--qz-track-label); text-transform: uppercase; }
.qz-t-bold { font-weight: 600; }
.qz-t-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.qz-t-break { overflow-wrap: anywhere; word-break: break-word; }
.qz-t-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.qz-c-ok     { color: var(--qz-ok); }
.qz-c-warn   { color: var(--qz-warn); }
.qz-c-crit   { color: var(--qz-crit); }
.qz-c-info   { color: var(--qz-info); }
.qz-c-accent { color: var(--qz-accent); }

/* ---- Surface helpers ---------------------------------------------------- */
.qz-ring     { box-shadow: var(--qz-ring); }
.qz-round    { border-radius: var(--qz-r-lg); }
.qz-bg-1     { background: var(--qz-surface-1); }
.qz-bg-2     { background: var(--qz-surface-2); }
.qz-bg-inset { background: var(--qz-surface-inset); }

/* ---- Visibility --------------------------------------------------------- */
.qz-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Breakpoint-scoped display, matching the shell's ladder */
@media (max-width: 767.98px)  { .qz-hide-mobile  { display: none !important; } }
@media (min-width: 768px)     { .qz-only-mobile  { display: none !important; } }
@media (max-width: 991.98px)  { .qz-hide-tablet  { display: none !important; } }
@media (min-width: 992px)     { .qz-only-tablet  { display: none !important; } }
@media (max-width: 1199.98px) { .qz-hide-laptop  { display: none !important; } }

/* ---- Interaction -------------------------------------------------------- */
.qz-clickable { cursor: pointer; }
.qz-nowrap    { white-space: nowrap; }
.qz-full      { width: 100%; }

/* Anything that could exceed its column must say so explicitly. */
.qz-minw0 { min-width: 0; }

/* ==========================================================================
   BUTTON SHAPE — every button in the system is a pill
   This file is loaded last, so the sweep also wins over the per-view <style>
   blocks that still ship their own button radius. Excluded are the wrappers
   that merely carry "btn" in their name and the row/tab controls that are
   not buttons in the visual sense.
   ========================================================================== */

:is(
  button,
  [type="button"], [type="submit"], [type="reset"],
  .btn, [class*="btn"],
  .qz-pagination__page
):not(
  .btn-group, .btn-group-vertical, .btn-group-sm, .btn-group-lg,
  .btn-toolbar, .qz-btn-group,
  .btn-shine,
  .accordion-button, .nav-link, .dropdown-item, .list-group-item,
  .qz-rail__item, .qz-tabbar__item, .qz-nav__link, .qz-user
) {
  border-radius: var(--qz-r-pill) !important;
}

::file-selector-button { border-radius: var(--qz-r-pill) !important; }

/* Segmented clusters stay welded: only the outer edges of the group curve. */
.btn-group > :is(.btn, button):not(:first-child):not(:last-child),
.qz-btn-group > :is(.qz-btn, .btn, button):not(:first-child):not(:last-child) {
  border-radius: 0 !important;
}
.btn-group > :is(.btn, button):first-child:not(:last-child),
.qz-btn-group > :is(.qz-btn, .btn, button):first-child:not(:last-child) {
  border-radius: var(--qz-r-pill) 0 0 var(--qz-r-pill) !important;
}
.btn-group > :is(.btn, button):last-child:not(:first-child),
.qz-btn-group > :is(.qz-btn, .btn, button):last-child:not(:first-child) {
  border-radius: 0 var(--qz-r-pill) var(--qz-r-pill) 0 !important;
}

/* A button welded to a field takes the field's radius on the joined edge so
   the pair still reads as one control. */
.input-group > :is(.btn, button):first-child:not(:last-child),
.input-group > .input-group-btn:first-child > :is(.btn, button) {
  border-radius: var(--qz-r-md) 0 0 var(--qz-r-md) !important;
}
.input-group > :is(.btn, button):last-child:not(:first-child),
.input-group > .input-group-btn:last-child > :is(.btn, button) {
  border-radius: 0 var(--qz-r-md) var(--qz-r-md) 0 !important;
}
.input-group > :is(.btn, button):not(:first-child):not(:last-child) {
  border-radius: 0 !important;
}
