/*
 * Website Hosts UK Bootstrap 4 compatibility layer
 * Used with Bootstrap 5.3.8 during the staged migration.
 * New and edited markup should use native Bootstrap 5 classes.
 */

/* Preserve Bootstrap 4's normal link presentation. */
a { text-decoration: none; }
a:hover { text-decoration: underline; }
.btn:hover,
.nav-link:hover,
.dropdown-item:hover,
.navbar-brand:hover,
.card-link:hover { text-decoration: none; }

/* Directional utilities retained as a fallback for generated/older markup. */
.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; }

@media (min-width: 576px) {
  .ml-sm-0 { margin-left: 0 !important; }
  .ml-sm-1 { margin-left: .25rem !important; }
  .ml-sm-2 { margin-left: .5rem !important; }
  .ml-sm-3 { margin-left: 1rem !important; }
  .ml-sm-4 { margin-left: 1.5rem !important; }
  .ml-sm-5 { margin-left: 3rem !important; }
  .ml-sm-auto { margin-left: auto !important; }
  .mr-sm-0 { margin-right: 0 !important; }
  .mr-sm-1 { margin-right: .25rem !important; }
  .mr-sm-2 { margin-right: .5rem !important; }
  .mr-sm-3 { margin-right: 1rem !important; }
  .mr-sm-4 { margin-right: 1.5rem !important; }
  .mr-sm-5 { margin-right: 3rem !important; }
  .mr-sm-auto { margin-right: auto !important; }
}
@media (min-width: 768px) {
  .ml-md-0 { margin-left: 0 !important; }
  .ml-md-1 { margin-left: .25rem !important; }
  .ml-md-2 { margin-left: .5rem !important; }
  .ml-md-3 { margin-left: 1rem !important; }
  .ml-md-4 { margin-left: 1.5rem !important; }
  .ml-md-5 { margin-left: 3rem !important; }
  .ml-md-auto { margin-left: auto !important; }
  .mr-md-0 { margin-right: 0 !important; }
  .mr-md-1 { margin-right: .25rem !important; }
  .mr-md-2 { margin-right: .5rem !important; }
  .mr-md-3 { margin-right: 1rem !important; }
  .mr-md-4 { margin-right: 1.5rem !important; }
  .mr-md-5 { margin-right: 3rem !important; }
  .mr-md-auto { margin-right: auto !important; }
}
@media (min-width: 992px) {
  .ml-lg-0 { margin-left: 0 !important; }
  .ml-lg-1 { margin-left: .25rem !important; }
  .ml-lg-2 { margin-left: .5rem !important; }
  .ml-lg-3 { margin-left: 1rem !important; }
  .ml-lg-4 { margin-left: 1.5rem !important; }
  .ml-lg-5 { margin-left: 3rem !important; }
  .ml-lg-auto { margin-left: auto !important; }
  .mr-lg-0 { margin-right: 0 !important; }
  .mr-lg-1 { margin-right: .25rem !important; }
  .mr-lg-2 { margin-right: .5rem !important; }
  .mr-lg-3 { margin-right: 1rem !important; }
  .mr-lg-4 { margin-right: 1.5rem !important; }
  .mr-lg-5 { margin-right: 3rem !important; }
  .mr-lg-auto { margin-right: auto !important; }
}

/* Removed Bootstrap 4 helpers retained as a fallback. */
.font-weight-bold { font-weight: 700 !important; }
.font-weight-normal { font-weight: 400 !important; }
.font-weight-light { font-weight: 300 !important; }
.font-italic { font-style: italic !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }
.float-left { float: left !important; }
.float-right { float: right !important; }
.border-left { border-left: 1px solid #dee2e6 !important; }
.border-right { border-right: 1px solid #dee2e6 !important; }
.btn-block { display: block; width: 100%; }
.no-gutters { margin-right: 0; margin-left: 0; }
.no-gutters > .col,
.no-gutters > [class*="col-"] { padding-right: 0; padding-left: 0; }
.dropdown-menu-right { right: 0; left: auto; }
.rounded-lg { border-radius: .3rem !important; }
.media { display: flex; align-items: flex-start; }
.media-body { flex: 1; }
.form-group { margin-bottom: 1rem; }
.custom-select { display: inline-block; width: 100%; }
.input-group-prepend,
.input-group-append { display: flex; }

/* Bootstrap 4 toggle-button markup still used by two plan selectors. */
.btn-group-toggle > .btn input[type="radio"],
.btn-group-toggle > .btn input[type="checkbox"] {
  position: absolute;
  clip: rect(0, 0, 0, 0);
  pointer-events: none;
}

/* Bootstrap 4 table-head helpers. */
.thead-dark th { color: #fff; background-color: #343a40; border-color: #454d55; }
.thead-light th { color: #495057; background-color: #e9ecef; border-color: #dee2e6; }

/* Bootstrap 4 badge colour aliases for dynamic content. */
.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: #fff; background-color: #0dcaf0; }
.badge-light { color: #212529; background-color: #f8f9fa; }
.badge-dark { color: #fff; background-color: #212529; }
.badge-pill { padding-right: .6em; padding-left: .6em; border-radius: 10rem; }

/* Second-pass Bootstrap 4 visual parity. */
.badge.rounded-pill {
  padding-right: .6em;
  padding-left: .6em;
}
.btn.d-block.w-100 + .btn.d-block.w-100 {
  margin-top: .5rem;
}
