/*
 * Bootstrap 4 -> 5 compatibility shim.
 * Restores utility/component classes that were removed in Bootstrap 5 but are
 * still used throughout the front-end blade templates. Loaded AFTER
 * bootstrap.min.css so these declarations win where needed.
 * Safe to delete once all templates have been migrated to native BS5 classes.
 */

/* --- Form groups (removed in BS5) --- */
.form-group { margin-bottom: 1rem; }

/* --- Custom form controls (dropped in favour of .form-select / .form-check) --- */
.custom-select {
  display: block;
  width: 100%;
  padding: 0.375rem 2.25rem 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #212529;
  vertical-align: middle;
  background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") no-repeat right 0.75rem center/16px 12px;
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
.custom-control { position: relative; display: block; min-height: 1.5rem; padding-left: 1.5rem; }
.custom-control-label { position: relative; margin-bottom: 0; vertical-align: top; }
.custom-file { position: relative; display: inline-block; width: 100%; height: calc(1.5em + 0.75rem + 2px); }

/* --- .close button (renamed to .btn-close, different rendering) --- */
.close {
  float: right;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  color: #000;
  text-shadow: 0 1px 0 #fff;
  opacity: 0.5;
  background: transparent;
  border: 0;
  padding: 0;
}
.close:hover { color: #000; text-decoration: none; opacity: 0.75; }

/* --- Contextual badge colours (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: #000; background-color: #ffc107; }
.badge-info      { color: #000; background-color: #0dcaf0; }
.badge-light     { color: #000; background-color: #f8f9fa; }
.badge-dark      { color: #fff; background-color: #212529; }

/* --- Screen-reader-only helper (renamed to .visually-hidden) --- */
.sr-only {
  position: absolute !important;
  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;
}

/* --- Spacing utilities: BS5 renamed left/right to start/end --- */
.ml-0{margin-left:0!important}.ml-1{margin-left:.25rem!important}.ml-2{margin-left:.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-0{margin-right:0!important}.mr-1{margin-right:.25rem!important}.mr-2{margin-right:.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}
.pl-0{padding-left:0!important}.pl-1{padding-left:.25rem!important}.pl-2{padding-left:.5rem!important}.pl-3{padding-left:1rem!important}.pl-4{padding-left:1.5rem!important}.pl-5{padding-left:3rem!important}
.pr-0{padding-right:0!important}.pr-1{padding-right:.25rem!important}.pr-2{padding-right:.5rem!important}.pr-3{padding-right:1rem!important}.pr-4{padding-right:1.5rem!important}.pr-5{padding-right:3rem!important}

/* --- Float / text-align / font-weight utilities renamed in BS5 --- */
.float-left  { float: left  !important; }
.float-right { float: right !important; }
.text-left   { text-align: left  !important; }
.text-right  { text-align: right !important; }
.font-weight-bold    { font-weight: 700 !important; }
.font-weight-normal  { font-weight: 400 !important; }
.font-weight-light   { font-weight: 300 !important; }
.font-weight-bolder  { font-weight: bolder !important; }

/* --- Grid gutter helper (renamed to .g-0) --- */
.no-gutters { --bs-gutter-x: 0; --bs-gutter-y: 0; }
.no-gutters > * { padding-right: 0; padding-left: 0; }

/* --- .form-inline (removed; BS5 uses grid/flex utilities) --- */
.form-inline { display: flex; flex-flow: row wrap; align-items: center; }

/* --- .media object (removed in BS5) --- */
.media { display: flex; align-items: flex-start; }
.media-body { flex: 1 1 0%; }

/* --- .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; }
}
