/*
 * Bootstrap 5 compatibility layer for the public website.
 * The site was designed on Bootstrap 4; these rules restore the Bootstrap 4
 * defaults that Bootstrap 5 changed so the existing design stays the same.
 * Must be loaded after bootstrap.min.css and before style.css.
 */

:root {
  --bs-link-color: #007bff;
  --bs-link-color-rgb: 0, 123, 255;
  --bs-link-hover-color: #0056b3;
  --bs-link-hover-color-rgb: 0, 86, 179;
  --bs-border-radius: .25rem;
  --bs-border-radius-sm: .2rem;
  --bs-border-radius-lg: .3rem;
  scroll-behavior: auto;
}

/* Reboot */
a {
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.btn:hover,
.nav-link:hover,
.navbar-brand:hover,
.dropdown-item:hover,
.page-link:hover,
.list-group-item-action:hover,
.card-link:hover,
.close:hover {
  text-decoration: none;
}

hr {
  color: rgba(0, 0, 0, .1);
  opacity: 1;
}

ol,
ul {
  padding-left: 2.5rem;
}

label {
  margin-bottom: .5rem;
}

h1, .h1 { font-size: 2.5rem; }
h2, .h2 { font-size: 2rem; }
h3, .h3 { font-size: 1.75rem; }
h4, .h4 { font-size: 1.5rem; }

.text-muted {
  color: #6c757d !important;
}

/* Grid: Bootstrap 4 used 30px gutters and had no xxl container width */
.container,
.container-fluid,
.container-sm,
.container-md,
.container-lg,
.container-xl,
.row {
  --bs-gutter-x: 30px;
}

@media (min-width: 1400px) {
  .container,
  .container-sm,
  .container-md,
  .container-lg,
  .container-xl {
    max-width: 1140px;
  }
}

/* Forms */
.form-group {
  margin-bottom: 1rem;
}

.form-control {
  border-color: #ced4da;
}

select.form-control {
  -webkit-appearance: auto;
  -moz-appearance: auto;
  appearance: auto;
}

/* Navbar / dropdown */
.navbar {
  --bs-navbar-padding-x: 1rem;
}

.navbar-toggler:focus {
  box-shadow: none;
}

.dropdown-menu {
  --bs-dropdown-item-padding-x: 1.5rem;
  top: 100%;
  left: 0;
}

/* Components */
.alert {
  --bs-alert-padding-x: 1.25rem;
  --bs-alert-padding-y: .75rem;
}

.alert-success {
  --bs-alert-color: #155724;
  --bs-alert-bg: #d4edda;
  --bs-alert-border-color: #c3e6cb;
}

.alert-danger {
  --bs-alert-color: #721c24;
  --bs-alert-bg: #f8d7da;
  --bs-alert-border-color: #f5c6cb;
}

.alert-warning {
  --bs-alert-color: #856404;
  --bs-alert-bg: #fff3cd;
  --bs-alert-border-color: #ffeeba;
}

.alert-info {
  --bs-alert-color: #0c5460;
  --bs-alert-bg: #d1ecf1;
  --bs-alert-border-color: #bee5eb;
}

.card {
  --bs-card-spacer-y: 1.25rem;
  --bs-card-spacer-x: 1.25rem;
  --bs-card-cap-padding-y: .75rem;
  --bs-card-cap-padding-x: 1.25rem;
}

.pagination {
  --bs-pagination-padding-y: .5rem;
}

.carousel-indicators {
  list-style: none;
}

/* Bootstrap 4 columns were positioned, so absolutely placed children (e.g. carousel indicators) align to the column */
.row > .col,
.row > [class*="col-"] {
  position: relative;
}

.table {
  --bs-table-bg: transparent;
}

.close {
  float: right;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  color: #000;
  text-shadow: 0 1px 0 #fff;
  opacity: .5;
}

.close:hover {
  color: #000;
}

.close:not(:disabled):not(.disabled):hover,
.close:not(:disabled):not(.disabled):focus {
  opacity: .75;
}

button.close {
  padding: 0;
  background-color: transparent;
  border: 0;
}
