/*
 * Bootstrap 4 -> 5.3 compatibility layer for the mubea theme.
 *
 * Loaded right after vendor/twitter-bootstrap-5.3.8/css/bootstrap.min.css and before the theme's own
 * base.css / wp.css / main.css. It only restores Bootstrap 4 defaults that Bootstrap 5 changed and
 * that this theme relied on implicitly, so the site looks the same after the library upgrade.
 * Every rule names the Bootstrap 4 behaviour it keeps. Delete a rule here to adopt the BS5 default.
 */

:root {
	/* BS4 link colours (#007bff / #0056b3); BS5.3 uses #0d6efd and a darker hover */
	--bs-link-color: #007bff;
	--bs-link-color-rgb: 0, 123, 255;
	--bs-link-hover-color: #0056b3;
	--bs-link-hover-color-rgb: 0, 86, 179;
	/* BS4 corner radius .25rem; BS5.3 uses .375rem for buttons, inputs, cards, dropdowns */
	--bs-border-radius: .25rem;
}

/* BS4: links not underlined until hover. BS5 underlines all links by default. */
a { text-decoration: none; }
a:hover { text-decoration: underline; }
.btn:hover, .nav a:hover, .navbar a:hover, .dropdown-menu a:hover { text-decoration: none; }

/* BS4 buttons used the same .25rem radius as everything else */
.btn { --bs-btn-border-radius: .25rem; }

/* BS4 gutters were 30px (15px each side); BS5 uses 1.5rem = 24px */
.container, .container-fluid, .container-sm, .container-md, .container-lg, .container-xl, .container-xxl,
.row { --bs-gutter-x: 30px; }
.row.g-0 { --bs-gutter-x: 0; --bs-gutter-y: 0; } /* .g-0 replaces BS4 .no-gutters */

/* BS4 stopped growing the container at 1140px; BS5 adds a 1320px step at >=1400px */
@media (min-width: 1400px) {
	.container, .container-sm, .container-md, .container-lg, .container-xl, .container-xxl { max-width: 1140px; }
}

/* BS4 .navbar had 1rem horizontal padding; BS5 sets it to 0 */
.navbar { --bs-navbar-padding-x: 1rem; }

/* BS4 <small>/.small was 80%; BS5 uses .875em */
small, .small { font-size: 80%; }

/* BS4 reboot gave every <label> a bottom margin; BS5 only gives it to .form-label */
label { display: inline-block; margin-bottom: .5rem; }

/* BS4 .table-sm cells had .3rem padding; BS5 uses .25rem */
.table-sm > :not(caption) > * > * { padding: .3rem; }

/* BS4 .form-inline (removed in BS5): inputs sized to content from 576px up. The header search
   forms now use .d-flex instead; this keeps their input width as before. */
@media (min-width: 576px) {
	.search-bar .form-control { display: inline-block; width: auto; }
}
