/* Better tab styling */
.nav-tabs {
  border-bottom: 2px solid #d50032;
}

/* Consistent date column width across all tables */
.date-column {
  max-width: 164px !important;
  white-space: nowrap;
}

/* SearchPanes styling for better Bootstrap 3 integration */
#searchPanesContainer {
  margin-top: 40px;
}

div.dtsp-searchPanes {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}

div.dtsp-searchPane {
  margin-bottom: 15px;
  width: 100% !important;
  order: 1;
}

/* Hide ALL control buttons, search, and sorting icons */
div.dtsp-topRow {
  display: none !important;
}

div.dtsp-topRow input.dtsp-search,
div.dtsp-topRow button,
button.dtsp-collapseAll,
button.dtsp-showAll,
div.dtsp-searchPane button.dtsp-nameButton,
div.dtsp-searchPane button.dtsp-countButton,
div.dtsp-searchPane button.dtsp-searchIcon {
  display: none !important;
}

/* Only show the clear button */
button.dtsp-clearAll {
  display: block !important;
  width: 100%;
  margin-top: 10px;
  padding: 8px;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  order: 3;
}

button.dtsp-clearAll:hover {
  background-color: #f5f5f5;
}

div.dtsp-searchPane div.dtsp-title {
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 12px;
  color: #333;
  padding: 8px 0;
  border-bottom: 2px solid #d50032;
}

div.dtsp-searchPane div.dataTables_scrollBody {
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-top: 10px;
  max-height: 600px !important;
  overflow-y: auto;
}

div.dtsp-searchPane table.dataTable tbody tr.selected {
  background-color: #d50032 !important;
  color: white;
}

div.dtsp-searchPane table.dataTable tbody tr:hover {
  background-color: #f5f5f5;
  cursor: pointer;
}

/* Move Filters Active info into SearchPanes container */
div.dtsp-titleRow {
  order: 2 !important;
  margin-top: 15px !important;
  margin-bottom: 0 !important;
  padding: 8px 12px;
  background-color: #f5f5f5;
  border-radius: 4px;
  font-size: 13px;
  color: #666;
  width: 100%;
}

/* Fix pagination overlap by putting buttons above text */
.dt-layout-row {
  clear: both;
  margin-bottom: 10px;
}

.dt-layout-row:has(.dt-info) {
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  align-items: flex-end;
}

.dt-info {
  white-space: normal;
  word-wrap: break-word;
  max-width: 100%;
  order: 2;
  text-align: right;
}

.dt-paging {
  white-space: nowrap;
  order: 1;
}

/* Style pagination buttons to match Bootstrap 3 */
.dt-paging nav,
.dt-paging ul.pagination {
  margin: 0;
  padding: 0;
}

.dt-paging li.page-item {
  display: inline-block;
  list-style: none;
}

.dt-paging li.page-item a.page-link {
  position: relative;
  float: left;
  padding: 6px 12px;
  margin-left: -1px;
  line-height: 1.42857143;
  color: #337ab7;
  text-decoration: none;
  background-color: #fff;
  border: 1px solid #ddd;
}

.dt-paging li.page-item:first-child a.page-link {
  margin-left: 0;
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
}

.dt-paging li.page-item:last-child a.page-link {
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
}

.dt-paging li.page-item a.page-link:hover,
.dt-paging li.page-item a.page-link:focus {
  z-index: 2;
  color: #23527c;
  background-color: #eee;
  border-color: #ddd;
}

.dt-paging li.page-item.active a.page-link,
.dt-paging li.page-item.active a.page-link:hover,
.dt-paging li.page-item.active a.page-link:focus {
  z-index: 3;
  color: #fff;
  cursor: default;
  background-color: #d50032;
  border-color: #d50032;
}

.dt-paging li.page-item.disabled a.page-link,
.dt-paging li.page-item.disabled a.page-link:hover,
.dt-paging li.page-item.disabled a.page-link:focus {
  color: #777;
  cursor: not-allowed;
  background-color: #fff;
  border-color: #ddd;
}

@media (max-width: 991px) {
  .dt-paging {
    align-self: center;
  }
}

/* Mobile responsive */
@media (max-width: 768px) {
  #searchPanesContainer {
    position: static;
    margin-bottom: 20px;
  }
  
  div.dtsp-searchPane div.dataTables_scrollBody {
    max-height: 200px !important;
  }
}
}

/* Make SearchPanes container responsive */
@media (max-width: 768px) {
  div.dtsp-searchPanes {
    display: block !important;
  }
  
  div.dtsp-searchPane {
    width: 100% !important;
    margin-right: 0 !important;
  }
}

/* Ensure table wrapper has proper spacing */
.dataTables_wrapper {
  margin-top: 20px;
}

/* Better spacing for table controls */
.dataTables_length,
.dataTables_filter {
  padding: 10px 0;
}

.dataTables_info,
.dataTables_paginate {
  padding: 10px 0;
}

/* Fix table width and overflow */
table.dataTable {
  width: 100% !important;
  margin: 0 !important;
}

/* Add some breathing room to the main content area */
#main-content .col-md-10 {
  padding-left: 30px;
  padding-right: 30px;
}

/* Style for external link icon */
table.dataTable a[target="_blank"] {
  white-space: nowrap;
}

@media (max-width: 768px) {
  #main-content .col-md-10 {
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Global heading styles */
h1, h2, h3, h4, h5, h6 {
  color: #000 !important;
}

/* Header centering improvements */
#header .uic-type-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
}

#header .uic-type-treatment {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Footer responsive padding */
.footer-legal {
  padding: 20px 15px;
}

.footer-legal .l-full {
  padding: 0 15px;
}

@media (max-width: 768px) {
  .footer-legal {
    padding: 15px 10px;
  }
  
  .footer-legal .site-copyright,
  .footer-legal .campuses {
    padding: 10px 5px;
  }
}

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

.nav-tabs > li > a {
  padding: 12px 20px;
  font-weight: 600; /* Always bold to prevent width changes */
  color: #333;
  border-radius: 4px 4px 0 0;
  transition: background-color 0.2s ease, color 0.2s ease;
  border: 1px solid transparent; /* Reserve space for border */
  white-space: nowrap;
}

.nav-tabs > li > a:hover {
  background-color: #f5f5f5;
  border-color: #ddd #ddd #d50032;
}

.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
  color: #d50032;
  background-color: #fff;
  border: 1px solid #ddd;
  border-bottom-color: transparent;
  border-top: 3px solid #d50032;
  padding-top: 10px; /* Adjust for thicker top border */
}

/* Stack tabs vertically on mobile */
@media (max-width: 768px) {
  .nav-tabs > li {
    float: none;
    width: 100%;
  }
  
  .nav-tabs > li > a {
    margin-bottom: 2px;
    border-radius: 4px;
  }
  
  .nav-tabs > li.active > a {
    border: 1px solid #d50032;
  }
}

/* DataTables 2.x layout fixes */
.dt-container .dt-layout-row.dt-layout-table {
  display: block;
}

/* Top row: length left, search right */
.dt-container .dt-length {
  float: left;
}

.dt-container .dt-search {
  float: right;
}

.dt-container .dt-search input {
  margin-left: 0.5em;
}

/* Bottom row uses flexbox for proper alignment */
