.custom-tab-container {
  margin: 20px 0;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
}

.custom-nav-tabs {
  border-bottom: 1px solid #dee2e6;
}

.custom-nav-tabs .nav-item .nav-link {
  border: 1px solid transparent;
  border-radius: 0.375rem 0.375rem 0 0;
  margin-right: 2px;
  padding: 10px 15px;
  color: #495057;
  background-color: #e9ecef;
}

.custom-nav-tabs .nav-item .nav-link.active {
  color: #fff;
  background-color: #007bff;
  border-color: #007bff #007bff #dee2e6;
}

.styled-tab-content {
  padding: 20px;
  border: 1px solid #dee2e6;
  border-top: none;
  background-color: #ffffff;
}

.module-content td {
  word-break: break-all;
}

.masthead {
  z-index: 9998;
}

.darkblue {
  background-color: #003366;
  color: white;
}

.section-ul i {
  width: 16px;
  height: auto;
  margin-right: 5px;
}

.active .remove-tag {
  position: absolute;
  margin-top: 3px;
  right: 0;
}

.active a {
  position: relative;
  display: inline-block;
}

.loading-bar {
  display: flex;
  justify-content: center;
  padding: 20px 0;
}

.loading-bar::after {
  content: "";
  width: 30px;
  height: 30px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}
.homepage,
.module-search {
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.search-input-group {
  display: none;
}

.api-help {
  background: #fff8f0;
  border: 1px solid #ffeedd;
  border-radius: 4px;
  margin-top: 10px;
  padding: 15px;
}

.api-help code {
  background: #fff;
  padding: 2px 4px;
  border-radius: 3px;
  border: 1px solid #ffe0c0 !important;
  color: #d35400 !important;
}

.btn-warning {
  color: black;
  background-color: #f39c12 !important;
  border-color: #e08e0b !important;
}

.btn-warning:hover {
  background-color: #e08e0b !important;
  border-color: #d35400 !important;
}

.dropdown-a {
  position: relative;
  z-index: 99999;
}

.dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  display: none;
  width: auto;
  background-color: white;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  z-index: 99999;
  border-radius: 5px;
  padding: 10px;
}

.dropdown-content a {
  display: block;
  padding: 8px 16px;
  text-decoration: none;
  color: black;
}

.dropdown-content i {
  margin-right: 10px;
}

.dropdown-content a:hover {
  color: #005fce;
}

.navbar-buttons a {
  margin-right: 10px;
}

.custom-nav .mainlink {
  align-items: center;
  box-sizing: border-box;
  color: rgb(255, 255, 255);
  cursor: pointer;
  display: flex;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  font-size: 14px;
  font-weight: 400;
  height: 45px;
  line-height: 21px;
  padding: 12px;
  text-align: start;
  text-decoration-color: rgb(255, 255, 255);
  text-decoration-line: none;
  text-decoration-style: solid;
  text-decoration-thickness: auto;
  text-size-adjust: 100%;
  text-transform: uppercase;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

.masthead .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.main-navbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.site-search {
  margin-right: 20px;
  /* Adjust as needed */
}

#main-navigation-toggle {
  float: right;
  width: 100%;
}

.modal.show {
  z-index: 999999 !important;
}

.btn.btn-success {
  background-color: #28a745;
  border-color: #28a745;
  color: #fff;
}

.btn.btn-success:hover {
  background-color: #218838;
  border-color: #1e7e34;
  color: #fff;
}

#dataset-search-form .search-input-group {
  display: none;
}

.nav-item a .item-label {
  white-space: break-space !important;
}

.module-narrow .nav-item.active > a span,
.module-narrow .nav-aside li.active a span {
  white-space: break-space !important;
}

/* Increase specificity for nav items */
body .module-narrow .nav-item > a .item-label,
body .module .nav-item > a span.item-label,
#mainsidebar .nav-item > a .item-label {
  white-space: break-spaces !important;
}

body .module-narrow .nav-item.active > a span,
body .module-narrow .nav-aside li.active a span,
#mainsidebar .nav-item.active > a span {
  white-space: break-spaces !important;
}

/* Add more specific rules for nested items */
.module-narrow .nav-item.nav-child > a .item-label,
.module-narrow .nav-item.nav-parent > a .item-label {
  white-space: break-spaces !important;
}

/* Ultra-specific selectors to override main.css */
html body .module-narrow .nav-item > a .item-label,
html body .module-narrow .nav-item > a span.item-label,
html body #mainsidebar .nav-item > a .item-label,
html body .module .nav-item > a .item-label {
  white-space: break-spaces !important;
}

html body .module-narrow .nav-item.active > a span,
html body .module-narrow .nav-aside li.active a span,
html body #mainsidebar .nav-item.active > a span,
html body .module .nav-item.active > a span {
  white-space: break-spaces !important;
}

/* Nested items with maximum specificity */
html body .module-narrow .nav-item.nav-child > a .item-label,
html body .module-narrow .nav-item.nav-parent > a .item-label {
  white-space: break-spaces !important;
}

ul.nav-child {
  margin-top:10px;
}

.nav-child {
  display: none;
  list-style: none !important;
  list-style-type: none !important;
}

.nav-item.active a {
  z-index: 5000 !important;
}


.nav-child:hover {
  list-style: none !important;
  list-style-type: none !important;
}

/* User Guide Styles */
.usa-prose .card {
  border: none;
  transition: transform 0.2s;
}

.usa-prose .card:hover {
  transform: translateY(-2px);
}

.usa-prose .card-title {
  color: var(--bs-primary);
  font-size: 1.75rem;
}

.usa-prose .card-title i {
  margin-right: 0.5rem;
}

.usa-prose .list-group-item i {
  margin-right: 0.5rem;
}

.usa-prose img {
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  margin: 1rem auto;
  display: block;
}

.usa-prose .accordion-button:not(.collapsed) {
  background-color: var(--bs-primary);
  color: white;
}

.usa-prose code {
  background: #f8f9fa;
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  color: var(--bs-primary);
}

.usa-prose .lead {
  font-size: 1.25rem;
  color: #666;
}

/* Custom Explore Button Styles */
.btn-explore {
  padding: 0.5rem 1rem !important;
  border-radius: 0.375rem !important;
  font-weight: 500 !important;
  transition: all 0.2s ease-in-out !important;
  border: 2px solid transparent !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  font-size: 0.9rem !important;
  width: auto !important;
  cursor: pointer !important;
  text-decoration: none !important;
}

/* Primary variant */
.btn-explore-primary {
  background-color: rgba(13, 110, 253, 0.1) !important;
  color: #0d6efd !important;
  border-color: rgba(13, 110, 253, 0.3) !important;
}

.btn-explore-primary:hover {
  background-color: #0d6efd !important;
  color: white !important;
  border-color: #0d6efd !important;
}

/* Success variant */
.btn-explore-success {
  background-color: rgba(25, 135, 84, 0.1) !important;
  color: #198754 !important;
  border-color: rgba(25, 135, 84, 0.3) !important;
}

.btn-explore-success:hover {
  background-color: #198754 !important;
  color: white !important;
  border-color: #198754 !important;
}

/* Info variant */
.btn-explore-info {
  background-color: rgba(13, 202, 240, 0.1) !important;
  color: #0dcaf0 !important;
  border-color: rgba(13, 202, 240, 0.3) !important;
}

.btn-explore-info:hover {
  background-color: #0dcaf0 !important;
  color: white !important;
  border-color: #0dcaf0 !important;
}

/* Warning variant */
.btn-explore-warning {
  background-color: rgba(255, 193, 7, 0.1) !important;
  color: #745f20 !important;
  border-color: rgba(179, 127, 5, 0.3) !important;
}

.btn-explore-warning:hover {
  background-color: #ffc107 !important;
  color: #000 !important;
  border-color: #ffc107 !important;
}

/* Danger variant */
.btn-explore-danger {
  background-color: rgba(220, 53, 69, 0.1) !important;
  color: #dc3545 !important;
  border-color: rgba(220, 53, 69, 0.3) !important;
}

.btn-explore-danger:hover {
  background-color: #dc3545 !important;
  color: white !important;
  border-color: #dc3545 !important;
}

/* Secondary variant */
.btn-explore-secondary {
  background-color: rgba(108, 117, 125, 0.1) !important;
  color: #6c757d !important;
  border-color: rgba(108, 117, 125, 0.3) !important;
}

.btn-explore-secondary:hover {
  background-color: #6c757d !important;
  color: white !important;
  border-color: #6c757d !important;
}

/* Fix button hover effects inside cards */
.card .btn-explore:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
}

.account.avatar {
  display: none;
}

.masthead .navbar .logo img {
  max-height: 100px !important;
}

.debug,
#flDebugToolbarHandle , #flDebugToolbar {
  display: none !important;
}

.main {
  background: none !important;
}

a,
p,
div,
span,
h1,
h2,
h3,
h4,
h5,
h6,
li,
b,
ul,
td,
tr,
th,
tbody,
thead {
  font-family: Roboto, Helvetica, Arial, sans-serif !important;
  -webkit-font-smoothing: antialiased;
}

li.disabled a {
  text-decoration: none !important;
  margin-left: 15px;
  margin-right: 15px;
}


.dataset-resources a {
  text-decoration: none;
}

.nav-item.badge {
  background-color: #6e6e6e;
  color: white !important; /* Black color for good contrast */
  text-decoration: none;
}

.nav-item.active.badge {
  background-color: #003366;
  color: white !important; /* Black color for good contrast */
  text-decoration: none;
}

a.nav-item.badge {
  margin-left: 5px;
}

.module-narrow .nav-item.active > a, .module-narrow .nav-aside li.active a  {
  background-color: #1F4297 !important;
  border-color: #060504 !important;
}


.module-narrow .nav-item.active > a:before, .module-narrow .nav-aside li.active a:before {  
  border-left-color: #1F4297 !important; /* Corrected the double '#' */
}

/* Alert Styles */
.alert {
  position: relative;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-radius: 0.375rem;
}

.alert-info {
  color: #055160;
  background-color: #cff4fc;
  border-color: #b6effb;
}

.alert-warning {
  color: #664d03;
  background-color: #fff3cd;
  border-color: #ffecb5;
}

.alert-danger {
  color: #842029;
  background-color: #f8d7da;
  border-color: #f5c2c7;
}

.alert-success {
  color: #0f5132;
  background-color: #d1e7dd;
  border-color: #badbcc;
}

.alert i {
  margin-right: 0.5rem;
}

.alert p {
  margin-bottom: 0;
}

.alert.shadow-sm {
  box-shadow: 0 .125rem .25rem rgba(0,0,0,.075);
}

#dataset-search-form h1::before {
  font-family: "Font Awesome 5 Free";
  content: "\f1c0";  /* Unicode for fa-database icon */
  font-weight: 900;  /* Required for solid icons */
  margin-right: 0.5rem;
  color: #003366;  /* Matches your theme's blue color */
  display: inline-block;
}

.no-underline {
  text-decoration: none !important;
}

.loader-badge {
  display: inline-block;
  padding: 0.25em 0.4em;
  font-size: 75%;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 0.25rem;
  background-color: #17a2b8;
  text-decoration: none;
  margin-left: 5px;
  text-transform: uppercase;
}

/* Style the overview stats cards */
.stats-overview .card {
  border-radius: 0.75rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
  border: none;
}

.stats-overview .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.15);
}

.stats-overview .card-body {
  padding: 1.5rem;
}

.stats-overview h3 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: white;
}

.stats-overview p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
}

.stats-overview i {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* Style the popular resources table */
#popular-resources i {
  margin-right: 0.5rem;
  color: #6c757d; /* Muted gray color */
}

#popular-resources a {
  text-decoration: none;
}

/* Modern background colors */
.bg-primary {
  background-color: #007bff !important; /* A classic blue */
}

.bg-success {
  background-color: #28a745 !important; /* A vibrant green */
}

.bg-info {
  background-color: #17a2b8 !important; /* A bright cyan */
}


.zindex100 {
  z-index: 100;
}

.nav-child a {
  z-index: 50;
}

@media (max-width: 768px) {
  .stats-overview .card {
    margin: 10px auto;
    max-width: 80%;
    position: relative;
    display: block;
  }

  .masthead .navbar .logo img {
    width: 100% !important;
  }

}
