:root[data-bs-theme="light"] {
  --navbar-bg: #007bff; /* Blue background for light theme */
  --navbar-text-color: #ffffff; /* White text for contrast */
  --btn-responsive-bg: var(--navbar-bg);
  --btn-responsive-bg-hover: #0062cb; /* sligthly darker background for light theme; used for buttons */
  --btn-responsive-grey-bg: var(--bs-gray-200);
  --btn-responsive-grey-bg-hover: var(--bs-gray-300);
  --table-highlight-color: #2d92fd;

  --secondary-bg-color: var(--bs-light, #f8f9fa); 
  --bg-color-hover: var(--bs-gray-200, #e9ecef);
  --highlight-color: var(--bs-gray-500, #adb5bd);
  --text-color: var(--bs-dark, #212529); 
  --border-color: var(--bs-gray-400, #ced4da); 
}

:root[data-bs-theme="dark"] {
  --navbar-bg: #024588; /* Darker blue background for dark theme */
  --navbar-text-color: #e0e0e0; /* Lighter text for dark theme */
  --btn-responsive-bg: var(--navbar-bg);
  --btn-responsive-bg-hover: #024e9a; /* sligthly lighter background for dark theme; used for buttons */
  --btn-responsive-grey-bg: var(--bs-tertiary-bg);
  --btn-responsive-grey-bg-hover: var(--bs-secondary-bg);
  --bs-primary: #66b2ff; /* Lighter blue for dark theme */
  --bs-primary-rgb: 102, 178, 255; 
  --table-highlight-color: var(--btn-responsive-bg-hover);

  /* the following is aligned with the 3d_render repo */
  --secondary-bg-color: var(--bs-gray-800, #343a40);
  --bg-color-hover: var(--bs-gray-900, #212529);
  --highlight-color: var(--bs-dark-text-emphasis, #dee2e6);
  --text-color: var(--bs-light, #f8f9fa);
  --border-color: var(--bs-gray-700, #495057); 
}


/* Apply these variables to the navbar */
.navbar {
  background-color: var(--navbar-bg) !important;
  color: var(--navbar-text-color);
}

.navbar-brand {
  padding: 2px 0;
}

.navbar .nav-link {
  color: var(--navbar-text-color) !important;
}

.navbar .nav-link:hover {
  color: #ffc107; /* Optional hover effect (yellow) */
}

/* textual logo next to the image logo */
.navbar-brand-text {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 40px;
  z-index: 1;

  /* Align right edge of SVG to the left edge of .container */
  right: 100%; /* places it just outside the container */
}

.navbar-brand-text img {
  height: 100%;
}
.navbar-brand img {
  height: 50px;
  width: 50px;
  margin: 0;
  padding: 0;
}

/* Show/hide logo based on [data-bs-theme] attribute */
[data-bs-theme="light"] .logo-dark {
  display: none;
}
[data-bs-theme="light"] .logo-light {
  display: inline;
}

[data-bs-theme="dark"] .logo-light {
  display: none;
}
[data-bs-theme="dark"] .logo-dark {
  display: inline;
}

/* Only show on large screens */
@media (max-width: 1650px) {
  .navbar-brand-text {
    display: none !important;
  }
}

.content {
  min-width: 25%;
}

h2 {
  margin-top: 0.25em;
}

h2.accordion-header {
  /* Offset the above for h2 */
  margin-top: 0;
}

h1 {
  margin-top: 0.5em;
}

hr.dashed {
  color: var(--highlight-color);
  border-top: var(--bs-border-width) dashed;
}

/* style boostrap buttons, because they are not responsive to light/dark */
.btn-responsive {
  background-color: var(--btn-responsive-bg) !important;
  color: var(--navbar-text-color);
}

.btn-responsive:hover {
  background-color: var(--btn-responsive-bg-hover) !important;
  color: #ccc;
}

.btn-responsive-grey {
  background-color: var(--btn-responsive-grey-bg) !important;
  color: var(--bs-body-color);
}

.btn-responsive-grey:hover {
  background-color: var(--btn-responsive-grey-bg-hover) !important;
  color: var(--bs-light-text-emphasis);
}


/* Style for nested dropdowns */
.dropdown-submenu {
  position: relative;
}

.dropdown-submenu > .dropdown-menu {
  top: 0;
  left: 100%;
  margin-top: -5px;
  margin-left: 0;
}

iframe {
  width: 100%; 
  height: 80vh; 
  border: 1px solid #ccc; 
  border-radius: 5px;
}

.h2-icon {
  vertical-align: top;
  font-size: 0.4em;
  opacity: 0.8; 
}


.d-flex.flex-nowrap button {
  white-space: nowrap; /* Prevents text from wrapping */
  overflow: hidden; /* Ensures text doesn’t overflow */
  text-overflow: ellipsis; /* Adds "..." if text is too long */
}




.spinner-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner-smaller {
  height: 1.8em;
  width: 1.8em;
  max-height: 100%; /* Ensure it doesn't overflow */
  max-width: 100%; /* Ensure it doesn't overflow */
}



/* Highlight <th> with colspan > 1 inside a table with class="table table-striped" */
table.table.table-striped th[colspan]:not([colspan="1"]) {
    background-color: var(--bs-table-striped-bg); 
    border-width: var(--bs-border-width);
    border-color: var(--bs-border-color);
}

/* Hide background and borders for <th> with colspan="1" */
table.table.table-striped th[colspan="1"] {
    background-color: transparent !important; /* Hide background */
    border: none !important; /* Hide all borders */
}


.bootstrap-table .fixed-table-container .table thead th .sortable {
    cursor: pointer;
    background-position: right;
    background-repeat: no-repeat;
    /* padding-right: 30px !important; */
}





/* Custom breakpoint for xxxl (e.g., >1920px) */
@media (min-width: 2000px) {
  .col-xxxl-1 { width: 8.333333%; }
  .col-xxxl-2 { width: 16.666667%; }
  .col-xxxl-3 { width: 25%; }
  .col-xxxl-4 { width: 33.333333%; }
  /* Add more as needed */
}


.bootstrap-table .table tbody tr.row-selected td {
    background-color: var(--table-highlight-color) !important;
}