/*!
 * Bootstrap 3/4 → 5 Compatibility Shim
 * Maps deprecated Bootstrap 3 and 4 classes to Bootstrap 5 equivalents.
 * This allows existing views to continue working after upgrading to Bootstrap 5.
 */

/* ─── Grid: col-xs-* → col-* (xs breakpoint removed in BS5) ─── */
/*
 * BS5 columns need a .row (flex container) parent to work.
 * Many BS3 views place col-xs-* directly inside .container without .row.
 * We fix this with two approaches:
 *   1. :has() selector for modern browsers (Chrome 105+, Firefox 121+, Safari 15.4+)
 *   2. Inline-block fallback so columns still stack correctly in older browsers
 */

/* Fallback: make col-xs-* behave as inline-block when not in a flex context */
[class*="col-xs-"],
[class*="col-sm-"],
[class*="col-md-"],
[class*="col-lg-"] {
    box-sizing: border-box;
    padding-right: var(--bs-gutter-x, 0.75rem);
    padding-left: var(--bs-gutter-x, 0.75rem);
}

/* Make containers that have direct col children act as flex rows (modern browsers) */
.container:has(> [class*="col-xs-"]),
.container:has(> [class*="col-sm-"]),
.container:has(> [class*="col-md-"]),
.container:has(> [class*="col-lg-"]),
.container-fluid:has(> [class*="col-xs-"]),
.container-fluid:has(> [class*="col-sm-"]),
.container-fluid:has(> [class*="col-md-"]),
.container-fluid:has(> [class*="col-lg-"]) {
    display: flex;
    flex-wrap: wrap;
    margin-right: calc(var(--bs-gutter-x, 0.75rem) * -1);
    margin-left: calc(var(--bs-gutter-x, 0.75rem) * -1);
}

/* col-xs-* definitions — width + flex shorthand */
.col-xs-1  { flex: 0 0 auto; width: 8.33333333%;  max-width: 8.33333333%; }
.col-xs-2  { flex: 0 0 auto; width: 16.66666667%; max-width: 16.66666667%; }
.col-xs-3  { flex: 0 0 auto; width: 25%;          max-width: 25%; }
.col-xs-4  { flex: 0 0 auto; width: 33.33333333%; max-width: 33.33333333%; }
.col-xs-5  { flex: 0 0 auto; width: 41.66666667%; max-width: 41.66666667%; }
.col-xs-6  { flex: 0 0 auto; width: 50%;          max-width: 50%; }
.col-xs-7  { flex: 0 0 auto; width: 58.33333333%; max-width: 58.33333333%; }
.col-xs-8  { flex: 0 0 auto; width: 66.66666667%; max-width: 66.66666667%; }
.col-xs-9  { flex: 0 0 auto; width: 75%;          max-width: 75%; }
.col-xs-10 { flex: 0 0 auto; width: 83.33333333%; max-width: 83.33333333%; }
.col-xs-11 { flex: 0 0 auto; width: 91.66666667%; max-width: 91.66666667%; }
.col-xs-12 { flex: 0 0 auto; width: 100%;         max-width: 100%; }

/*
 * Because this compatibility file is loaded after Bootstrap 5, the col-xs-*
 * fallback above can otherwise override mixed classes such as
 * "col-xs-12 col-sm-6". Re-declare the higher breakpoint column widths here
 * so old Bootstrap 3 grids keep their expected responsive behavior.
 */
@media (min-width: 576px) {
    .col-sm-1  { flex: 0 0 auto; width: 8.33333333%;  max-width: 8.33333333%; }
    .col-sm-2  { flex: 0 0 auto; width: 16.66666667%; max-width: 16.66666667%; }
    .col-sm-3  { flex: 0 0 auto; width: 25%;          max-width: 25%; }
    .col-sm-4  { flex: 0 0 auto; width: 33.33333333%; max-width: 33.33333333%; }
    .col-sm-5  { flex: 0 0 auto; width: 41.66666667%; max-width: 41.66666667%; }
    .col-sm-6  { flex: 0 0 auto; width: 50%;          max-width: 50%; }
    .col-sm-7  { flex: 0 0 auto; width: 58.33333333%; max-width: 58.33333333%; }
    .col-sm-8  { flex: 0 0 auto; width: 66.66666667%; max-width: 66.66666667%; }
    .col-sm-9  { flex: 0 0 auto; width: 75%;          max-width: 75%; }
    .col-sm-10 { flex: 0 0 auto; width: 83.33333333%; max-width: 83.33333333%; }
    .col-sm-11 { flex: 0 0 auto; width: 91.66666667%; max-width: 91.66666667%; }
    .col-sm-12 { flex: 0 0 auto; width: 100%;         max-width: 100%; }
}

@media (min-width: 768px) {
    .col-md-1  { flex: 0 0 auto; width: 8.33333333%;  max-width: 8.33333333%; }
    .col-md-2  { flex: 0 0 auto; width: 16.66666667%; max-width: 16.66666667%; }
    .col-md-3  { flex: 0 0 auto; width: 25%;          max-width: 25%; }
    .col-md-4  { flex: 0 0 auto; width: 33.33333333%; max-width: 33.33333333%; }
    .col-md-5  { flex: 0 0 auto; width: 41.66666667%; max-width: 41.66666667%; }
    .col-md-6  { flex: 0 0 auto; width: 50%;          max-width: 50%; }
    .col-md-7  { flex: 0 0 auto; width: 58.33333333%; max-width: 58.33333333%; }
    .col-md-8  { flex: 0 0 auto; width: 66.66666667%; max-width: 66.66666667%; }
    .col-md-9  { flex: 0 0 auto; width: 75%;          max-width: 75%; }
    .col-md-10 { flex: 0 0 auto; width: 83.33333333%; max-width: 83.33333333%; }
    .col-md-11 { flex: 0 0 auto; width: 91.66666667%; max-width: 91.66666667%; }
    .col-md-12 { flex: 0 0 auto; width: 100%;         max-width: 100%; }
}

@media (min-width: 992px) {
    .col-lg-1  { flex: 0 0 auto; width: 8.33333333%;  max-width: 8.33333333%; }
    .col-lg-2  { flex: 0 0 auto; width: 16.66666667%; max-width: 16.66666667%; }
    .col-lg-3  { flex: 0 0 auto; width: 25%;          max-width: 25%; }
    .col-lg-4  { flex: 0 0 auto; width: 33.33333333%; max-width: 33.33333333%; }
    .col-lg-5  { flex: 0 0 auto; width: 41.66666667%; max-width: 41.66666667%; }
    .col-lg-6  { flex: 0 0 auto; width: 50%;          max-width: 50%; }
    .col-lg-7  { flex: 0 0 auto; width: 58.33333333%; max-width: 58.33333333%; }
    .col-lg-8  { flex: 0 0 auto; width: 66.66666667%; max-width: 66.66666667%; }
    .col-lg-9  { flex: 0 0 auto; width: 75%;          max-width: 75%; }
    .col-lg-10 { flex: 0 0 auto; width: 83.33333333%; max-width: 83.33333333%; }
    .col-lg-11 { flex: 0 0 auto; width: 91.66666667%; max-width: 91.66666667%; }
    .col-lg-12 { flex: 0 0 auto; width: 100%;         max-width: 100%; }
}

/* col-xs-offset-* */
.col-xs-offset-1  { margin-left: 8.33333333%; }
.col-xs-offset-2  { margin-left: 16.66666667%; }
.col-xs-offset-3  { margin-left: 25%; }
.col-xs-offset-4  { margin-left: 33.33333333%; }
.col-xs-offset-5  { margin-left: 41.66666667%; }
.col-xs-offset-6  { margin-left: 50%; }
.col-xs-offset-7  { margin-left: 58.33333333%; }
.col-xs-offset-8  { margin-left: 66.66666667%; }
.col-xs-offset-9  { margin-left: 75%; }
.col-xs-offset-10 { margin-left: 83.33333333%; }
.col-xs-offset-11 { margin-left: 91.66666667%; }

/* ─── BS3 col-sm/md/lg offset shims ─── */
@media (min-width: 576px) {
    .col-sm-offset-1  { margin-left: 8.33333333%; }
    .col-sm-offset-2  { margin-left: 16.66666667%; }
    .col-sm-offset-3  { margin-left: 25%; }
    .col-sm-offset-4  { margin-left: 33.33333333%; }
    .col-sm-offset-5  { margin-left: 41.66666667%; }
    .col-sm-offset-6  { margin-left: 50%; }
    .col-sm-offset-7  { margin-left: 58.33333333%; }
    .col-sm-offset-8  { margin-left: 66.66666667%; }
    .col-sm-offset-9  { margin-left: 75%; }
    .col-sm-offset-10 { margin-left: 83.33333333%; }
    .col-sm-offset-11 { margin-left: 91.66666667%; }
}
@media (min-width: 768px) {
    .col-md-offset-1  { margin-left: 8.33333333%; }
    .col-md-offset-2  { margin-left: 16.66666667%; }
    .col-md-offset-3  { margin-left: 25%; }
    .col-md-offset-4  { margin-left: 33.33333333%; }
    .col-md-offset-5  { margin-left: 41.66666667%; }
    .col-md-offset-6  { margin-left: 50%; }
    .col-md-offset-7  { margin-left: 58.33333333%; }
    .col-md-offset-8  { margin-left: 66.66666667%; }
    .col-md-offset-9  { margin-left: 75%; }
    .col-md-offset-10 { margin-left: 83.33333333%; }
    .col-md-offset-11 { margin-left: 91.66666667%; }
}
@media (min-width: 992px) {
    .col-lg-offset-1  { margin-left: 8.33333333%; }
    .col-lg-offset-2  { margin-left: 16.66666667%; }
    .col-lg-offset-3  { margin-left: 25%; }
    .col-lg-offset-4  { margin-left: 33.33333333%; }
    .col-lg-offset-5  { margin-left: 41.66666667%; }
    .col-lg-offset-6  { margin-left: 50%; }
    .col-lg-offset-7  { margin-left: 58.33333333%; }
    .col-lg-offset-8  { margin-left: 66.66666667%; }
    .col-lg-offset-9  { margin-left: 75%; }
    .col-lg-offset-10 { margin-left: 83.33333333%; }
    .col-lg-offset-11 { margin-left: 91.66666667%; }
}

/* ─── Float utilities: pull-left / pull-right removed in BS5 ─── */
.pull-left  { float: left !important; }
.pull-right { float: right !important; }

/* ─── Responsive visibility: hidden-* / visible-* removed in BS5 ─── */
@media (max-width: 575.98px) {
    .hidden-xs { display: none !important; }
    .visible-xs,
    .visible-xs-block { display: block !important; }
    .visible-xs-inline { display: inline !important; }
    .visible-xs-inline-block { display: inline-block !important; }
}
@media (min-width: 576px) and (max-width: 767.98px) {
    .hidden-sm { display: none !important; }
    .visible-sm,
    .visible-sm-block { display: block !important; }
    .visible-sm-inline { display: inline !important; }
    .visible-sm-inline-block { display: inline-block !important; }
}
@media (min-width: 768px) and (max-width: 991.98px) {
    .hidden-md { display: none !important; }
    .visible-md,
    .visible-md-block { display: block !important; }
    .visible-md-inline { display: inline !important; }
    .visible-md-inline-block { display: inline-block !important; }
}
@media (min-width: 992px) {
    .hidden-lg { display: none !important; }
    .visible-lg,
    .visible-lg-block { display: block !important; }
    .visible-lg-inline { display: inline !important; }
    .visible-lg-inline-block { display: inline-block !important; }
}

/* clearfix visible-*-block helpers */
.clearfix.visible-sm-block { display: block !important; }

/* ─── Navbar: BS3 classes removed in BS5 ─── */
.navbar-inverse {
    background-color: #222;
    border-color: #080808;
}
.navbar-inverse .navbar-brand,
.navbar-inverse .navbar-nav > li > a {
    color: #9d9d9d;
}
.navbar-inverse .navbar-brand:hover,
.navbar-inverse .navbar-nav > li > a:hover {
    color: #fff;
}
.navbar-fixed-top {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1030;
}
.navbar-static-top {
    position: static;
    z-index: 1000;
}
.navbar-header { display: flex; align-items: center; }
.navbar-toggle {
    padding: 9px 10px;
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
}
.navbar-toggle .icon-bar {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 1px;
    background-color: #888;
    margin: 4px 0;
}
.navbar-collapse { flex-grow: 1; }

/* ─── Button: btn-default removed in BS5 ─── */
.btn-default {
    color: #333;
    background-color: #fff;
    border-color: #ccc;
}
.btn-default:hover,
.btn-default:focus {
    color: #333;
    background-color: #e6e6e6;
    border-color: #adadad;
}
.btn-xs {
    padding: 1px 5px;
    font-size: 0.75rem;
    border-radius: 3px;
}

/* ─── Labels: label-* removed in BS5 (use badge-*) ─── */
.label {
    display: inline-block;
    padding: 0.25em 0.4em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
    color: #fff;
}
.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; color: #000; }
.label-danger   { background-color: #d9534f; }

/* ─── Panel → Card shim (AdminLTE uses panels) ─── */
.panel {
    margin-bottom: 1rem;
    background-color: #fff;
    border: 1px solid transparent;
    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 transparent; border-radius: 3px 3px 0 0; }
.panel-footer  { padding: 10px 15px; background-color: #f5f5f5; border-top: 1px solid #ddd; border-radius: 0 0 3px 3px; }
.panel-default { border-color: #ddd; }
.panel-default > .panel-heading { color: #333; background-color: #f5f5f5; border-color: #ddd; }
.panel-primary { border-color: #337ab7; }
.panel-primary > .panel-heading { color: #fff; background-color: #337ab7; border-color: #337ab7; }
.panel-success { border-color: #d6e9c6; }
.panel-success > .panel-heading { color: #3c763d; background-color: #dff0d8; border-color: #d6e9c6; }
.panel-info    { border-color: #bce8f1; }
.panel-info > .panel-heading    { color: #31708f; background-color: #d9edf7; border-color: #bce8f1; }
.panel-warning { border-color: #faebcc; }
.panel-warning > .panel-heading { color: #8a6d3b; background-color: #fcf8e3; border-color: #faebcc; }
.panel-danger  { border-color: #ebccd1; }
.panel-danger > .panel-heading  { color: #a94442; background-color: #f2dede; border-color: #ebccd1; }

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

/* ─── input-group-addon → input-group-text ─── */
.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 > .input-group-addon:not(:last-child) {
    border-right: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.input-group > .input-group-addon:not(:first-child) {
    border-left: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* ─── input-group-btn ─── */
.input-group-btn {
    display: flex;
    align-items: stretch;
}
.input-group-btn > .btn {
    border-radius: 0;
}
.input-group-btn:first-child > .btn,
.input-group-btn:first-child > .btn-group {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.input-group-btn:last-child > .btn,
.input-group-btn:last-child > .btn-group {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* ─── Glyphicons → Font Awesome shim ─── */
/* Font Awesome 5 is already loaded; these map glyphicon classes to FA icons via pseudo-elements */
.glyphicon {
    display: inline-block;
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    line-height: 1;
    speak: none;
}
.glyphicon-ok::before,
.glyphicon-ok-circle::before         { content: "\f058"; } /* fa-check-circle */
.glyphicon-remove::before,
.glyphicon-remove-circle::before     { content: "\f057"; } /* fa-times-circle */
.glyphicon-search::before            { content: "\f002"; } /* fa-search */
.glyphicon-floppy-disk::before       { content: "\f0c7"; } /* fa-save */
.glyphicon-circle-arrow-left::before { content: "\f359"; } /* fa-arrow-alt-circle-left */
.glyphicon-circle-arrow-right::before{ content: "\f35a"; } /* fa-arrow-alt-circle-right */
.glyphicon-edit::before              { content: "\f044"; } /* fa-edit */
.glyphicon-log-out::before           { content: "\f2f5"; } /* fa-sign-out-alt */
.glyphicon-calendar::before          { content: "\f073"; } /* fa-calendar-alt */
.glyphicon-chevron-left::before      { content: "\f053"; } /* fa-chevron-left */
.glyphicon-chevron-right::before     { content: "\f054"; } /* fa-chevron-right */
.glyphicon-eye-open::before          { content: "\f06e"; } /* fa-eye */
.glyphicon-eye-close::before         { content: "\f070"; } /* fa-eye-slash */
.glyphicon-plus::before              { content: "\f067"; } /* fa-plus */
.glyphicon-minus::before             { content: "\f068"; } /* fa-minus */
.glyphicon-trash::before             { content: "\f1f8"; } /* fa-trash */
.glyphicon-download-alt::before      { content: "\f019"; } /* fa-download */
.glyphicon-upload::before            { content: "\f093"; } /* fa-upload */
.glyphicon-refresh::before           { content: "\f021"; } /* fa-sync */
.glyphicon-warning-sign::before      { content: "\f071"; } /* fa-exclamation-triangle */
.glyphicon-info-sign::before         { content: "\f05a"; } /* fa-info-circle */
.glyphicon-question-sign::before     { content: "\f059"; } /* fa-question-circle */
.glyphicon-user::before              { content: "\f007"; } /* fa-user */
.glyphicon-home::before              { content: "\f015"; } /* fa-home */
.glyphicon-cog::before               { content: "\f013"; } /* fa-cog */
.glyphicon-print::before             { content: "\f02f"; } /* fa-print */
.glyphicon-envelope::before          { content: "\f0e0"; } /* fa-envelope */
.glyphicon-lock::before              { content: "\f023"; } /* fa-lock */
.glyphicon-star::before              { content: "\f005"; } /* fa-star */
.glyphicon-heart::before             { content: "\f004"; } /* fa-heart */
.glyphicon-th-list::before           { content: "\f00b"; } /* fa-th-list */
.glyphicon-list::before              { content: "\f03a"; } /* fa-list */
.glyphicon-arrow-left::before        { content: "\f060"; } /* fa-arrow-left */
.glyphicon-arrow-right::before       { content: "\f061"; } /* fa-arrow-right */
.glyphicon-arrow-up::before          { content: "\f062"; } /* fa-arrow-up */
.glyphicon-arrow-down::before        { content: "\f063"; } /* fa-arrow-down */
.glyphicon-share::before             { content: "\f064"; } /* fa-share */
.glyphicon-link::before              { content: "\f0c1"; } /* fa-link */
.glyphicon-file::before              { content: "\f15b"; } /* fa-file */
.glyphicon-folder-open::before       { content: "\f07c"; } /* fa-folder-open */
.glyphicon-folder-close::before      { content: "\f07b"; } /* fa-folder */
.glyphicon-picture::before           { content: "\f03e"; } /* fa-image */
.glyphicon-camera::before            { content: "\f030"; } /* fa-camera */
.glyphicon-video-file::before        { content: "\f1c8"; } /* fa-file-video */
.glyphicon-music::before             { content: "\f001"; } /* fa-music */
.glyphicon-headphones::before        { content: "\f025"; } /* fa-headphones */
.glyphicon-phone::before             { content: "\f095"; } /* fa-phone */
.glyphicon-map-marker::before        { content: "\f3c5"; } /* fa-map-marker-alt */
.glyphicon-time::before              { content: "\f017"; } /* fa-clock */
.glyphicon-tag::before               { content: "\f02b"; } /* fa-tag */
.glyphicon-tags::before              { content: "\f02c"; } /* fa-tags */
.glyphicon-certificate::before       { content: "\f0a3"; } /* fa-certificate */
.glyphicon-thumbs-up::before         { content: "\f164"; } /* fa-thumbs-up */
.glyphicon-thumbs-down::before       { content: "\f165"; } /* fa-thumbs-down */
.glyphicon-comment::before           { content: "\f075"; } /* fa-comment */
.glyphicon-share-alt::before         { content: "\f1e0"; } /* fa-share-alt */
.glyphicon-sort::before              { content: "\f0dc"; } /* fa-sort */
.glyphicon-sort-by-alphabet::before  { content: "\f15d"; } /* fa-sort-alpha-down */
.glyphicon-filter::before            { content: "\f0b0"; } /* fa-filter */
.glyphicon-zoom-in::before           { content: "\f00e"; } /* fa-search-plus */
.glyphicon-zoom-out::before          { content: "\f010"; } /* fa-search-minus */
.glyphicon-fullscreen::before        { content: "\f065"; } /* fa-expand */
.glyphicon-resize-small::before      { content: "\f066"; } /* fa-compress */
.glyphicon-move::before              { content: "\f0b2"; } /* fa-arrows-alt */
.glyphicon-hand-right::before        { content: "\f0a4"; } /* fa-hand-point-right */
.glyphicon-hand-left::before         { content: "\f0a5"; } /* fa-hand-point-left */
.glyphicon-hand-up::before           { content: "\f0a6"; } /* fa-hand-point-up */
.glyphicon-hand-down::before         { content: "\f0a7"; } /* fa-hand-point-down */
.glyphicon-globe::before             { content: "\f0ac"; } /* fa-globe */
.glyphicon-wrench::before            { content: "\f0ad"; } /* fa-wrench */
.glyphicon-tasks::before             { content: "\f0ae"; } /* fa-tasks */
.glyphicon-dashboard::before         { content: "\f3fd"; } /* fa-tachometer-alt */
.glyphicon-stats::before             { content: "\f080"; } /* fa-chart-bar */
.glyphicon-signal::before            { content: "\f012"; } /* fa-signal */
.glyphicon-barcode::before           { content: "\f02a"; } /* fa-barcode */
.glyphicon-qrcode::before            { content: "\f029"; } /* fa-qrcode */
.glyphicon-credit-card::before       { content: "\f09d"; } /* fa-credit-card */
.glyphicon-shopping-cart::before     { content: "\f07a"; } /* fa-shopping-cart */
.glyphicon-gift::before              { content: "\f06b"; } /* fa-gift */
.glyphicon-bell::before              { content: "\f0f3"; } /* fa-bell */
.glyphicon-flag::before              { content: "\f024"; } /* fa-flag */
.glyphicon-road::before              { content: "\f018"; } /* fa-road */
.glyphicon-plane::before             { content: "\f072"; } /* fa-plane */
.glyphicon-tower::before             { content: "\f1cd"; } /* fa-broadcast-tower */
.glyphicon-cloud::before             { content: "\f0c2"; } /* fa-cloud */
.glyphicon-cloud-download::before    { content: "\f381"; } /* fa-cloud-download-alt */
.glyphicon-cloud-upload::before      { content: "\f382"; } /* fa-cloud-upload-alt */
.glyphicon-exclamation-sign::before  { content: "\f06a"; } /* fa-exclamation-circle */
.glyphicon-ban-circle::before        { content: "\f05e"; } /* fa-ban */
.glyphicon-minus-sign::before        { content: "\f056"; } /* fa-minus-circle */
.glyphicon-plus-sign::before         { content: "\f055"; } /* fa-plus-circle */
.glyphicon-record::before            { content: "\f111"; } /* fa-circle */
.glyphicon-unchecked::before         { content: "\f0c8"; } /* fa-square */
.glyphicon-check::before             { content: "\f14a"; } /* fa-check-square */
.glyphicon-new-window::before        { content: "\f35d"; } /* fa-external-link-alt */
.glyphicon-open::before              { content: "\f115"; } /* fa-folder-open */
.glyphicon-save::before              { content: "\f0c7"; } /* fa-save */
.glyphicon-saved::before             { content: "\f0c7"; } /* fa-save */
.glyphicon-import::before            { content: "\f56f"; } /* fa-file-import */
.glyphicon-export::before            { content: "\f56e"; } /* fa-file-export */
.glyphicon-send::before              { content: "\f1d8"; } /* fa-paper-plane */
.glyphicon-inbox::before             { content: "\f01c"; } /* fa-inbox */
.glyphicon-list-alt::before          { content: "\f022"; } /* fa-list-alt */
.glyphicon-th::before                { content: "\f00a"; } /* fa-th */
.glyphicon-th-large::before          { content: "\f009"; } /* fa-th-large */
.glyphicon-align-left::before        { content: "\f036"; } /* fa-align-left */
.glyphicon-align-center::before      { content: "\f037"; } /* fa-align-center */
.glyphicon-align-right::before       { content: "\f038"; } /* fa-align-right */
.glyphicon-align-justify::before     { content: "\f039"; } /* fa-align-justify */
.glyphicon-indent-left::before       { content: "\f03c"; } /* fa-indent */
.glyphicon-indent-right::before      { content: "\f03b"; } /* fa-outdent */
.glyphicon-font::before              { content: "\f031"; } /* fa-font */
.glyphicon-bold::before              { content: "\f032"; } /* fa-bold */
.glyphicon-italic::before            { content: "\f033"; } /* fa-italic */
.glyphicon-text-height::before       { content: "\f034"; } /* fa-text-height */
.glyphicon-text-width::before        { content: "\f035"; } /* fa-text-width */
.glyphicon-scissors::before          { content: "\f0c4"; } /* fa-cut */
.glyphicon-copy::before              { content: "\f0c5"; } /* fa-copy */
.glyphicon-paste::before             { content: "\f0ea"; } /* fa-paste */
.glyphicon-erase::before             { content: "\f12d"; } /* fa-eraser */
.glyphicon-repeat::before            { content: "\f01e"; } /* fa-redo */
.glyphicon-step-backward::before     { content: "\f048"; } /* fa-step-backward */
.glyphicon-fast-backward::before     { content: "\f049"; } /* fa-fast-backward */
.glyphicon-backward::before          { content: "\f04a"; } /* fa-backward */
.glyphicon-play::before              { content: "\f04b"; } /* fa-play */
.glyphicon-pause::before             { content: "\f04c"; } /* fa-pause */
.glyphicon-stop::before              { content: "\f04d"; } /* fa-stop */
.glyphicon-forward::before           { content: "\f04e"; } /* fa-forward */
.glyphicon-fast-forward::before      { content: "\f050"; } /* fa-fast-forward */
.glyphicon-step-forward::before      { content: "\f051"; } /* fa-step-forward */
.glyphicon-eject::before             { content: "\f052"; } /* fa-eject */
.glyphicon-volume-off::before        { content: "\f026"; } /* fa-volume-off */
.glyphicon-volume-down::before       { content: "\f027"; } /* fa-volume-down */
.glyphicon-volume-up::before         { content: "\f028"; } /* fa-volume-up */

/* ─── Carousel: BS3 data-slide → BS5 data-bs-slide (CSS only shim) ─── */
/* The JS data attributes are handled in the layout files */

/* ─── Modal close button: BS3/4 .close → BS5 .btn-close ─── */
button.close {
    padding: 0;
    background-color: transparent;
    border: 0;
    float: right;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: #000;
    text-shadow: 0 1px 0 #fff;
    opacity: .5;
    cursor: pointer;
}
button.close:hover { opacity: .75; }

/* ─── sr-only → visually-hidden (BS5 renamed it) ─── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ─── Misc BS3 utilities ─── */
.text-bold  { font-weight: 700; }
.no-padding { padding: 0 !important; }
.no-margin  { margin: 0 !important; }
.no-pad-no-mar-sm { padding: 0; margin: 0; }
.no-pad-sm  { padding: 0; }

/* ─── img-circle → rounded-circle (BS5 renamed it) ─── */
.img-circle { border-radius: 50%; }

/* ─── img-responsive → img-fluid (BS5 renamed it) ─── */
.img-responsive { max-width: 100%; height: auto; }

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

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

/* ─── Divider in dropdowns ─── */
.dropdown-menu > li.divider {
    height: 1px;
    margin: 9px 0;
    overflow: hidden;
    background-color: #e5e5e5;
}

/* ─── BS3 nav-tabs active state ─── */
.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
    color: #555;
    background-color: #fff;
    border: 1px solid #ddd;
    border-bottom-color: transparent;
    cursor: default;
}
.nav-tabs > li > a {
    margin-right: 2px;
    line-height: 1.42857143;
    border: 1px solid transparent;
    border-radius: 4px 4px 0 0;
}

/* ─── Ensure Bootstrap 5 navbar toggler works with BS3 markup ─── */
.navbar-toggler { border: 1px solid rgba(0,0,0,.1); }

/* ─── Alert: alert-dismissable (BS3 typo) → alert-dismissible (BS5) ─── */
/* Both class names should work identically */
.alert-dismissable {
    padding-right: 44px;
    position: relative;
}
.alert-dismissable .close,
.alert-dismissable button.close {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    color: inherit;
    opacity: .5;
    cursor: pointer;
    padding: 0 4px;
    float: none;
    text-shadow: none;
}
.alert-dismissable .close:hover,
.alert-dismissable button.close:hover { opacity: .85; }

/* ─── Modal: ensure data-dismiss="modal" still works via JS shim ─── */
/* The JS compat shim handles the attribute migration; this just ensures
   the close button renders correctly in both old and new markup */
.modal-header .close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 20px;
    font-weight: 700;
    color: #6c757d;
    opacity: .6;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    text-shadow: none;
    float: none;
}
.modal-header .close:hover { opacity: 1; color: #000; }

/* ─── fade in → show (BS3 used 'fade in', BS5 uses 'fade show') ─── */
.alert.fade.in { opacity: 1; }
.alert.in      { display: flex; }
