/* Bootstrap 4 -> 5 compatibility layer for the bindb.com design.
 *
 * Loaded AFTER Bootstrap 5 and BEFORE style.css, i.e. in the cascade position
 * Bootstrap 4's own rules used to occupy. Every rule here restores a Bootstrap
 * 4 default that the site's CSS and templates were written against, at the
 * same (low) specificity Bootstrap 4 used, so style.css still overrides them
 * exactly as it did before the upgrade.
 *
 * The vendored bootstrap-5.3.8.min.css also carries one patch (see its first
 * line): `.row > *` is narrowed to column children only.
 */

/* Links: BS4 underlined on hover only. */
a { text-decoration: none; }
a:hover { text-decoration: underline; }
.nav-link:hover, .nav-link:focus, .dropdown-item:hover, .dropdown-item:focus,
.navbar-brand:hover, .navbar-brand:focus, .btn:hover, .btn:focus { text-decoration: none; }

/* Grid: 15px gutters and no xxl container tier. */
.container, .container-fluid, .row { --bs-gutter-x: 1.875rem; }
@media (min-width: 1400px) { .container { max-width: 1140px; } }

/* BS4 gave .col-* their padding directly; BS5 only via `.row > *`. Some
   templates use .col-* blocks outside a .row. :where() keeps specificity at
   (0,1,0) like BS4's own .col-* rule. */
:where(:not(.row)) > .col,
:where(:not(.row)) > [class^="col-"],
:where(:not(.row)) > [class*=" col-"] { padding-left: .9375rem; padding-right: .9375rem; }

/* Lists: browser default indent (BS5 reduces it to 2rem). */
ul, ol { padding-left: 40px; }

/* Dropdowns: BS4 always positioned the menu at top:100% of its parent; BS5
   only does so once Popper has run, which the hover-driven mega-menu bypasses. */
.dropdown-menu { top: 100%; left: 0; margin: .125rem 0 0; }

/* Navbar toggler: BS4 showed no focus ring. */
.navbar-toggler:focus { box-shadow: none; outline: 0; }

/* Forms. */
label { display: inline-block; margin-bottom: .5rem; }
.form-group { margin-bottom: 1rem; }
.form-group > label { width: 100%; }
.modal-footer > * { margin: .25rem; }   /* BS4 order: modal rules came after forms */

/* Tables. */
.table > :not(caption) > * > * { padding: .75rem; }
.table-bordered > :not(caption) > * > * { border-width: 1px; }
.table > thead > tr > th { border-bottom-width: 2px; }
.table-light { --bs-table-bg: #e9ecef; --bs-table-border-color: #dee2e6; --bs-table-color: #495057; }

/* Long URLs in body text must not widen the page on phones. */
p, .container > a { overflow-wrap: break-word; }
