/* Bootstrap 3 compatibility helpers for the Bootstrap 5 migration.
   Keep this layer small: it only restores legacy helpers still used by the app. */

/* Legacy grid helpers */
.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6,
.col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {
  float: left;
}

.col-xs-12 { width: 100%; }
.col-xs-11 { width: 91.66666667%; }
.col-xs-10 { width: 83.33333333%; }
.col-xs-9 { width: 75%; }
.col-xs-8 { width: 66.66666667%; }
.col-xs-7 { width: 58.33333333%; }
.col-xs-6 { width: 50%; }
.col-xs-5 { width: 41.66666667%; }
.col-xs-4 { width: 33.33333333%; }
.col-xs-3 { width: 25%; }
.col-xs-2 { width: 16.66666667%; }
.col-xs-1 { width: 8.33333333%; }

@media (max-width: 767.98px) {
  .hidden-xs,
  tr.hidden-xs,
  th.hidden-xs,
  td.hidden-xs {
    display: none !important;
  }

  .visible-xs,
  tr.visible-xs,
  th.visible-xs,
  td.visible-xs {
    display: table-row !important;
  }

  .visible-xs.visible-block { display: block !important; }
}

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

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

/* Legacy navbar / collapse behaviour */
.navbar-header { float: left; }
.navbar-toggle {
  position: relative;
  float: right;
  margin: 8px 15px 8px 0;
  padding: 9px 10px;
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
}

.navbar-toggle:focus,
.navbar-toggle:hover {
  background-color: rgba(255, 255, 255, .08);
}

.navbar-toggle .icon-bar {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 1px;
  background-color: #888;
}

.navbar-inverse .navbar-toggle .icon-bar {
  background-color: #fff;
}

.caret {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 2px;
  vertical-align: middle;
  border-top: 4px solid;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
}

@media (max-width: 767.98px) {
  .navbar-collapse.collapse {
    display: none !important;
  }

  .navbar-collapse.collapse.show,
  .navbar-collapse.collapse.in {
    display: block !important;
  }
}

@media (min-width: 768px) {
  .navbar-collapse.collapse {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
  }

  .navbar-toggle {
    display: none !important;
  }
}

/* Legacy content components still referenced throughout the project */
.panel {
  margin-bottom: 20px;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
}

.panel-body { padding: 15px; }

.panel-heading {
  padding: 10px 15px;
  border-bottom: 1px solid #ddd;
  border-top-left-radius: 3px;
  border-top-right-radius: 3px;
}

.panel-footer {
  padding: 10px 15px;
  border-top: 1px solid #ddd;
  border-bottom-right-radius: 3px;
  border-bottom-left-radius: 3px;
  background-color: #f5f5f5;
}

.panel-group {
  margin-bottom: 20px;
}

.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);
}

.thumbnail {
  display: block;
  padding: 4px;
  margin-bottom: 20px;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.thumbnail > img,
.thumbnail a > img {
  display: block;
  max-width: 100%;
  height: auto;
  margin-left: auto;
  margin-right: auto;
}

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

.label:empty { display: none; }

.label-default { background-color: #777; }
.label-primary { background-color: #337ab7; }
.label-success { background-color: #5cb85c; }
.label-info { background-color: #5bc0de; }
.label-warning { background-color: #f0ad4e; }
.label-danger { background-color: #d9534f; }

.badge {
  display: inline-block;
  min-width: 10px;
  padding: 3px 7px;
  border-radius: 10px;
  background-color: #777;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.pagination {
  display: inline-block;
  padding-left: 0;
  margin: 20px 0;
  border-radius: 4px;
}

.pagination > li {
  display: inline;
}

.pagination > li > a,
.pagination > li > span {
  position: relative;
  float: left;
  margin-left: -1px;
  padding: 6px 12px;
  border: 1px solid #ddd;
  background: #fff;
  color: #337ab7;
  text-decoration: none;
}

.pagination > li:first-child > a,
.pagination > li:first-child > span {
  margin-left: 0;
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
}

.pagination > li:last-child > a,
.pagination > li:last-child > span {
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
}

.pagination > .active > a,
.pagination > .active > span,
.pagination > .active > a:hover,
.pagination > .active > span:hover,
.pagination > .active > a:focus,
.pagination > .active > span:focus {
  z-index: 2;
  background: #337ab7;
  border-color: #337ab7;
  color: #fff;
}

.pagination > .disabled > span,
.pagination > .disabled > span:hover,
.pagination > .disabled > span:focus,
.pagination > .disabled > a,
.pagination > .disabled > a:hover,
.pagination > .disabled > a:focus {
  border-color: #ddd;
  background: #fff;
  color: #777;
  cursor: not-allowed;
}

.breadcrumb {
  padding: 8px 15px;
  margin-bottom: 20px;
  list-style: none;
  background-color: #f5f5f5;
  border-radius: 4px;
}

.breadcrumb > li {
  display: inline-block;
}

.breadcrumb > li + li:before {
  content: "/\00a0";
  color: #ccc;
  padding: 0 5px;
}

.nav-tabs {
  border-bottom: 1px solid #ddd;
}

.nav-tabs > li {
  float: left;
  margin-bottom: -1px;
}

.nav-tabs > li > a {
  display: block;
  margin-right: 2px;
  padding: 10px 15px;
  border: 1px solid transparent;
  border-radius: 4px 4px 0 0;
  text-decoration: none;
}

.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
  border: 1px solid #ddd;
  border-bottom-color: transparent;
  background: #fff;
}

.nav-pills > li {
  float: left;
}

.nav-pills > li > a {
  display: block;
  padding: 10px 15px;
  border-radius: 4px;
  text-decoration: none;
}

.nav-pills > li.active > a,
.nav-pills > li.active > a:hover,
.nav-pills > li.active > a:focus {
  background: #337ab7;
  color: #fff;
}

.form-group {
  margin-bottom: 15px;
}

.control-label {
  display: inline-block;
  margin-bottom: 5px;
  font-weight: 700;
}

.help-block {
  display: block;
  margin-top: 5px;
  margin-bottom: 10px;
  color: #737373;
}

.input-group {
  position: relative;
  display: table;
  border-collapse: separate;
}

.input-group-addon {
  display: table-cell;
  width: 1%;
  white-space: nowrap;
  vertical-align: middle;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  color: #555;
  text-align: center;
  background-color: #eee;
  border: 1px solid #ccc;
}

.btn-group,
.btn-toolbar {
  display: inline-block;
}
