#body-background,
body {
  background: linear-gradient(180deg, #f5f7fa 0%, #eef1f6 100%);
  min-height: 100vh;
  padding-bottom: 2rem;
  color: #212529;
}

.card,
.navbar,
.list-group,
.form-control,
.btn {
  backdrop-filter: none;
}

.card-body .data-citation {
  font-size: 0.65rem;
  display: inline-block;
  margin-top: 0.75rem;
}

.card-head {
  text-align: center;
}

.site-navbar {
  background-color: #121c3d;
}

.site-navbar .container-xl {
  padding-left: 1rem;
  padding-right: 1rem;
}

.site-content {
  padding: 2rem 0 3rem;
}

.county-heading {
  margin: 2rem 0 1rem;
  font-weight: 600;
}

.people-graphic {
  width: 240px;
  max-width: 100%;
  height: auto;
}

.profile-photo {
  width: 100px;
  height: 100px;
  margin-right: 5px;
}

#map {
  width: 100%;
  height: 400px;
  min-height: 400px;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
  margin: 0 0 2rem 0;
}

#demographics {
  margin-bottom: 2rem;
}

#about,
#contact {
  margin-bottom: 2rem;
}

.footer-disclaimer {
  color: #4a4f59;
  font-size: 0.85rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  margin-top: 1.5rem;
}

.chatbot {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}

.chatbot-toggle {
  background-color: #121c3d;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.4rem;
  font-weight: 600;
  box-shadow: 0 0.5rem 1rem rgba(18, 28, 61, 0.25);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.chatbot-toggle:focus,
.chatbot-toggle:hover {
  background-color: #1b2d66;
  transform: translateY(-1px);
  outline: none;
}

.chatbot-window {
  width: 320px;
  max-width: calc(100vw - 3rem);
  background: #ffffff;
  border-radius: 0.75rem;
  border: 1px solid rgba(18, 28, 61, 0.12);
  box-shadow: 0 1.25rem 2.5rem rgba(18, 28, 61, 0.2);
  display: none;
  flex-direction: column;
}

.chatbot-window--open {
  display: flex;
}

.chatbot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(18, 28, 61, 0.1);
  background: linear-gradient(120deg, #121c3d, #1b2d66);
  color: #fff;
  border-top-left-radius: 0.75rem;
  border-top-right-radius: 0.75rem;
}

.chatbot-close {
  background: transparent;
  border: none;
  color: inherit;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.chatbot-messages {
  max-height: 280px;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chatbot-message {
  padding: 0.65rem 0.9rem;
  border-radius: 0.75rem;
  box-shadow: 0 0.5rem 1rem rgba(18, 28, 61, 0.08);
  font-size: 0.95rem;
  line-height: 1.4;
}

.chatbot-message--user {
  background: #121c3d;
  color: #fff;
  align-self: flex-end;
}

.chatbot-message--bot {
  background: #f1f3f9;
  color: #1b1e28;
  align-self: flex-start;
}

.chatbot-message p {
  margin: 0;
}

.chatbot-form {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem 1rem;
}

.chatbot-form .form-control {
  flex: 1;
}

.chatbot-form .btn {
  flex-shrink: 0;
}

@media (max-width: 575.98px) {
  .chatbot {
    right: 1rem;
    bottom: 1rem;
    width: calc(100vw - 2rem);
    align-items: stretch;
  }

  .chatbot-window {
    width: 100%;
    max-width: none;
  }
}

#usdaMap {
  width: 100%;
  height: 520px;
  min-height: 360px;
}

.map-wrapper {
  background-color: #ffffff;
}

.map-search-control {
  padding: 1rem;
  border-radius: 0.75rem;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0.75rem 2rem rgba(18, 28, 61, 0.16);
  border: 1px solid rgba(0, 0, 0, 0.08);
  width: 320px;
  max-width: calc(100vw - 3rem);
  z-index: 1100;
}

.map-search-control__form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.map-search-control__fields {
  display: flex;
  gap: 0.5rem;
}

.map-search-control__fields .form-control {
  flex: 1;
}

.map-search-control__fields .btn {
  white-space: nowrap;
  flex-shrink: 0;
}

.map-search-control input::placeholder {
  color: rgba(33, 37, 41, 0.65);
}

@media (max-width: 420px) {
  .map-search-control {
    width: 100%;
    max-width: calc(100vw - 2rem);
  }

  .map-search-control__fields {
    flex-direction: column;
  }

  .map-search-control__fields .btn {
    width: 100%;
  }
}

.leaflet-control-zoom {
  margin-bottom: 1.25rem;
  margin-right: 0.75rem;
}

.map-disclaimer {
  line-height: 1.4;
}

.leaflet-top.leaflet-left .leaflet-control-zoom {
  display: none;
}

.map-eligibility {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.map-eligibility__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.map-eligibility__swatch {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  flex-shrink: 0;
}

.map-eligibility__label {
  flex: 1;
  font-weight: 500;
  color: #212529;
}

.map-legend {
  padding: 1rem;
  border-radius: 0.75rem;
  max-width: 260px;
  font-size: 0.85rem;
}

.map-legend__title {
  color: #212529;
  text-align: center;
}

.map-legend__item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
}

.map-legend__item:last-child {
  margin-bottom: 0;
}

.map-legend__checkbox {
  margin: 0;
  flex-shrink: 0;
  cursor: pointer;
}

.map-legend .form-check-input {
  position: static;
}

.map-legend__swatch {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.map-legend__label {
  flex: 1;
  color: #212529;
}

.map-legend__actions {
  margin-top: 0.75rem;
}

.map-legend__actions .btn {
  width: 100%;
}
