/*
 * First-party utility classes -- Bootstrap 5.3's utility API, restricted to the
 * 222 classes this site actually uses, with Bootstrap's exact selectors, values
 * and `!important` placement.
 *
 * Loaded before the site's own stylesheets, which still load after this file and
 * still win. Every rule restates Bootstrap's own declaration, with any variable
 * reference resolved to that variable's Bootstrap 5.3 default.
 *
 * HOW THE USED SET WAS COMPUTED
 * -----------------------------
 * Every `class="..."` token was extracted from:
 *   - shopping_list/src/**\/templates/**\/*.html  (all apps and both themes),
 *     excluding vendor files, style_inline.html and the generated
 *     _inline_page_css.html bundles;
 *   - the DB-backed product-page bodies published on /c/ (page_templates_*), which
 *     live in no file in this repository;
 *   - first-party JS under static/src, which toggles classes appearing in no template.
 * The tokens were then matched against the Bootstrap utility families. The same
 * computation is re-run by core/tests/test_first_party_utilities.py, which fails if a
 * used class has no rule here.
 *
 * DELIBERATE DEVIATIONS from upstream, all behaviour-preserving:
 *   - `.border-1` / `.border-2` set `border-width` directly, and `.border-dark` /
 *     `.border-secondary` set `border-color` directly, rather than reassigning a
 *     variable the `.border` rule reads. Composed with `.border` the computed result
 *     is the same; standalone they now do what their name says.
 *   - `.ratio` uses the first-party `--pn-aspect-ratio`.
 *   - Colour utilities carry a literal value, with no opacity variable: no
 *     `.text-opacity-*` / `.bg-opacity-*` class is used. The two brand colours are
 *     the exception -- `.text-primary` / `.bg-success` / `.text-success` read
 *     `--pn-primary-rgb` / `--pn-success-rgb`, which a theme stylesheet overrides
 *     (base/variables.css greens the success colour, the UnBox Labs theme purples
 *     the primary one), falling back to the Bootstrap 5.3 default.
 *
 * Regenerate nothing: this file is hand-owned from here on. Add a class when a
 * template starts using it -- the test above will tell you which one.
 */

/* ---- display ----------------------------------------------------------- */

.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-none { display: none !important; }

/* ---- flex -------------------------------------------------------------- */
.align-items-center { align-items: center !important; }
.flex-row { flex-direction: row !important; }
.justify-content-center { justify-content: center !important; }

/* ---- gap --------------------------------------------------------------- */
.gap-2 { gap: 0.5rem !important; }

/* ---- spacing ----------------------------------------------------------- */

.m-0 { margin: 0 !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.ms-1 { margin-left: 0.25rem !important; }
.ms-auto { margin-left: auto !important; }
.my-4 {
  margin-top: 1.5rem !important;
  margin-bottom: 1.5rem !important;
}
.my-5 {
  margin-top: 3rem !important;
  margin-bottom: 3rem !important;
}
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.ps-0 { padding-left: 0 !important; }
.px-3 {
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}
.py-1 {
  padding-top: 0.25rem !important;
  padding-bottom: 0.25rem !important;
}

/* ---- sizing ------------------------------------------------------------ */
.w-100 { width: 100% !important; }

/* ---- text -------------------------------------------------------------- */

.text-center { text-align: center !important; }

/* ---- font -------------------------------------------------------------- */
.fw-bold { font-weight: 700 !important; }
.small { font-size: 0.875em; }

/* ---- color ------------------------------------------------------------- */
.text-muted { color: rgba(33, 37, 41, 0.75) !important; }

/* ---- position ---------------------------------------------------------- */
.position-static { position: static !important; }

/* ---- overflow ---------------------------------------------------------- */

/* ---- border ------------------------------------------------------------ */
.border-0 { border: 0 !important; }
.border-end { border-right: 1px solid #dee2e6 !important; }

/* ---- rounded ----------------------------------------------------------- */

.rounded { border-radius: 0.375rem !important; }
.rounded-0 { border-radius: 0 !important; }

/* ---- shadow ------------------------------------------------------------ */
.shadow-sm { box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important; }

/* ---- ratio ------------------------------------------------------------- */

/* ---- misc -------------------------------------------------------------- */
.visually-hidden:not(caption) {
  position: absolute !important;
}

.visually-hidden {
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ---- sm (576px and up) -------------------------------------------- */

/* ---- md (768px and up) -------------------------------------------- */

@media (min-width: 768px) {
  .d-md-block { display: block !important; }
  .p-md-5 { padding: 3rem !important; }
}

/* ---- lg (992px and up) -------------------------------------------- */

@media (min-width: 992px) {
  .d-lg-block { display: block !important; }
  .d-lg-none { display: none !important; }
}

/* ---- xl (1200px and up) -------------------------------------------- */

@media (min-width: 1200px) {
  .d-xl-block { display: block !important; }
  .d-xl-none { display: none !important; }

  .align-items-xl-center { align-items: center !important; }

  .gap-xl-1 { gap: 0.25rem !important; }
}
