body {
  overflow-y: scroll;
}

/* The Modal (background) */
.modal {
  background-color: rgb(0,0,0);
  background-color: rgba(0,0,0,0.4);
  display: none;
  height: 100%;
  left: 0;
  overflow: auto;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 10000;
}

/* Modal Content/Box */
.modal-content {
  background-color: #fefefe;
  border: 1px solid #888;
  margin: 2% auto;
  padding: 10px;
  width: 80%;
}

/* The Close Button */
.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: black;
  cursor: pointer;
  text-decoration: none;
}

.asc:after,
.desc:after {
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  padding-left: .5rem;
  vertical-align: middle;
}

.asc:after {
  content: "\f0de";
}

.desc:after {
  content: "\f0dd";
}

th a {
  display: block;
}

th a:hover {
  text-decoration: none;
}

.checkmark-green {
  color: #28a745;
}

.red {
  color: #dc4444;
}

.dark-toggle {
  text-decoration: none;
}

/* Toast container for notifications */
#alert-container {
  position: fixed;
  top: 3rem; /* Adjust based on navbar height */
  right: 1rem;
  z-index: 1050; /* Above navbar (z-index 1030 in Bootstrap) */
  min-width: 200px;
  max-width: 400px;
}

#alert-container .toast {
  margin-bottom: 0.2rem; /* Space between stacked toasts */
  width: 100%;
}

/* Fix for dark mode toggle width consistency */
#dark-mode-toggle i {
  display: inline-block;
  text-align: center;
  width: 1.25em; /* Match widest icon */
}

/* Fix HELP button and Dark mode toggle styling */
#help-page {
  color: #fff; /* Match light theme nav-link color */
  text-align: left; /* Ensure consistent alignment */
  padding-left: 0.75rem; /* Match .nav-link padding */
  padding-right: 0.75rem;
}

/* Hover styles for HELP button to match nav-links */
#help-page:hover {
  background-color: #fff;
  color: #dc4444;
}

/* Dark theme adjustments */
body.dark-mode #help-page {
  color: #2C3E50; /* Light color for dark theme */
}

body.dark-mode #dark-mode-toggle {
  color: #dc4444;
}

body.dark-mode #help-page:hover {
  background-color: #fff;
  color: #dc4444;
}

/* Collapsed navbar alignment */
@media (max-width: 991.98px) {
  .navbar-collapse.show .navbar-nav {
    margin-top: 0; /* Remove top margin for consistency */
  }
  .navbar-collapse.show .navbar-nav .nav-link,
  .navbar-collapse.show #help-page,
  .navbar-collapse.show #dark-mode-toggle {
    padding-left: 1rem; /* Consistent left padding */
    margin-left: 0; /* Remove any left margin */
    text-align: left;
  }
}