/*
 * Bootstrap 4 -> 5 compatibility styles.
 * Restores Bootstrap 4 classes/defaults that are still used in the existing views
 * but were removed in Bootstrap 5, so the UI looks the same after the upgrade.
 * Load AFTER bootstrap 5 css and BEFORE now-ui-dashboard.css.
 */

/* Reboot defaults that changed in v5 */
a { text-decoration: none; }
a:hover { text-decoration: underline; }
label { display: inline-block; margin-bottom: .5rem; }
select.form-control { -webkit-appearance: menulist; -moz-appearance: menulist; appearance: auto; }

/* Tables: in v5 cell borders inherit the table's border colour, so DataTables'
   dark table bottom border (rgba(0,0,0,.3)) made every row line dark.
   Restore the Bootstrap 4 light grey row borders. */
.table > tbody > tr > td, .table > tbody > tr > th,
.table > tfoot > tr > td, .table > tfoot > tr > th { border-color: #dee2e6; }

/* Navbar: v5 gives .navbar-brand its own colour; v4 inherited the navbar's
   colour (white in the Now UI theme), e.g. the "┃" separators in the top bar. */
.navbar-brand, .navbar-brand:hover, .navbar-brand:focus { color: inherit; }

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-row { display: flex; flex-wrap: wrap; margin-right: -5px; margin-left: -5px; }
.form-row > .col, .form-row > [class*="col-"] { padding-right: 5px; padding-left: 5px; }
.input-group-append, .input-group-prepend { display: flex; }
.btn-block { display: block; width: 100%; }
.btn-block + .btn-block { margin-top: .5rem; }

/* Spacing utilities (ml/mr/pl/pr -> ms/me/ps/pe) */
.ml-0{margin-left:0!important}.ml-1{margin-left:.25rem!important}.ml-2{margin-left:.5rem!important}.ml-3{margin-left:1rem!important}.ml-4{margin-left:1.5rem!important}.ml-5{margin-left:3rem!important}.ml-auto{margin-left:auto!important}
.mr-0{margin-right:0!important}.mr-1{margin-right:.25rem!important}.mr-2{margin-right:.5rem!important}.mr-3{margin-right:1rem!important}.mr-4{margin-right:1.5rem!important}.mr-5{margin-right:3rem!important}.mr-auto{margin-right:auto!important}
.pl-0{padding-left:0!important}.pl-1{padding-left:.25rem!important}.pl-2{padding-left:.5rem!important}.pl-3{padding-left:1rem!important}.pl-4{padding-left:1.5rem!important}.pl-5{padding-left:3rem!important}
.pr-0{padding-right:0!important}.pr-1{padding-right:.25rem!important}.pr-2{padding-right:.5rem!important}.pr-3{padding-right:1rem!important}.pr-4{padding-right:1.5rem!important}.pr-5{padding-right:3rem!important}
@media (min-width:768px){.ml-md-0{margin-left:0!important}.ml-md-1{margin-left:.25rem!important}.ml-md-2{margin-left:.5rem!important}.ml-md-3{margin-left:1rem!important}.ml-md-auto{margin-left:auto!important}.mr-md-3{margin-right:1rem!important}.mr-md-auto{margin-right:auto!important}}

/* Text / typography */
.text-left{text-align:left!important}.text-right{text-align:right!important}
.font-weight-light{font-weight:300!important}.font-weight-normal{font-weight:400!important}.font-weight-bold{font-weight:700!important}.font-weight-bolder{font-weight:bolder!important}
.float-left{float:left!important}.float-right{float:right!important}
.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}
.no-gutters{margin-right:0;margin-left:0}.no-gutters>.col,.no-gutters>[class*="col-"]{padding-right:0;padding-left:0}

/* Badges */
.badge-pill{padding-right:.6em;padding-left:.6em;border-radius:10rem}
.badge-primary{color:#fff;background-color:#007bff}
.badge-secondary{color:#fff;background-color:#6c757d}
.badge-success{color:#fff;background-color:#28a745}
.badge-info{color:#fff;background-color:#17a2b8}
.badge-warning{color:#212529;background-color:#ffc107}
.badge-danger{color:#fff;background-color:#dc3545}
.badge-light{color:#212529;background-color:#f8f9fa}
.badge-dark{color:#fff;background-color:#343a40}

/* Close button (v5 uses .btn-close) */
.close{float:right;font-size:1.5rem;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.5;background-color:transparent;border:0;padding:0}
.close:hover{color:#000;text-decoration:none;opacity:.75}
.close:not(:disabled):not(.disabled){cursor:pointer}
.modal-header .close{padding:1rem;margin:-1rem -1rem -1rem auto}
.alert-dismissible .close{position:absolute;top:0;right:0;padding:.75rem 1.25rem;color:inherit}

/* Select2 inside modals: Bootstrap 5 raised the modal z-index to 1055, so
   Select2's dropdown (1051) opened behind the modal. Keep it on top. */
.select2-container--open{z-index:1060}
.select2-container--open .select2-dropdown{z-index:1060}
