/* Direct overrides for Bootstrap styles to fix tab colors */
.nav-tabs .nav-link,
.nav-tabs .nav-link:focus, 
.nav-tabs .nav-link:hover,
.nav-tabs .nav-item .nav-link {
  color: #212529 !important;
  box-shadow: none !important;
  outline: none !important;
}

.nav-tabs .nav-link.active,
.nav-tabs .nav-item .nav-link.active {
  color: #212529 !important;
  background-color: #febe10 !important;
  border-color: #febe10 #febe10 #fff !important;
}

/* Fix blue tab issues */
.nav-tabs .nav-link:hover,
.nav-tabs .nav-link:focus {
  color: #febe10 !important;
  border-color: transparent transparent #dee2e6 !important; 
}

/* Dark mode tab styles with !important on everything */
body.dark-mode .nav-tabs {
  border-bottom-color: #495057 !important;
}

body.dark-mode .nav-tabs .nav-link,
body.dark-mode .nav-tabs .nav-item .nav-link {
  color: #f8f9fa !important;
  border-color: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  outline: none !important;
}

body.dark-mode .nav-tabs .nav-link:hover,
body.dark-mode .nav-tabs .nav-item .nav-link:hover,
body.dark-mode .nav-tabs .nav-link:focus,
body.dark-mode .nav-tabs .nav-item .nav-link:focus {
  color: #febe10 !important;
  background-color: rgba(254, 190, 16, 0.15) !important;
  border-color: transparent transparent #495057 !important;
}

body.dark-mode .nav-tabs .nav-link.active,
body.dark-mode .nav-tabs .nav-item .nav-link.active {
  color: #212529 !important;
  background-color: #febe10 !important;
  border-color: #febe10 #febe10 #343a40 !important;
}

/* Override Bootstrap default focus and active blue color */
.nav-link:focus,
.nav-link:active,
.nav-link.active {
  color: #212529 !important;
  box-shadow: none !important;
}

/* Additional rules to override Bootstrap's :focus-visible which might be causing the blue */
.nav-link:focus-visible,
.nav-tabs .nav-link:focus-visible,
body.dark-mode .nav-link:focus-visible,
body.dark-mode .nav-tabs .nav-link:focus-visible {
  color: inherit !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Hard override for any built-in browser styling */ 
a:focus {
  outline: none !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
}

/* Font overrides to ensure Barlow is used everywhere */
body, input, button, select, textarea, .form-control, .btn, 
.nav-link, .dropdown-item, .card-title, .alert, .badge {
  font-family: 'Barlow', sans-serif !important;
}

/* Ensure headings use Barlow with proper weights */
h1, h2, h3, h4, h5, h6, 
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: 'Barlow', sans-serif !important;
  font-weight: 600 !important; /* Semi-bold for headings */
}

/* Bootstrap button text */
.btn {
  font-weight: 500 !important; /* Medium weight for buttons */
}

/* Override Bootstrap pills styling */
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
  color: #212529 !important;
  background-color: #febe10 !important;
  border-color: #febe10 !important;
}

.nav-pills .nav-link:hover,
.nav-pills .nav-link:focus {
  background-color: rgba(254, 190, 16, 0.15) !important;
  color: #212529 !important;
}

body.dark-mode .nav-pills .nav-link {
  color: #f8f9fa !important;
}

body.dark-mode .nav-pills .nav-link:hover,
body.dark-mode .nav-pills .nav-link:focus {
  color: #f8f9fa !important;
  background-color: rgba(254, 190, 16, 0.15) !important;
}

body.dark-mode .nav-pills .nav-link.active,
body.dark-mode .nav-pills .show > .nav-link {
  color: #212529 !important;
  background-color: #ffc107 !important;
}

/* Ensure focus indicators don't override our color scheme */
.nav-pills .nav-link:focus-visible {
  box-shadow: 0 0 0 0.25rem rgba(254, 190, 16, 0.25) !important;
}

/* Ensure consistent form element sizing */
.form-select.body1, .form-control.body1 {
  height: calc(1.5em + 0.75rem + 2px);
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  border-radius: 0.25rem;
  width: 100%;
}

/* Style for hub warning */
#hubWarning {
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
  margin-top: 0.375rem;
  transition: all 0.3s ease;
  border-left: 4px solid #ffca2c;
}

/* Make environment dropdown consistent with other form elements */
select#environment.form-select {
  width: 100% !important;
  max-width: none !important;
}

/* Dark mode styling for hub warning */
body.dark-mode #hubWarning {
  background-color: rgba(255, 193, 7, 0.15);
  color: #f8f9fa;
  border-color: #ffca2c;
}
