/*
 * Bootstrap 3 → 5 Compatibility Shim
 * Restores BS3 classes that were removed in BS4/BS5 so legacy page content
 * continues to render correctly without editing every template.
 */

/* ── Float helpers ─────────────────────────────────────────────── */
.pull-left  { float: left  !important; }
.pull-right { float: right !important; }
.center-block { display: block; margin-left: auto; margin-right: auto; }

/* ── Text alignment (BS5 renamed these) ────────────────────────── */
.text-left  { text-align: left  !important; }
.text-right { text-align: right !important; }

/* ── Images ─────────────────────────────────────────────────────── */
.img-responsive { max-width: 100%; height: auto; display: block; }
.thumbnail { display: block; padding: 4px; border: 1px solid #ddd; border-radius: 4px; }

/* ── Panel (removed in BS4, use card in BS5) ────────────────────── */
.panel {
  margin-bottom: 20px;
  background-color: #fff;
  border: 1px solid transparent;
  border-radius: 4px;
  box-shadow: 0 1px 1px rgba(0,0,0,.05);
}
.panel-default { border-color: #ddd; }
.panel-default > .panel-heading { background-color: #f5f5f5; border-color: #ddd; color: #333; }
.panel-heading {
  padding: 10px 15px;
  border-bottom: 1px solid transparent;
  border-top-left-radius: 3px;
  border-top-right-radius: 3px;
}
.panel-body { padding: 15px; }
.panel-footer {
  padding: 10px 15px;
  background-color: #f5f5f5;
  border-top: 1px solid #ddd;
  border-bottom-left-radius: 3px;
  border-bottom-right-radius: 3px;
}
.panel-title { margin: 0; font-size: 16px; }

/* ── Well ───────────────────────────────────────────────────────── */
.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; }

/* ── Button variants (btn-default removed in BS4) ───────────────── */
.btn-default {
  color: #333;
  background-color: #fff;
  border-color: #ccc;
}
.btn-default:hover, .btn-default:focus, .btn-default:active {
  color: #333;
  background-color: #e6e6e6;
  border-color: #adadad;
}
.btn-xs { padding: 1px 5px; font-size: 12px; border-radius: 3px; }

/* ── Media object (removed in BS5) ─────────────────────────────── */
.media { display: flex; align-items: flex-start; }
.media-body { flex: 1; min-width: 0; }
.media-left, .media-right { display: block; }
.media-left  { padding-right: 10px; }
.media-right { padding-left:  10px; }
.media-middle { align-self: center; }
.media-bottom { align-self: flex-end; }
.media-list { list-style: none; padding-left: 0; }
.media-list .media { margin-top: 15px; }

/* ── Label (badge-style, BS5 keeps .badge but removed .label) ────── */
.label {
  display: inline;
  padding: .2em .6em .3em;
  font-size: 75%;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: .25em;
}
.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; }

/* ── col-xs-* grid (removed in BS4; xs = col- in BS5) ──────────── */
.col-xs-1  { flex: 0 0 auto; width: 8.3333%;  }
.col-xs-2  { flex: 0 0 auto; width: 16.6667%; }
.col-xs-3  { flex: 0 0 auto; width: 25%;      }
.col-xs-4  { flex: 0 0 auto; width: 33.3333%; }
.col-xs-5  { flex: 0 0 auto; width: 41.6667%; }
.col-xs-6  { flex: 0 0 auto; width: 50%;      }
.col-xs-7  { flex: 0 0 auto; width: 58.3333%; }
.col-xs-8  { flex: 0 0 auto; width: 66.6667%; }
.col-xs-9  { flex: 0 0 auto; width: 75%;      }
.col-xs-10 { flex: 0 0 auto; width: 83.3333%; }
.col-xs-11 { flex: 0 0 auto; width: 91.6667%; }
.col-xs-12 { flex: 0 0 auto; width: 100%;     }

/* ── Page header ─────────────────────────────────────────────────── */
.page-header {
  padding-bottom: 9px;
  margin: 40px 0 20px;
  border-bottom: 1px solid #eee;
}

/* ── Visibility helpers (BS3 responsive show/hide) ──────────────── */
@media (max-width: 767px) {
  .hidden-xs { display: none !important; }
  .visible-xs-block { display: block !important; }
}
@media (min-width: 768px) and (max-width: 991px) {
  .hidden-sm { display: none !important; }
  .visible-sm-block { display: block !important; }
}
@media (min-width: 992px) and (max-width: 1199px) {
  .hidden-md { display: none !important; }
}
@media (min-width: 1200px) {
  .hidden-lg { display: none !important; }
}

/* ── Misc removed utilities ──────────────────────────────────────── */
.dl-horizontal dt { float: left; width: 160px; clear: left; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-horizontal dd { margin-left: 180px; }
.list-inline { list-style: none; padding-left: 0; }
.list-inline > li { display: inline-block; padding: 0 5px; }

/* ── Navbar handled by site.css (.site-nav) ─────────────────────── */
/* Toggler, hover dropdowns, and item styling are all in site.css    */
