/* Business Lead Finder — Stylesheet */

#blf-app {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px 40px;
  color: #1a1a1a;
}

/* Header */
.blf-header h2 {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 6px;
}
.blf-subtitle {
  font-size: 14px;
  color: #666;
  margin: 0 0 24px;
}

/* Search bar */
.blf-search-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
  background: #f7f7f5;
  border: 1px solid #e5e5e0;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
}

.blf-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.blf-field label {
  font-size: 12px;
  font-weight: 500;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

#blf-app input[type="text"],
#blf-app select {
  height: 38px;
  border: 1px solid #d0d0c8;
  border-radius: 6px;
  padding: 0 10px;
  font-size: 14px;
  background: #fff;
  color: #1a1a1a;
  outline: none;
  transition: border-color 0.15s;
}
#blf-app input[type="text"]:focus,
#blf-app select:focus {
  border-color: #888;
}
#blf-zip    { width: 120px; }
#blf-radius { width: 110px; }
#blf-category { width: 190px; }

#blf-search-btn {
  height: 38px;
  padding: 0 22px;
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s;
}
#blf-search-btn:hover   { opacity: 0.82; }
#blf-search-btn:disabled { opacity: 0.5; cursor: default; }

/* Error */
.blf-error {
  background: #fff1f0;
  border: 1px solid #fca5a5;
  color: #991b1b;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 16px;
}

/* Loading */
.blf-loading {
  text-align: center;
  padding: 40px 20px;
  color: #555;
  font-size: 15px;
}
.blf-loading small { color: #999; font-size: 13px; }
.blf-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e0e0e0;
  border-top-color: #1a1a1a;
  border-radius: 50%;
  animation: blf-spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes blf-spin { to { transform: rotate(360deg); } }

/* Stats */
.blf-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.blf-stat-card {
  background: #f7f7f5;
  border: 1px solid #e5e5e0;
  border-radius: 8px;
  padding: 14px 16px;
}
.blf-stat-num   { font-size: 22px; font-weight: 600; color: #1a1a1a; }
.blf-stat-label { font-size: 12px; color: #777; margin-top: 2px; }

/* Filter chips */
.blf-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.blf-filter-label { font-size: 13px; color: #777; margin-right: 4px; }
.blf-chip {
  padding: 5px 14px;
  border: 1px solid #d0d0c8;
  border-radius: 20px;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
  color: #444;
  transition: all 0.12s;
}
.blf-chip:hover  { border-color: #888; }
.blf-chip.active { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }

/* Results header */
.blf-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
  color: #555;
}
#blf-export-btn {
  padding: 5px 14px;
  border: 1px solid #d0d0c8;
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
  color: #333;
}
#blf-export-btn:hover { background: #f7f7f5; }

/* Cards */
.blf-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  background: #fff;
  border: 1px solid #e5e5e0;
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 10px;
  transition: border-color 0.12s;
}
.blf-card:hover { border-color: #bbb; }

.blf-card-name {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 5px;
}
.blf-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 13px;
  color: #666;
}
.blf-card-meta a {
  color: #2563eb;
  text-decoration: none;
}
.blf-card-meta a:hover { text-decoration: underline; }

.blf-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  min-width: 130px;
}

/* Badges */
.blf-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.blf-badge-red    { background: #fee2e2; color: #991b1b; }
.blf-badge-amber  { background: #fef3c7; color: #92400e; }
.blf-badge-green  { background: #dcfce7; color: #166534; }
.blf-badge-gray   { background: #f1f1ee; color: #777; }

/* Score bar */
.blf-score-wrap  { width: 110px; }
.blf-score-label { font-size: 11px; color: #888; margin-bottom: 4px; text-align: right; }
.blf-score-bar   { height: 5px; border-radius: 3px; background: #e5e5e0; overflow: hidden; }
.blf-score-fill  { height: 100%; border-radius: 3px; transition: width 0.6s ease; }
.blf-fill-red    { background: #ef4444; }
.blf-fill-amber  { background: #f59e0b; }
.blf-fill-green  { background: #22c55e; }
.blf-fill-gray   { background: #d0d0c8; }

.blf-no-site-note { font-size: 11px; color: #aaa; text-align: right; }

@keyframes blf-pulse { 0%,100%{opacity:.3} 50%{opacity:1} }

/* Action buttons */
.blf-card-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.blf-btn-sm {
  font-size: 12px;
  padding: 4px 10px;
  border: 1px solid #d0d0c8;
  border-radius: 5px;
  background: #fff;
  color: #333;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.1s;
}
.blf-btn-sm:hover { background: #f7f7f5; }

/* Empty / no results */
.blf-empty, .blf-no-results {
  text-align: center;
  padding: 48px 20px;
  color: #999;
  font-size: 14px;
}

/* Responsive */
@media (max-width: 640px) {
  .blf-stats { grid-template-columns: repeat(2, 1fr); }
  .blf-card  { grid-template-columns: 1fr; }
  .blf-card-right { align-items: flex-start; flex-direction: row; flex-wrap: wrap; }
  #blf-category { width: 100%; }
}
