@font-face {
  font-family: 'Inter';
  src: url("fonts/InterVariable.2bf3d951bf9d.woff2") format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

:root {
  --bs-primary: #2d6a4f;
  --bs-primary-rgb: 45, 106, 79;
  --bs-link-color: #2d6a4f;
  --bs-link-color-rgb: 45, 106, 79;
  --bs-link-hover-color: #1b3a2d;
  --bs-link-hover-color-rgb: 27, 58, 45;
  --bs-body-color: #2a2a2a;
  --bs-body-color-rgb: 42, 42, 42;
  --bs-heading-color: #1b3a2d;
}

.accordion {
  --bs-accordion-active-color: #1b3a2d;
  --bs-accordion-active-bg: #d4ede0;
  --bs-accordion-btn-focus-box-shadow: 0 0 0 0.25rem rgba(45, 106, 79, 0.25);
}

.alert-info {
  --bs-alert-color: #1b3a2d;
  --bs-alert-bg: #d4ede0;
  --bs-alert-border-color: #b7ddc8;
}

.btn-primary {
  --bs-btn-bg: #2d6a4f;
  --bs-btn-border-color: #2d6a4f;
  --bs-btn-hover-bg: #24543f;
  --bs-btn-hover-border-color: #204d3b;
  --bs-btn-active-bg: #24543f;
  --bs-btn-active-border-color: #204d3b;
  --bs-btn-disabled-bg: #2d6a4f;
  --bs-btn-disabled-border-color: #2d6a4f;
  --bs-btn-focus-shadow-rgb: 45, 106, 79;
}

.btn-outline-primary {
  --bs-btn-color: #2d6a4f;
  --bs-btn-border-color: #2d6a4f;
  --bs-btn-hover-bg: #2d6a4f;
  --bs-btn-hover-border-color: #2d6a4f;
  --bs-btn-active-bg: #2d6a4f;
  --bs-btn-active-border-color: #2d6a4f;
  --bs-btn-disabled-color: #2d6a4f;
  --bs-btn-disabled-border-color: #2d6a4f;
  --bs-btn-focus-shadow-rgb: 45, 106, 79;
}

.pagination {
  --bs-pagination-color: #2d6a4f;
  --bs-pagination-hover-color: #1b3a2d;
  --bs-pagination-focus-color: #1b3a2d;
  --bs-pagination-focus-box-shadow: 0 0 0 0.25rem rgba(45, 106, 79, 0.25);
  --bs-pagination-active-bg: #2d6a4f;
  --bs-pagination-active-border-color: #2d6a4f;
}

.navbar-forest {
  background-color: #1b3a2d;
}

/* Theme toggle button: always white on the dark navbar, matching navbar-dark link style */
.navbar-forest .theme-toggle {
  color: rgba(255, 255, 255, 0.55);
}

.navbar-forest .theme-toggle:hover,
.navbar-forest .theme-toggle:focus {
  color: #fff;
}

main {
  margin-bottom: 1rem;
}

body.iframe {
  overflow-x: hidden;
}

#return-to-top {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  background: rgba(0, 0, 0, 0.7);
  width: 50px;
  height: 50px;
  display: none;
  text-decoration: none;
  border-radius: 35px;
  transition: all 0.3s ease;
  z-index: 5;
}

#return-to-top i {
  color: #fff;
  margin: 0;
  position: relative;
  left: 16px;
  top: 13px;
  font-size: 19px;
  transition: all 0.3s ease;
}

#return-to-top:hover {
  background: rgba(0, 0, 0, 0.9);
}

#return-to-top:hover i {
  color: #fff;
  top: 5px;
}


.footer-icon {
  font-size: 2rem;
}

/* =============================================
   DARK MODE OVERRIDES
   Applied when <html data-bs-theme="dark">
   ============================================= */

[data-bs-theme="dark"] {
  --bs-primary: #52b788;
  --bs-primary-rgb: 82, 183, 136;

  --bs-secondary: #a0b2a6;
  --bs-secondary-rgb: 160, 178, 166;
  --bs-secondary-color: #a0b2a6;
  --bs-secondary-color-rgb: 160, 178, 166;
  --bs-secondary-text-emphasis: #c2d1c8;
  --bs-secondary-bg-subtle: #232b27;
  --bs-secondary-border-subtle: #3a4f44;

  --bs-tertiary-color: rgba(160, 178, 166, 0.7);
  --bs-tertiary-color-rgb: 160, 178, 166;

  --bs-link-color: #52b788;
  --bs-link-color-rgb: 82, 183, 136;
  --bs-link-hover-color: #74c69d;
  --bs-link-hover-color-rgb: 116, 198, 157;

  --bs-body-color: #d8e4de;
  --bs-body-color-rgb: 216, 228, 222;
  --bs-heading-color: #a8d5bc;

  --bs-body-bg: #1a1f1c;
  --bs-body-bg-rgb: 26, 31, 28;

  --bs-secondary-bg: #232b27;
  --bs-secondary-bg-rgb: 35, 43, 39;

  --bs-tertiary-bg: #2b3530;
  --bs-tertiary-bg-rgb: 43, 53, 48;

  --bs-border-color: #3a4f44;
  --bs-border-color-translucent: rgba(216, 228, 222, 0.15);
}

[data-bs-theme="dark"] .accordion {
  --bs-accordion-active-color: #a8d5bc;
  --bs-accordion-active-bg: #1e3329;
  --bs-accordion-btn-focus-box-shadow: 0 0 0 0.25rem rgba(82, 183, 136, 0.25);
}

[data-bs-theme="dark"] .alert-info {
  --bs-alert-color: #a8d5bc;
  --bs-alert-bg: #1a2e25;
  --bs-alert-border-color: #2d5240;
}

[data-bs-theme="dark"] .btn-primary {
  --bs-btn-bg: #52b788;
  --bs-btn-border-color: #52b788;
  --bs-btn-hover-bg: #74c69d;
  --bs-btn-hover-border-color: #74c69d;
  --bs-btn-active-bg: #74c69d;
  --bs-btn-active-border-color: #74c69d;
  --bs-btn-disabled-bg: #52b788;
  --bs-btn-disabled-border-color: #52b788;
  --bs-btn-focus-shadow-rgb: 82, 183, 136;
  --bs-btn-color: #0f211a;
  --bs-btn-hover-color: #0f211a;
  --bs-btn-active-color: #0f211a;
}

[data-bs-theme="dark"] .btn-outline-primary {
  --bs-btn-color: #52b788;
  --bs-btn-border-color: #52b788;
  --bs-btn-hover-bg: #52b788;
  --bs-btn-hover-border-color: #52b788;
  --bs-btn-hover-color: #0f211a;
  --bs-btn-active-bg: #52b788;
  --bs-btn-active-border-color: #52b788;
  --bs-btn-active-color: #0f211a;
  --bs-btn-disabled-color: #52b788;
  --bs-btn-disabled-border-color: #52b788;
  --bs-btn-focus-shadow-rgb: 82, 183, 136;
}

[data-bs-theme="dark"] .pagination {
  --bs-pagination-color: #52b788;
  --bs-pagination-hover-color: #74c69d;
  --bs-pagination-focus-color: #74c69d;
  --bs-pagination-focus-box-shadow: 0 0 0 0.25rem rgba(82, 183, 136, 0.25);
  --bs-pagination-active-bg: #52b788;
  --bs-pagination-active-border-color: #52b788;
}

[data-bs-theme="dark"] .navbar-forest {
  background-color: #0f211a;
}

[data-bs-theme="dark"] .may-fly {
  --bs-table-bg: #1e3d2c;
}

.species-suggest-dropdown {
  z-index: 100;
}

.star-select-label {
  cursor: pointer;
  padding: 0 0.15rem;
  font-size: 1.25rem;
  line-height: 1;
  background: none;
  border: none;
  display: inline-flex;
  align-items: center;
}

@media print {
  html { color-scheme: light only; }
  [data-bs-theme="dark"] {
    --bs-body-bg: #fff;
    --bs-body-color: #212529;
  }
}

/* =============================================
   NAVBAR ENHANCEMENTS
   ============================================= */
.navbar-search-group {
  background-color: rgba(255, 255, 255, 0.12);
  border-radius: 2rem;
  padding: 2px 4px;
  transition: all 0.2s ease-in-out;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.navbar-search-group:focus-within {
  background-color: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.15);
}

.navbar-search-group input::placeholder {
  color: rgba(255, 255, 255, 0.65);
}

.navbar-search-group input:focus {
  box-shadow: none;
}

.hover-white:hover {
  color: #fff !important;
}

.navbar-forest .dropdown-menu {
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  padding: 0.5rem 0.35rem;
}

.navbar-forest .dropdown-item {
  border-radius: 0.5rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.92rem;
  transition: background-color 0.15s ease;
}

/* Navbar Search Autocomplete Dropdown */
.navbar-search-group {
  position: relative;
}

.navbar-autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  min-width: 300px;
  max-width: 440px;
  background-color: var(--bs-body-bg, #fff);
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  margin-top: 0.35rem;
  z-index: 1050;
  overflow: hidden;
  display: none;
}

.navbar-autocomplete-dropdown.show {
  display: block;
}

.autocomplete-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.4rem 0.75rem;
  background-color: var(--bs-tertiary-bg);
  color: var(--bs-secondary-color);
  border-bottom: 1px solid var(--bs-border-color-translucent, rgba(0,0,0,0.05));
}

.autocomplete-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.75rem;
  color: var(--bs-body-color);
  text-decoration: none;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--bs-border-color-translucent, rgba(0,0,0,0.05));
  transition: background-color 0.12s ease;
}

.autocomplete-item:hover,
.autocomplete-item.active {
  background-color: var(--bs-secondary-bg);
  color: var(--bs-body-color);
  text-decoration: none;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item-text {
  flex: 1;
  min-width: 0;
}

.autocomplete-item-title {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.autocomplete-item-subtitle {
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.autocomplete-footer {
  padding: 0.5rem 0.75rem;
  background-color: var(--bs-tertiary-bg);
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
}

/* ==========================================================================
   User Profile, Subnavigation & Avatar Styling
   ========================================================================== */

.profile-subnav {
  -webkit-overflow-scrolling: touch;
}

.profile-subnav .btn {
  font-weight: 500;
  transition: all 0.15s ease-in-out;
  white-space: nowrap;
}

.profile-subnav .btn:hover:not(.active) {
  background-color: var(--bs-secondary-bg);
  border-color: var(--bs-border-color);
  color: var(--bs-body-color);
}

.profile-subnav .btn.active {
  box-shadow: 0 2px 4px rgba(45, 106, 79, 0.2);
}

.user-avatar-placeholder {
  user-select: none;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  letter-spacing: -0.02em;
}

[data-bs-theme="dark"] .user-avatar-placeholder.bg-primary-subtle {
  background-color: rgba(45, 106, 79, 0.35) !important;
  color: #74c69d !important;
  border: 1px solid rgba(116, 198, 157, 0.3);
}

[data-bs-theme="dark"] .profile-subnav .btn-outline-secondary {
  color: #c9d1d9;
  border-color: #30363d;
}

[data-bs-theme="dark"] .profile-subnav .btn-outline-secondary:hover:not(.active) {
  background-color: #21262d;
  border-color: #8b949e;
  color: #f0f6fc;
}

[data-bs-theme="dark"] .profile-subnav .btn.active {
  background-color: #2d6a4f !important;
  border-color: #2d6a4f !important;
  color: #ffffff !important;
}

/* ==========================================================================
   Documentation, Legal & Contact Page Styling
   ========================================================================== */

.scroll-mt {
  scroll-margin-top: 5.5rem;
}

.doc-mobile-toc {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.doc-mobile-toc::-webkit-scrollbar {
  display: none;
}

.doc-toc-link {
  font-weight: 500;
  transition: all 0.15s ease-in-out;
}

.doc-toc-link:hover {
  background-color: var(--bs-secondary-bg);
  color: var(--bs-primary) !important;
}

.hover-primary:hover {
  color: var(--bs-primary) !important;
}

.doc-content address {
  font-style: normal;
}

/* License Badges */
.license-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background-color: var(--bs-secondary-bg);
  color: var(--bs-body-color) !important;
  border: 1px solid var(--bs-border-color);
  font-weight: 600;
  font-size: 0.775rem;
  padding: 0.3rem 0.65rem;
  border-radius: 2rem;
  text-decoration: none !important;
  transition: all 0.15s ease-in-out;
  white-space: nowrap;
}

.license-badge:hover {
  background-color: var(--bs-tertiary-bg);
  border-color: var(--bs-primary);
  color: var(--bs-primary) !important;
}

[data-bs-theme="dark"] .license-badge {
  background-color: #232b27 !important;
  color: #d8e4de !important;
  border-color: #3a4f44 !important;
}

[data-bs-theme="dark"] .license-badge:hover {
  background-color: #2b3530 !important;
  border-color: #52b788 !important;
  color: #52b788 !important;
}

[data-bs-theme="dark"] .table-light,
[data-bs-theme="dark"] .doc-content .table-light {
  --bs-table-bg: #232b27;
  --bs-table-color: #d8e4de;
  --bs-table-border-color: #3a4f44;
}

[data-bs-theme="dark"] .text-secondary {
  color: var(--bs-secondary-color) !important;
}

[data-bs-theme="dark"] .text-muted {
  color: var(--bs-secondary-color) !important;
}

[data-bs-theme="dark"] .text-body-secondary {
  color: var(--bs-secondary-color) !important;
}

[data-bs-theme="dark"] .text-secondary-emphasis {
  color: var(--bs-secondary-text-emphasis) !important;
}

[data-bs-theme="dark"] .bg-secondary-subtle {
  background-color: var(--bs-secondary-bg-subtle) !important;
  color: var(--bs-secondary-text-emphasis) !important;
}

[data-bs-theme="dark"] .border-secondary-subtle {
  border-color: var(--bs-secondary-border-subtle) !important;
}

[data-bs-theme="dark"] .border-secondary {
  border-color: var(--bs-secondary-border-subtle) !important;
}

[data-bs-theme="dark"] .bg-dark-subtle {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: var(--bs-body-color) !important;
}

[data-bs-theme="dark"] .btn-outline-secondary {
  --bs-btn-color: #a0b2a6;
  --bs-btn-border-color: #3a4f44;
  --bs-btn-hover-color: #ffffff;
  --bs-btn-hover-bg: #2d6a4f;
  --bs-btn-hover-border-color: #2d6a4f;
  --bs-btn-active-color: #ffffff;
  --bs-btn-active-bg: #2d6a4f;
  --bs-btn-active-border-color: #2d6a4f;
}

[data-bs-theme="dark"] .bg-primary-subtle {
  background-color: rgba(45, 106, 79, 0.28) !important;
  color: #74c69d !important;
}

[data-bs-theme="dark"] .border-primary-subtle {
  border-color: rgba(116, 198, 157, 0.35) !important;
}

[data-bs-theme="dark"] .bg-success-subtle {
  background-color: rgba(45, 106, 79, 0.25) !important;
  color: #74c69d !important;
}

[data-bs-theme="dark"] .border-success-subtle {
  border-color: rgba(116, 198, 157, 0.3) !important;
}

[data-bs-theme="dark"] .bg-info-subtle {
  background-color: rgba(33, 150, 243, 0.15) !important;
  color: #90caf9 !important;
}

[data-bs-theme="dark"] .bg-warning-subtle {
  background-color: rgba(255, 193, 7, 0.15) !important;
  color: #ffe082 !important;
}

/* Contact page direct email box & badge */
#adminEmailInput {
  background-color: var(--bs-secondary-bg) !important;
  color: var(--bs-body-color) !important;
  border-color: var(--bs-border-color) !important;
  user-select: all;
}

[data-bs-theme="dark"] #adminEmailInput {
  background-color: #232b27 !important;
  color: #d8e4de !important;
  border-color: #3a4f44 !important;
}

[data-bs-theme="dark"] #copyEmailBtn {
  background-color: #232b27;
  color: #d8e4de;
  border-color: #3a4f44;
}

[data-bs-theme="dark"] #copyEmailBtn:hover {
  background-color: #2b3530;
  color: #52b788;
  border-color: #52b788;
}

.reply-time-badge {
  display: inline-flex;
  align-items: center;
  background-color: var(--bs-secondary-bg);
  color: var(--bs-body-secondary);
  border: 1px solid var(--bs-border-color);
  font-weight: 500;
}

[data-bs-theme="dark"] .reply-time-badge {
  background-color: #232b27 !important;
  color: #a0b2a6 !important;
  border-color: #3a4f44 !important;
}

/* Form required field asterisk */
.asteriskField {
  color: var(--bs-danger);
  margin-left: 0.2rem;
  font-weight: 700;
}
