/* Main Styles */
body {
  font-family: "Roboto", sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 1.125rem;
  line-height: 1.75rem;
  color: #000000;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Headings */
h1 {
  font-family: "Rajdhani", sans-serif;
  font-weight: 600;
  font-size: 2.5rem;
  line-height: 3rem;
  color: #000000;
}

h2 {
  font-family: "Roboto", sans-serif;
  font-weight: 600;
  font-size: 1.75rem;
  line-height: 2.5rem;
  color: #000000;
}

h3 {
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 2.5rem;
  color: #000000;
}

/* Subtitle classes (HERV page) */
.subtitle-1 {
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: 1.75rem;
  line-height: 2rem;
  color: #4b5563;
}

.subtitle-2 {
  font-family: "Roboto", sans-serif;
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 2rem;
  color: #4b5563;
}

/* Droplist / dropdown items */
.dropdown-item {
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1rem;
  color: #000000;
}

main {
  flex: 1;
}

/* Footer Styles */
.footer {
  background-color: #f8f9fa;
  padding: 3rem 0;
  margin-top: auto;
}

.footer h5 {
  font-size: 1.1rem;
  margin-bottom: 1.2rem;
}

.footer ul li a {
  color: #6c757d;
  transition: color 0.3s ease;
}

.footer ul li a:hover {
  color: #343a40;
  text-decoration: none;
}

.footer .social-icons a {
  display: inline-block;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #f1f1f1;
  color: #6c757d;
  text-align: center;
  line-height: 36px;
  margin-right: 0.5rem;
  transition: all 0.3s ease;
}

.footer .social-icons a:hover {
  background-color: #e5e5e5;
  color: #343a40;
}

/* Responsive page padding */
.page-padding {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 768px) {
  .page-padding {
    padding-left: 5rem;
    padding-right: 5rem;
  }
}

/* Sticky Footer */
.page-content {
  flex: 1 0 auto;
}

.site-footer {
  flex-shrink: 0;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
  .footer {
    text-align: center;
  }

  .footer .col-md-6 {
    margin-bottom: 2rem;
  }
}

/* Improve multiselect appearance */
#statusSelect option {
  padding: 8px;
}

/* Custom datepicker styling */
input[type="date"] {
  font-family: sans-serif;
}

/* Selected status in multiselect */
#statusSelect option:checked {
  background-color: rgba(13, 110, 253, 0.25);
  color: black;
}

/* Status-related styles shared across templates */
.teal {
  color: #0a799a;
}

.teal:hover {
  color: #4c94af !important;
}

.semi-bold {
  font-weight: 600;
}

.medium {
  font-weight: 500;
}

/* Status rectangle indicators */
.rectangle-submitted,
.rectangle-pending,
.rectangle-running,
.rectangle-aborted,
.rectangle-succeeded,
.rectangle-failed {
  height: 20px;
  width: 10px;
  display: inline-block;
  vertical-align: middle;
}

.rectangle-submitted {
  background-color: #6faedb;
}

.rectangle-pending {
  background-color: #b7a0c6;
}

.rectangle-running {
  background-color: #f4a261;
}

.rectangle-aborted {
  background-color: #adb5bd;
}

.rectangle-succeeded {
  background-color: #52b788;
}

.rectangle-failed {
  background-color: #e63946;
}

/* Thick left borders for workflow cards */
.border-left-thick-submitted {
  border-left: 10px solid #6faedb;
}

.border-left-thick-pending {
  border-left: 10px solid #b7a0c6;
}

.border-left-thick-running {
  border-left: 10px solid #f4a261;
}

.border-left-thick-aborted {
  border-left: 10px solid #adb5bd;
}

.border-left-thick-aborting {
  border-left: 10px solid #adb5bd;
}

.border-left-thick-succeeded {
  border-left: 10px solid #52b788;
}

.border-left-thick-failed {
  border-left: 10px solid #e63946;
}

.btn-outline-teal {
  --bs-btn-color: #0a799a;
  --bs-btn-border-color: #0a799a;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #4c94af;
  --bs-btn-hover-border-color: #4c94af;
  --bs-btn-focus-shadow-rgb: 10, 121, 154;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #4c94af;
  --bs-btn-active-border-color: #4c94af;
  --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
  --bs-btn-disabled-color: #0a799a;
  --bs-btn-disabled-bg: transparent;
  --bs-btn-disabled-border-color: #0a799a;
  --bs-gradient: none;
}

.btn-teal {
  --bs-btn-color: #fff;
  --bs-btn-bg: #0a799a;
  --bs-btn-border-color: #0a799a;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #08637d;
  --bs-btn-hover-border-color: #075971;
  --bs-btn-focus-shadow-rgb: 10, 121, 154;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #075971;
  --bs-btn-active-border-color: #064f65;
  --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: #0a799a;
  --bs-btn-disabled-border-color: #0a799a;
}

/* Responsive stdout path max-width */
.stdout-path {
  max-width: 300px;
}

@media (min-width: 576px) {
  .stdout-path {
    max-width: 100px;
  }
}

@media (min-width: 768px) {
  .stdout-path {
    max-width: 400px;
  }
}

@media (min-width: 992px) {
  .stdout-path {
    max-width: 600px;
  }
}

@media (min-width: 1200px) {
  .stdout-path {
    max-width: 800px;
  }
}

/* Accordion styles - caret on left, no borders */
.accordion-item {
  border: none;
}

.accordion-button {
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 0.5rem;
  border: none;
  background-color: transparent;
  box-shadow: none;
}

.accordion-button::after {
  margin-left: 0;
  margin-right: 0;
  transform: rotate(-90deg);
}

.accordion-button:not(.collapsed)::after {
  transform: rotate(0deg);
}

.accordion-button:not(.collapsed) {
  background-color: transparent;
  box-shadow: none;
}

.accordion-button:focus {
  box-shadow: none;
  border: none;
}

.accordion-body {
  border: none;
  padding-left: 1.5rem;
}

.accordion {
  --bs-accordion-border-width: 0;
}

/* Nested accordion styles */
.nested-accordion .accordion-button {
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
}

.nested-accordion .accordion-body {
  padding: 0.5rem 1rem 0.5rem 1.5rem;
}

/* Navbar Styles */
.server-badge {
  font-size: 0.8rem;
}

/* Custom navbar styling */
.custom-navbar {
  background-color: #1b365d !important;
  color: #ffffff !important;
  border-bottom: none;
  box-shadow: none;
  padding: 1rem 2rem;
}

/* HERVdb brand title */
.custom-navbar .navbar-brand {
  font-family: "Rajdhani", sans-serif;
  font-weight: 600;
  font-size: 1.75rem;
  line-height: 2.25rem;
  color: #ffffff !important;
}

/* Navigation items */
.custom-navbar .nav-link {
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.75rem;
}

/* Active nav item styling - scoped to navbar only */
.navbar-container .nav-link.active {
  position: relative;
}

.navbar-container .nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 10px;
  background-color: #1b365d;
}

/* White text color for all li elements in navbar */
.navbar-container li {
  color: #ffffff !important;
}

.navbar-container li a {
  color: #ffffff !important;
}

/* Align all nav items vertically centered on desktop, left on mobile */
.navbar-container .navbar-nav {
  align-items: center;
}

@media (max-width: 991.98px) {
  .navbar-container .navbar-nav {
    align-items: flex-start;
  }
}

/* Dropdown menu styling - scoped to navbar */
.navbar-container .nav-item.dropdown .dropdown-menu {
  background-color: #1b365d !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 0.5rem !important;
  margin-top: 8px;
  padding: 0.5rem;
  min-width: auto;
}

.navbar-container .nav-item.dropdown .dropdown-menu .dropdown-item {
  color: #ffffff !important;
  font-family: "Roboto", sans-serif;
  font-size: 1rem;
  background-color: transparent !important;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  margin-bottom: 0.25rem;
}

.navbar-container .nav-item.dropdown .dropdown-menu .dropdown-item:last-child {
  margin-bottom: 0;
}

.navbar-container .nav-item.dropdown .dropdown-menu .dropdown-item:hover,
.navbar-container .nav-item.dropdown .dropdown-menu .dropdown-item:focus,
.navbar-container .nav-item.dropdown .dropdown-menu .dropdown-item.active {
  background-color: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
}

.navbar-container .dropdown-toggle::after {
  vertical-align: middle;
}

.navbar-container .btn.dropdown-toggle {
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: 1rem;
  color: #ffffff;
  background-color: transparent;
  border: none;
  padding: 0.375rem 0.75rem;
}

.navbar-container .btn.dropdown-toggle:hover,
.navbar-container .btn.dropdown-toggle:focus,
.navbar-container .btn.dropdown-toggle:active,
.navbar-container .show > .btn.dropdown-toggle {
  background-color: transparent;
  color: #ffffff;
  box-shadow: none;
}

.navbar-container .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.5);
  --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-container .navbar-toggler:focus {
  box-shadow: 0 0 0 0.15rem rgba(255, 255, 255, 0.4);
}

@media (max-width: 991.98px) {
  .custom-navbar {
    padding-left: 0;
    padding-right: 0;
  }

  .custom-navbar .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .navbar-container .navbar-collapse .navbar-nav {
    padding-top: 0.75rem;
  }

  .navbar-container .btn.dropdown-toggle {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    padding-left: 0;
  }

  .navbar-container .nav-link {
    padding-left: 0;
  }

  .navbar-container .nav-item.dropdown .dropdown-menu {
    padding-left: 0;
    margin-left: 0;
    margin-top: 0;
    padding-top: 0;
    padding-bottom: 0;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .navbar-container .nav-item.dropdown .dropdown-menu .dropdown-item {
    padding-left: 1.25rem !important;
  }
}

/*Tabulator css*/
/* Enable horizontal scrolling for Tabulator */
.tabulator {
  overflow-x: auto;
  overflow-y: visible;
  border: 1px solid #dee2e6;
}

.tabulator-table {
  min-width: 100%;
}

/* Ensure table headers are sticky during horizontal scroll */
.tabulator-header {
  position: sticky;
  top: 0;
  z-index: 10;
}

/* Style the horizontal scrollbar */
.tabulator::-webkit-scrollbar {
  height: 12px;
}

.tabulator::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.tabulator::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 6px;
}

.tabulator::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Non-human ERV badge */
.herv-non-human {
  background-color: #f4bffb !important;
  color: #000000 !important;
  display: inline-block !important;
  width: fit-content;
  padding: 0.25rem 0.5rem;
}

/* .lineage badge */
.herv-lineage {
  background-color: #c9f3fa !important;
  color: #000000 !important;
  display: inline-block !important;
  width: fit-content;
  padding: 0.25rem 0.5rem;
}

/* sublineage badge */
.herv-sublineage {
  background-color: #c9fad8 !important;
  color: #000000 !important;
  display: inline-block !important;
  width: fit-content;
  padding: 0.25rem 0.5rem;
}

/* annotation_group badge */
.herv-annotation_group {
  background-color: #e9e8f8 !important;
  color: #000000 !important;
  display: inline-block !important;
  width: fit-content;
  padding: 0.25rem 0.5rem;
}

/* repeat_group badge */
.herv-repeat_group {
  background-color: #faeac9 !important;
  color: #000000 !important;
  display: inline-block !important;
  width: fit-content;
  padding: 0.25rem 0.5rem;
}
