/*!
 * Bootstrap 4 → Bootstrap 5 Compatibility Shim
 * Preserves Bootstrap 4 utility class names that were renamed/removed in Bootstrap 5
 * so existing HTML markup does not need to be changed.
 */

/* ──────────────────────────────────────────────────────────────────────────
   Spacing utilities: Bootstrap 4 used pl-*, pr-*, ml-*, mr-* etc.
   Bootstrap 5 renamed these to ps-*, pe-*, ms-*, me-*
   We add the old names back as aliases.
   ────────────────────────────────────────────────────────────────────────── */

/* pl-* (padding-left) */
.pl-0  { padding-left: 0 !important; }
.pl-1  { padding-left: 0.25rem !important; }
.pl-2  { padding-left: 0.5rem !important; }
.pl-3  { padding-left: 1rem !important; }
.pl-4  { padding-left: 1.5rem !important; }
.pl-5  { padding-left: 3rem !important; }

/* pr-* (padding-right) */
.pr-0  { padding-right: 0 !important; }
.pr-1  { padding-right: 0.25rem !important; }
.pr-2  { padding-right: 0.5rem !important; }
.pr-3  { padding-right: 1rem !important; }
.pr-4  { padding-right: 1.5rem !important; }
.pr-5  { padding-right: 3rem !important; }

/* pt-* (padding-top) — still present in BS5 but kept for safety */
/* pb-* (padding-bottom) — still present in BS5 */

/* ml-* (margin-left) */
.ml-0  { margin-left: 0 !important; }
.ml-1  { margin-left: 0.25rem !important; }
.ml-2  { margin-left: 0.5rem !important; }
.ml-3  { margin-left: 1rem !important; }
.ml-4  { margin-left: 1.5rem !important; }
.ml-5  { margin-left: 3rem !important; }
.ml-auto { margin-left: auto !important; }

/* mr-* (margin-right) */
.mr-0  { margin-right: 0 !important; }
.mr-1  { margin-right: 0.25rem !important; }
.mr-2  { margin-right: 0.5rem !important; }
.mr-3  { margin-right: 1rem !important; }
.mr-4  { margin-right: 1.5rem !important; }
.mr-5  { margin-right: 3rem !important; }
.mr-auto { margin-right: auto !important; }

/* ──────────────────────────────────────────────────────────────────────────
   Text alignment: text-left / text-right removed in BS5 (renamed to
   text-start / text-end)
   ────────────────────────────────────────────────────────────────────────── */
.text-left  { text-align: left !important; }
.text-right { text-align: right !important; }

/* ──────────────────────────────────────────────────────────────────────────
   Float utilities: float-left / float-right removed in BS5
   ────────────────────────────────────────────────────────────────────────── */
.float-left  { float: left !important; }
.float-right { float: right !important; }

/* ──────────────────────────────────────────────────────────────────────────
   Grid: no-gutters removed in BS5 (replaced by g-0)
   ────────────────────────────────────────────────────────────────────────── */
.no-gutters {
  --bs-gutter-x: 0;
  --bs-gutter-y: 0;
  margin-right: 0;
  margin-left: 0;
}
.no-gutters > .col,
.no-gutters > [class*="col-"] {
  padding-right: 0;
  padding-left: 0;
}

/* ──────────────────────────────────────────────────────────────────────────
   Forms: form-group removed in BS5
   ────────────────────────────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 1rem;
}

/* ──────────────────────────────────────────────────────────────────────────
   Buttons: btn-block removed in BS5
   ────────────────────────────────────────────────────────────────────────── */
.btn-block {
  display: block;
  width: 100%;
}
.btn-block + .btn-block {
  margin-top: 0.5rem;
}

/* ──────────────────────────────────────────────────────────────────────────
   Media object: removed in BS5
   ────────────────────────────────────────────────────────────────────────── */
.media {
  display: flex;
  align-items: flex-start;
}
.media-body {
  flex: 1;
}

/* ──────────────────────────────────────────────────────────────────────────
   Badge: badge-* colour variants removed in BS5 (replaced by text-bg-*)
   ────────────────────────────────────────────────────────────────────────── */
.badge-primary   { color: #fff; background-color: #0d6efd; }
.badge-secondary { color: #fff; background-color: #6c757d; }
.badge-success   { color: #fff; background-color: #198754; }
.badge-danger    { color: #fff; background-color: #dc3545; }
.badge-warning   { color: #212529; background-color: #ffc107; }
.badge-info      { color: #212529; background-color: #0dcaf0; }
.badge-light     { color: #212529; background-color: #f8f9fa; }
.badge-dark      { color: #fff; background-color: #212529; }

/* ──────────────────────────────────────────────────────────────────────────
   Jumbotron: removed in BS5
   ────────────────────────────────────────────────────────────────────────── */
.jumbotron {
  padding: 2rem 1rem;
  margin-bottom: 2rem;
  background-color: #e9ecef;
  border-radius: 0.3rem;
}
@media (min-width: 576px) {
  .jumbotron {
    padding: 4rem 2rem;
  }
}
