/* BS5 -> BS4 visual parity: remap CSS custom properties to match Bootstrap 4 defaults */
:root {
    --bs-primary: #337ab7;
    --bs-primary-rgb: 51, 122, 183;
    --bs-link-color: #337ab7;
    --bs-link-color-rgb: 51, 122, 183;
    --bs-link-hover-color: #23527c;
    --bs-link-hover-color-rgb: 35, 82, 124;
    --bs-link-decoration: none;
    --bs-body-font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* Restore BS4's hardcoded 15px column gutter. BS5 uses a CSS variable that only
   resolves inside .row; avenger.css's * { padding:0 } wipes it elsewhere. */
[class*="col-"] {
 padding-right:15px;
 padding-left:15px;
}

/* BS4 had no link underline by default */
a {
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* BS5 added ol/ul { padding-left: 2rem } which BS4 never had; zero it out to match BS4 behavior */
ol, ul {
 padding-left: 0;
}

.form-group {
 margin-bottom:5px!important
}
/* replaces deprecated .form-group */
.mb-3 {
 margin-bottom:5px!important
}
select {
 border:1px solid #CCC;
 padding:4px 6px;
 -webkit-border-radius:4px;
 -moz-border-radius:4px;
 border-radius:4px
}
/* Restore legacy link appearance: no underline by default in BS5 pages */
a,
a:hover,
a:focus {
 text-decoration:none;
}
div.dataTables_length label {
 font-size:14px
}
div label[class*="col-"] {
 padding-right:0;
 font-weight:normal;
 font-size:11px;
 padding-bottom:2px
}
div label[class*="labelrequired"] {
 font-weight:bold
}
.astrequired {
 color:#ed1c24;
 font-weight:bold;
 margin-right:0
}
div div[class*="col-"] {
 font-weight:normal;
 font-size:12px
}
.nav-pills>li>a {
 padding-right:12px;
 padding-left:12px;
 margin-right:2px;
 line-height:14px
}
.help-block {
 display:inline;
 margin-bottom:0;
 vertical-align:middle;
 margin-top:0;
 white-space:nowrap
}
.pill_nav_borders {
 width:500px!important
}
.checkbox-inline {
 vertical-align:top
}
.toggle.btn {
 padding:4px 12px;
 line-height:20px
}
.toggle-handle.btn {
 padding:4px 12px;
 line-height:20px;
 background-color:#f5f5f5;
 padding-left:2px!important;
 padding-right:2px!important
}
.toggle-on.btn {
 padding:4px 12px;
 line-height:20px;
 padding-left:2px!important
}
.toggle-off.btn {
 padding:4px 12px;
 line-height:20px;
 padding-left:4px!important
}
.tooltip-inner {
 max-width:600px;
 width:600px;
 text-align:left;
 white-space: pre-line;
}
.tooltip .tooltip-inner {
  margin-left:30% 
}
.tooltip {
	font-size:11px;
}
.input-group-addon,.input-group-btn {
 width:auto;
 white-space:nowrap;
 vertical-align:middle
}
.table-hover>tbody>tr:hover>td,.table-hover>tbody>tr:hover>th {
 background-color:#c3d9ff
}
.colorInherit {
 color:inherit
}

/* Align checkbox inputs with their label text. Centered for 12px text. */
.form-check-inline .form-check-input {
 vertical-align:middle;
 margin-top:0;
}

/* Create custom btn-xs — BS5 dropped it */
.btn-xs {
 padding:3px 8px;
 font-size:12px;
 line-height:1.5;
 border-radius:3px;
 vertical-align:middle;
}

/* Match IDM button sizing expectations while preserving BS5 button variables. */
.btn {
 --bs-btn-font-size:12px;
 --bs-btn-border-radius:4px;
}

.btn-close {
 border-radius:4px;
}

/* Restore Bootstrap 4's btn-default — BS5 dropped it entirely */
.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-active-color:#333;
 --bs-btn-active-bg:#e6e6e6;
 --bs-btn-active-border-color:#adadad;
}

/* Longhand padding so .form-select can override individual sides without a shorthand reset. */
.form-control {
 padding-top:3px;
 padding-right:6px;
 padding-bottom:3px;
 padding-left:6px;
 font-size:12px;
 height:25px;
}

/* Restore BS5 behavior for form-control textareas so rows attribute controls height */
textarea.form-control {
 height:auto;
}

/* BS5 select styling — padding-right intentionally omitted to preserve the 2.25rem arrow space. */
.form-select {
 padding-top:3px;
 padding-bottom:3px;
 padding-left:12px;
 font-size:12px;
 height:25px;
 color: #495057;
}
.form-horizontal .control-label {
 margin-bottom:0;
 padding-top:7px;
 text-align:left
}
div div[class*="labelrequired"] {
 font-weight:bold;
}

/* Keep pagination labels and page numbers at legacy 12px after BS5 migration */
.pagination {
 --bs-pagination-font-size:12px;
}

/* Restore missing top border on DataTables */
table.dataTable thead tr:first-child > th,
table.dataTable thead tr:first-child > td {
 border-top:1px solid #dee2e6;
}

/* BS5 .table sets vertical-align:top which cascades to all td cells;
   override so cell content (including buttons) sits centered vertically. */
table.dataTable td {
 vertical-align:middle;
}

div.dataTables_wrapper div.dataTables_length,
div.dataTables_wrapper div.dataTables_length label,
div.dataTables_wrapper div.dataTables_info,
div.dataTables_wrapper div.dataTables_paginate,
div.dataTables_wrapper div.dataTables_paginate .pagination,
div.dataTables_wrapper div.dataTables_paginate .page-link {
 font-size:12px;
}

/* Keep DataTables length control like legacy (no select arrow styling) */
div.dataTables_wrapper div.dataTables_length select,
div.dataTables_wrapper div.dataTables_length select.form-select {
 background-image:none;
 -webkit-appearance:none;
 -moz-appearance:none;
 appearance:none;
 padding-right:6px;
}


/* Full-screen (≥768px): vertically align DataTables Navigation (Show-entries, Search, and pagination controls) */
div.dataTables_wrapper div.dataTables_paginate ul.pagination {
 margin:0;
}
div.dataTables_wrapper div.dataTables_paginate .page-link {
 padding:3px 6px;
}
div.dataTables_wrapper div.dataTables_length,
div.dataTables_wrapper div.dataTables_filter {
 padding-top:10px;
 padding-bottom:8px;
}


/* Small screens (≤767px): keep DataTables Navigation (Show-entries, Search, and pagination controls) side-by-side and vertically aligned */
@media screen and (max-width: 767px) {
 div.dataTables_wrapper div.dataTables_length {
  float:left;
  padding-top:10px;
  padding-bottom:8px;
 }
 div.dataTables_wrapper div.dataTables_paginate {
  float:right;
  padding-top:2px;
  padding-bottom:0px;
 }
 div.dataTables_wrapper div.dataTables_filter {
  overflow:hidden;
  text-align:center;
  padding-top:10px;
  padding-bottom:8px;
 }
 div.dataTables_wrapper div.dataTables_length label,
 div.dataTables_wrapper div.dataTables_filter label {
  float:none;
  display:inline-block;
 }
 div.dataTables_wrapper div.dataTables_paginate ul.pagination {
  justify-content:center;
 }
 div.dataTables_wrapper div.dataTables_info {
  float:left;
  padding-top:8px;
 }
}

/* Keep DataTables behavior, disable legacy PNG sort backgrounds to avoid duplicate sort icons/shadow images. */
table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc,
table.dataTable thead .sorting_asc_disabled,
table.dataTable thead .sorting_desc_disabled {
 background: none !important;
}

/* Keep legacy spacing between inline radio buttons and label text after BS5 migration */
input[type="radio"] {
 margin-right:.5rem;
}

label.form-check-inline input[type="radio"],
label.radio.inline input[type="radio"] {
 margin-right:0;
}

/* Keep General Properties field spacing compact after BS5 migration */
#settingsDiv_generalProperties .mb-3,
#settingsDiv_generalPropertiesCon .mb-3,
#settingsDiv_generalPropertiesCreds .mb-3,
#settingsDiv_generalPropertiesProductCreds .mb-3 {
 margin-bottom:.25rem !important;
}

/* Shared action button styles for admin tables */
.btn-lnrs-edit {
 background-color:#002F6C;
 border-color:#002F6C;
 color:#fff;
 font-weight:500;
 transition:background-color .15s ease, box-shadow .15s ease;
}
.btn-lnrs-edit:hover,
.btn-lnrs-edit:focus {
 background-color:#001f4a;
 border-color:#001f4a;
 color:#fff;
 box-shadow:0 2px 5px rgba(0,0,0,.2);
}
.btn-lnrs-delete {
 background-color:#C3171D;
 border-color:#C3171D;
 color:#fff;
 font-weight:500;
 transition:background-color .15s ease, box-shadow .15s ease;
}
.btn-lnrs-delete:hover,
.btn-lnrs-delete:focus {
 background-color:#7F0F13;
 border-color:#7F0F13;
 color:#fff;
 box-shadow:0 2px 5px rgba(0,0,0,.2);
}
.btn-lnrs-view {
 background-color:#2B2B2B;
 border-color:#2B2B2B;
 color:#fff;
 font-weight:500;
 transition:background-color .15s ease, box-shadow .15s ease;
}
.btn-lnrs-view:hover,
.btn-lnrs-view:focus {
 background-color:#111;
 border-color:#111;
 color:#fff;
 box-shadow:0 2px 5px rgba(0,0,0,.2);
}
.btn-lnrs-message {
 background-color:#00778B;
 border-color:#00778B;
 color:#fff;
 font-weight:500;
 transition:background-color .15s ease, box-shadow .15s ease;
}
.btn-lnrs-message:hover,
.btn-lnrs-message:focus {
 background-color:#005566;
 border-color:#005566;
 color:#fff;
 box-shadow:0 2px 5px rgba(0,0,0,.2);
}
.btn-tbl,
.btn-table-action {
 display:inline-block;
 padding:.2rem .4rem;
 font-size:.72rem;
 font-weight:500;
 line-height:1.4;
 white-space:nowrap;
 border-radius:3px;
 border:1px solid transparent;
 text-decoration:none;
 text-align:center;
 min-width:0;
}
.btn-action-group {
 display:inline-flex;
 gap:3px;
 align-items:center;
 white-space:nowrap;
}
th.action-col,
td.action-col {
 white-space:nowrap;
 width:1%;
}

/* Page-specific DataTables filter spacing for Announcement screen */
#announcementTable_wrapper div.dataTables_filter {
 padding-top:0;
 padding-bottom:0;
}

/* Bootstrap 5 migration fix: Bootstrap 5's ".alert-danger" rule only defines
   CSS custom properties (--bs-alert-color/--bs-alert-bg); those variables are
   only consumed by the base ".alert" class. Bootstrap 4's ".alert-danger"
   applied "color"/"background-color" directly, so pages that use
   "alert-danger" alone (e.g. the Bulk Users validation error <td> on
   User Management -> Add Bulk Users) rendered red highlighting before the
   migration but lost it after upgrading to Bootstrap 5. Restore the red
   highlight for any element using "alert-danger" without the "alert" class. */
.alert-danger:not(.alert) {
  color: var(--bs-alert-color, var(--bs-danger-text-emphasis));
  background-color: var(--bs-alert-bg, var(--bs-danger-bg-subtle));
}
