/* ── Native Bug Finder Styles v1.2.0 ── */

.nbf-wrap {
   font-family: 'Josefin Sans', sans-serif;
  max-width: 940px;
  margin: 0 auto;
  padding: 2rem 1rem;
  color: #1a1a1a;
}

/* ── Header ── */
.nbf-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: #F0F5FA;

}
.nbf-subtitle {
  font-size: 0.95rem;
  color: #F0F5FA;
  margin: 0 0 1.5rem;
}

/* ── Search row ── */
.nbf-search-row {
  display: flex;
  gap: 10px;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.nbf-zip-input {
  height: 42px;
  padding: 0 14px;
  font-size: 1rem;
  border: 1.5px solid #ccc;
  border-radius: 8px;
  outline: none;
  width: 200px;
  transition: border-color 0.15s;
  background: #fff;
  color: #111;
}
.nbf-zip-input:focus { border-color: #F0F5FA; }
.nbf-search-btn {
  height: 42px;
  padding: 0 22px;
  font-size: 0.95rem;
  font-weight: 500;
  background: #1D9E75;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.nbf-search-btn:hover { background: #0F6E56; }

/* ── Radius row ── */
.nbf-radius-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
	 color: #F0F5FA;
}
.nbf-radius-lbl {
  font-size: 0.9rem;
  color: #F0F5FA;
  white-space: nowrap;
}
.nbf-radius-slider {
  flex: 1;
  min-width: 140px;
  max-width: 260px;
  cursor: pointer;
  /* Reset browser defaults that cause 3D look */
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: #ddd;
  border-radius: 2px;
  outline: none;
  border: none;
  box-shadow: none;
}
.nbf-radius-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1D9E75;
  cursor: pointer;
  border: none;
  box-shadow: none;
  margin-top: 0;
}
.nbf-radius-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1D9E75;
  cursor: pointer;
  border: none;
  box-shadow: none;
}
.nbf-radius-slider::-webkit-slider-runnable-track {
  height: 4px;
  background: #ddd;
  border-radius: 2px;
  border: none;
  box-shadow: none;
}
.nbf-radius-slider::-moz-range-track {
  height: 4px;
  background: #ddd;
  border-radius: 2px;
  border: none;
}
.nbf-radius-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #F0F5FA;
  min-width: 48px;
}

/* ── Invasive toggle ── */
.nbf-toggle-row {
  margin-bottom: 1rem;
}
.nbf-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: #B27092;
  cursor: pointer;
  user-select: none;
}
.nbf-toggle-label input[type="checkbox"] {
  display: none;
}
.nbf-toggle-track {
  width: 40px;
  height: 22px;
  background: #ccc;
  border-radius: 999px;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}
.nbf-toggle-track::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform 0.2s;
}
.nbf-invasive-toggle:checked + .nbf-toggle-track {
  background: #D85A30;
}
.nbf-invasive-toggle:checked + .nbf-toggle-track::after {
  transform: translateX(18px);
}
.nbf-invasive-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  background: #FAECE7;
  color: #993C1D;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ── Filter groups ── */
.nbf-filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 1.25rem;
}
.nbf-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.nbf-filter-group-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #1D1505;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  min-width: 80px;
}
.nbf-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.nbf-pill {
  height: 32px;
  padding: 0 14px;
  font-size: 0.85rem;
  border-radius: 999px;
  border: 1.5px solid #ddd;
  background: #fff;
  color: #444;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  white-space: nowrap;
}
.nbf-pill:hover {
  border-color: #aaa;
  background: #f5f5f5;
}
.nbf-pill.active {
  background: #E1F5EE;
  border-color: #1D9E75;
  color: #085041;
  font-weight: 500;
}

/* ── Status ── */
.nbf-status {
  font-size: 0.9rem;
  margin-bottom: 1rem;
  min-height: 1.4em;
}
.nbf-status--loading { color: #B27092; font-style: italic; }
.nbf-status--success { color: #97A838; }
.nbf-status--error   { color: #a32d2d; }

/* ── Card grid ── */
.nbf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

/* ── Card ── */
.nbf-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.15s;
  display: flex;
  flex-direction: column;
}
.nbf-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.09); }

/* Card image area — relative so badge can overlay */
.nbf-card-img {
  width: 100%;
  height: 140px;
  background: #f5f7f5;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}
.nbf-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.nbf-card-emoji {
  font-size: 3rem;
  line-height: 1;
}

/* ── Conservation badge (overlaid bottom-left of photo) ── */
.nbf-conservation-badge {
  position: absolute;
  bottom: 7px;
  left: 8px;
}
.nbf-conservation-badge span {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  /* color and bg set inline from STATUS_CONFIG */
}

/* ── Card body ── */
.nbf-card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.nbf-common {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: #111;
  margin-bottom: 2px;
  line-height: 1.3;
}
.nbf-sci {
  display: block;
  font-size: 0.8rem;
  color: #777;
  font-style: italic;
  margin-bottom: 8px;
}
.nbf-endemic-note {
  font-size: 0.78rem;
  color: #534AB7;
  font-weight: 500;
  margin-bottom: 8px;
}

/* ── Tags ── */
.nbf-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}
.nbf-tag {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
/* Type */
.t-insect     { background: #E6F1FB; color: #0C447C; }
.t-spider     { background: #EEEDFE; color: #3C3489; }
.t-snail      { background: #F1EFE8; color: #444441; }
.t-worm       { background: #FAEEDA; color: #633806; }
.t-milli      { background: #F1EFE8; color: #2C2C2A; }
.t-centi      { background: #FAECE7; color: #712B13; }
.t-isopod     { background: #E6F1FB; color: #185FA5; }
/* Ecology */
.t-pollinator { background: #FAEEDA; color: #412402; }
.t-venomous   { background: #FCEBEB; color: #791F1F; }
.t-aquatic    { background: #E6F1FB; color: #042C53; }
.t-decomposer { background: #F1EFE8; color: #085041; }
.t-nocturnal  { background: #2C2C2A; color: #D3D1C7; }
/* Special */
.t-endemic    { background: #EEEDFE; color: #26215C; }

/* ── iNaturalist link ── */
.nbf-link {
  font-size: 0.8rem;
  color: #1D9E75;
  text-decoration: none;
  margin-top: auto;
}
.nbf-link:hover { text-decoration: underline; }

/* ── Load more ── */
.nbf-load-more {
  display: block;
  margin: 1.75rem auto 0;
  height: 42px;
  padding: 0 28px;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1.5px solid #1D9E75;
  border-radius: 8px;
  background: #fff;
  color: #1D9E75;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.nbf-load-more:hover { background: #E1F5EE; }

/* ── Empty state ── */
.nbf-empty {
  padding: 2rem;
  text-align: center;
  color: #777;
  font-size: 0.95rem;
  border: 1.5px dashed #ddd;
  border-radius: 10px;
}

/* ── Attribution ── */
.nbf-attribution {
  font-size: 0.8rem;
  color: #999;
  margin-top: 1.5rem;
  text-align: right;
}
.nbf-attribution a { color: #1D9E75; text-decoration: none; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .nbf-grid {
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 12px;
  }
  .nbf-filter-group { flex-direction: column; align-items: flex-start; }
  .nbf-filter-group-label { min-width: unset; }
  .nbf-zip-input, .nbf-search-btn { width: 100%; }
}
