/**
 * Bootstrap 3 to Bootstrap 5 Compatibility CSS
 * This provides compatibility classes for Bootstrap 3 code
 * that hasn't been fully migrated to Bootstrap 5 yet
 */

/* ============================================
   VISIBILITY UTILITIES
   ============================================ */

/* Hidden utilities */
.hidden {
  display: none !important;
}

.hidden-xs {
  display: none !important;
}

@media (min-width: 576px) {
  .hidden-xs {
    display: block !important;
  }
}

.hidden-sm {
  display: block !important;
}

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

.hidden-md {
  display: block !important;
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  .hidden-md {
    display: none !important;
  }
}

.hidden-lg {
  display: block !important;
}

@media (min-width: 1200px) {
  .hidden-lg {
    display: none !important;
  }
}

/* Visible utilities */
.visible-xs {
  display: none !important;
}

@media (max-width: 575.98px) {
  .visible-xs {
    display: block !important;
  }
}

.visible-sm {
  display: none !important;
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .visible-sm {
    display: block !important;
  }
}

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

@media (min-width: 992px) and (max-width: 1199.98px) {
  .visible-md {
    display: block !important;
  }
}

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

@media (min-width: 1200px) {
  .visible-lg {
    display: block !important;
  }
}

/* Inline/block/inline-block variations */
.visible-xs-block,
.visible-xs-inline,
.visible-xs-inline-block,
.visible-sm-block,
.visible-sm-inline,
.visible-sm-inline-block,
.visible-md-block,
.visible-md-inline,
.visible-md-inline-block,
.visible-lg-block,
.visible-lg-inline,
.visible-lg-inline-block {
  display: none !important;
}

@media (max-width: 575.98px) {
  .visible-xs-block {
    display: block !important;
  }
  .visible-xs-inline {
    display: inline !important;
  }
  .visible-xs-inline-block {
    display: inline-block !important;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .visible-sm-block {
    display: block !important;
  }
  .visible-sm-inline {
    display: inline !important;
  }
  .visible-sm-inline-block {
    display: inline-block !important;
  }
}

/* ============================================
   FLOAT UTILITIES
   ============================================ */

.pull-right {
  float: right !important;
}

.pull-left {
  float: left !important;
}

/* ============================================
   ALIGNMENT UTILITIES
   ============================================ */

.center-block {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   BUTTON STYLES
   ============================================ */

.btn-default {
  --bs-btn-color: #333;
  --bs-btn-bg: #fff;
  --bs-btn-border-color: #ccc;
  --bs-btn-hover-color: #333;
  --bs-btn-hover-bg: #e6e6e6;
  --bs-btn-hover-border-color: #adadad;
  --bs-btn-focus-shadow-rgb: 204, 204, 204;
  --bs-btn-active-color: #333;
  --bs-btn-active-bg: #e6e6e6;
  --bs-btn-active-border-color: #adadad;
  --bs-btn-disabled-color: #333;
  --bs-btn-disabled-bg: #fff;
  --bs-btn-disabled-border-color: #ccc;
}

/* ============================================
   PANELS TO CARDS
   ============================================ */

.panel {
  border: 1px solid rgba(0,0,0,.125);
  border-radius: 0.25rem;
  background-color: #fff;
  margin-bottom: 1rem;
}

.panel-default {
  border-color: #ddd;
}

.panel-primary {
  border-color: #0d6efd;
}

.panel-success {
  border-color: #198754;
}

.panel-info {
  border-color: #0dcaf0;
}

.panel-warning {
  border-color: #ffc107;
}

.panel-danger {
  border-color: #dc3545;
}

.panel-heading {
  padding: 0.5rem 1rem;
  border-bottom: 1px solid rgba(0,0,0,.125);
  background-color: #f8f9fa;
  border-radius: calc(0.25rem - 1px) calc(0.25rem - 1px) 0 0;
}

.panel-primary > .panel-heading {
  background-color: #0d6efd;
  color: #fff;
  border-color: #0d6efd;
}

.panel-success > .panel-heading {
  background-color: #198754;
  color: #fff;
  border-color: #198754;
}

.panel-info > .panel-heading {
  background-color: #0dcaf0;
  color: #000;
  border-color: #0dcaf0;
}

.panel-warning > .panel-heading {
  background-color: #ffc107;
  color: #000;
  border-color: #ffc107;
}

.panel-danger > .panel-heading {
  background-color: #dc3545;
  color: #fff;
  border-color: #dc3545;
}

.panel-title {
  margin-top: 0;
  margin-bottom: 0;
  font-size: 1rem;
}

.panel-body {
  padding: 1rem;
}

.panel-footer {
  padding: 0.5rem 1rem;
  background-color: #f8f9fa;
  border-top: 1px solid rgba(0,0,0,.125);
  border-radius: 0 0 calc(0.25rem - 1px) calc(0.25rem - 1px);
}

/* ============================================
   FORM GROUPS
   ============================================ */

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

.form-horizontal .form-group {
  margin-left: -0.75rem;
  margin-right: -0.75rem;
}

.form-horizontal .control-label {
  padding-top: calc(0.375rem + 1px);
  padding-bottom: calc(0.375rem + 1px);
  margin-bottom: 0;
}

/* ============================================
   GLYPHICONS (Removed in Bootstrap 5)
   ============================================ */

/* If you were using glyphicons, replace with Font Awesome or Bootstrap Icons */
.glyphicon {
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  font-style: normal;
  display: inline-block;
}

/* ============================================
   THUMBNAILS
   ============================================ */

.thumbnail {
  display: block;
  padding: 0.25rem;
  background-color: #fff;
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
  max-width: 100%;
  height: auto;
}

.thumbnail > img {
  max-width: 100%;
  height: auto;
}

/* ============================================
   WELLS
   ============================================ */

.well {
  min-height: 20px;
  padding: 19px;
  margin-bottom: 20px;
  background-color: #f5f5f5;
  border: 1px solid #e3e3e3;
  border-radius: 4px;
  box-shadow: inset 0 1px 1px rgba(0,0,0,.05);
}

.well-sm {
  padding: 9px;
  border-radius: 3px;
}

.well-lg {
  padding: 24px;
  border-radius: 6px;
}

/* ============================================
   LABELS (Now Badges)
   ============================================ */

.label {
  display: inline-block;
  padding: 0.25em 0.4em;
  font-size: 75%;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 0.25rem;
}

.label-default {
  background-color: #6c757d;
}

.label-primary {
  background-color: #0d6efd;
}

.label-success {
  background-color: #198754;
}

.label-info {
  background-color: #0dcaf0;
  color: #000;
}

.label-warning {
  background-color: #ffc107;
  color: #000;
}

.label-danger {
  background-color: #dc3545;
}

/* ============================================
   INPUT GROUPS
   ============================================ */

.input-group-addon {
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #495057;
  text-align: center;
  white-space: nowrap;
  background-color: #e9ecef;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
}

.input-group-btn {
  position: relative;
  font-size: 0;
  white-space: nowrap;
}

/* ============================================
   NAVBAR COMPATIBILITY
   ============================================ */

/* Bootstrap 3 navbar showed on desktop automatically, BS5 needs explicit CSS */
@media (min-width: 992px) {
  .navbar-collapse {
    display: block !important;
    flex-basis: auto;
  }
  
  .navbar-expand-lg .navbar-collapse {
    display: flex !important;
  }
}

.navbar-right {
  margin-left: auto !important;
}

.navbar-left {
  margin-right: auto !important;
}

.navbar-form {
  padding: 0.5rem 1rem;
}

/* ============================================
   BREADCRUMB
   ============================================ */

.breadcrumb > li + li:before {
  content: "/";
  padding: 0 0.5rem;
  color: #6c757d;
}

/* ============================================
   PAGINATION
   ============================================ */

.pagination > li > a,
.pagination > li > span {
  position: relative;
  display: block;
  padding: 0.375rem 0.75rem;
  margin-left: -1px;
  line-height: 1.5;
  color: #0d6efd;
  text-decoration: none;
  background-color: #fff;
  border: 1px solid #dee2e6;
}

/* ============================================
   RESPONSIVE EMBED (Now Ratio)
   ============================================ */

.embed-responsive {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
}

.embed-responsive-16by9::before {
  padding-top: 56.25%;
}

.embed-responsive-4by3::before {
  padding-top: 75%;
}

.embed-responsive-item {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ============================================
   CLEARFIX
   ============================================ */

.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/* ============================================
   RESPONSIVE UTILITIES - PRINT
   ============================================ */

.visible-print {
  display: none !important;
}

@media print {
  .visible-print {
    display: block !important;
  }
  .hidden-print {
    display: none !important;
  }
}

/* ============================================
   CLOSE BUTTON
   ============================================ */

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

.close:hover,
.close:focus {
  color: #000;
  text-decoration: none;
  opacity: .75;
}

/* ============================================
   HELPER CLASSES
   ============================================ */

.show {
  display: block !important;
}

.hide {
  display: none !important;
}

.invisible {
  visibility: hidden !important;
}

.text-hide {
  font: 0/0 a;
  color: transparent;
  text-shadow: none;
  background-color: transparent;
  border: 0;
}

.affix {
  position: fixed;
}

