/* =====================================================
   Fresh Leads Handler — Frontend Styles
   ===================================================== */

/* ---------- Wrapper ---------- */
.flh-wrapper {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
  color: #1e293b;
}

/* ---------- Search Box ---------- */
.flh-search-box {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 60%, #3b82f6 100%);
  border-radius: 16px;
  padding: 36px 32px;
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.25);
  margin-bottom: 32px;
}

.flh-search-header {
  text-align: center;
  margin-bottom: 28px;
}

.flh-logo-icon {
  font-size: 36px;
  display: block;
  margin-bottom: 8px;
}

.flh-search-title {
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 6px;
}

.flh-search-subtitle {
  color: rgba(255,255,255,0.75);
  font-size: 15px;
  margin: 0;
}

/* ---------- Form Fields ---------- */
.flh-form {
  width: 100%;
}

.flh-fields {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.flh-field-group {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.flh-field-btn {
  flex: 0 0 auto;
  min-width: 140px;
}

.flh-label {
  color: rgba(255,255,255,0.9);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.flh-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 2px solid transparent;
  font-size: 15px;
  background: rgba(255,255,255,0.95);
  color: #1e293b;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.flh-input:focus {
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.3);
}

.flh-input::placeholder {
  color: #94a3b8;
}

/* ---------- Search Button ---------- */
.flh-btn-search {
  width: 100%;
  padding: 12px 24px;
  background: #fff;
  color: #2563eb;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  white-space: nowrap;
}

.flh-btn-search:hover:not(:disabled) {
  background: #f0f4ff;
  box-shadow: 0 6px 18px rgba(0,0,0,0.2);
  transform: translateY(-1px);
}

.flh-btn-search:active:not(:disabled) {
  transform: translateY(0);
}

.flh-btn-search:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* ---------- Error ---------- */
.flh-error-area {
  margin-bottom: 20px;
}

.flh-error-msg {
  background: #fff1f2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 14px;
}

/* ---------- Results Meta Bar ---------- */
.flh-results-area {
  margin-bottom: 24px;
}

.flh-results-meta {
  margin-bottom: 16px;
}

.flh-meta-text {
  font-size: 14px;
  color: #64748b;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.flh-cache-badge,
.flh-fresh-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
}

.flh-cache-badge {
  background: #f1f5f9;
  color: #64748b;
}

.flh-fresh-badge {
  background: #dcfce7;
  color: #15803d;
}

/* ---------- Grid / List Layout ---------- */
.flh-grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.flh-list-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---------- Card ---------- */
.flh-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: box-shadow 0.25s, transform 0.25s;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
}

.flh-card:hover {
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.14);
  transform: translateY(-3px);
}

/* List layout — horizontal card */
.flh-list-layout .flh-card {
  flex-direction: row;
}

.flh-list-layout .flh-card-img {
  width: 140px;
  min-height: 140px;
  flex-shrink: 0;
  border-radius: 0;
}

/* ---------- Card Image ---------- */
.flh-card-img {
  height: 170px;
  background-size: cover;
  background-position: center;
  background-color: #e2e8f0;
}

.flh-card-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  background: linear-gradient(135deg, #e0e7ff, #dbeafe);
}

/* ---------- Card Body ---------- */
.flh-card-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.flh-category-tag {
  display: inline-block;
  background: #eff6ff;
  color: #2563eb;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 9px;
  border-radius: 99px;
  width: fit-content;
}

.flh-card-name {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  margin: 4px 0 0;
  line-height: 1.3;
}

/* ---------- Rating Row ---------- */
.flh-rating-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 2px 0;
}

.flh-stars {
  display: inline-flex;
  gap: 1px;
}

.flh-star {
  font-size: 16px;
  line-height: 1;
}

.flh-star.full {
  color: #f59e0b;
}

.flh-star.half {
  color: #f59e0b;
  opacity: 0.6;
}

.flh-star.empty {
  color: #e2e8f0;
}

.flh-rating-num {
  font-size: 14px;
  font-weight: 700;
  color: #f59e0b;
}

.flh-reviews-count {
  font-size: 12px;
  color: #94a3b8;
}

/* ---------- Address ---------- */
.flh-card-address {
  font-size: 13px;
  color: #64748b;
  margin: 4px 0 0;
  line-height: 1.4;
}

/* ---------- Links / Actions ---------- */
.flh-card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.flh-contact-link,
.flh-maps-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.flh-contact-link {
  background: #f8fafc;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.flh-contact-link:hover {
  background: #e0e7ff;
  color: #2563eb;
  border-color: #bfdbfe;
}

.flh-website-link {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.flh-website-link:hover {
  background: #dbeafe;
  color: #1d4ed8;
}

.flh-maps-link {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.flh-maps-link:hover {
  background: #dcfce7;
  color: #15803d;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .flh-search-box {
    padding: 24px 18px;
  }

  .flh-search-title {
    font-size: 20px;
  }

  .flh-fields {
    flex-direction: column;
  }

  .flh-field-group,
  .flh-field-btn {
    min-width: 100%;
  }

  .flh-grid-layout {
    grid-template-columns: 1fr;
  }

  .flh-list-layout .flh-card {
    flex-direction: column;
  }

  .flh-list-layout .flh-card-img {
    width: 100%;
    min-height: 160px;
  }
}
