/* Runtime compatibility layer while migrating BS3 -> BS5 */

.navbar-mi {
  background-color: #3dcd58;
  border-color: #009530;
}

.navbar-mi .navbar-brand,
.navbar-mi .nav-link,
.navbar-mi .dropdown-toggle,
.navbar-mi .navbar-text,
.navbar-mi .navbar-nav > li > a {
  color: #fff !important;
}

.navbar-mi .navbar-brand:hover,
.navbar-mi .navbar-brand:focus,
.navbar-mi .nav-link:hover,
.navbar-mi .nav-link:focus {
  color: #fff !important;
}

.navbar-mi .navbar-toggler {
  border-color: #009530;
}

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

.dropdown-menu-end {
  right: 0;
  left: auto;
}

.dropdown-menu {
  display: none;
}

.dropdown.show > .dropdown-menu,
.dropdown.open > .dropdown-menu {
  display: block;
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: 0.4rem 1rem;
}

.card {
  margin-bottom: 20px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.card-header {
  background-color: #f5f5f5;
  border-bottom: 1px solid #ddd;
}

.card-body {
  padding: 15px;
}

.btn-close {
  float: right;
  width: 1em;
  height: 1em;
  padding: 0.25em;
  opacity: 0.7;
}

.btn-close:hover {
  opacity: 1;
}

.btn-secondary {
  color: #333;
  background-color: #fff;
  border-color: #ccc;
}

.btn-secondary:hover {
  color: #333;
  background-color: #e6e6e6;
  border-color: #adadad;
}

/* Keep legacy visibility helpers working with migrated templates */
@media (max-width: 767.98px) {
  .hidden-xs {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .visible-xs {
    display: none !important;
  }
}

@media (max-width: 991.98px) {
  .hidden-xs.hidden-sm {
    display: none !important;
  }
}

@media (min-width: 992px) {
  .visible-xs.visible-sm {
    display: none !important;
  }
}

/* Bootstrap 5 display utility compatibility (header/nav uses these heavily) */
.d-none {
  display: none !important;
}

@media (min-width: 768px) {
  .d-md-block {
    display: block !important;
  }

  .d-md-flex {
    display: flex !important;
  }

  .d-md-none {
    display: none !important;
  }
}

@media (min-width: 992px) {
  .d-lg-flex {
    display: flex !important;
  }

  .d-lg-none {
    display: none !important;
  }
}

/* navbar-expand-lg behavior fallback when BS5 CSS isn't active */
@media (max-width: 991.98px) {
  .navbar-expand-lg .navbar-collapse {
    display: none !important;
    width: 100%;
  }

  .navbar-expand-lg .navbar-collapse.show {
    display: block !important;
  }

  .navbar-expand-lg .navbar-toggler {
    display: inline-block;
  }
}

@media (min-width: 992px) {
  .navbar-expand-lg .navbar-toggler {
    display: none;
  }

  .navbar-expand-lg .navbar-collapse {
    display: flex !important;
    flex-basis: auto;
  }
}
