/* style.css */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #ffffff;
  color: #111827;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

header {
  background-color: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 24px;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: #1a56db;
}

.logo span {
  color: #6b7280;
}

.tagline {
  font-size: 0.875rem;
  color: #6b7280;
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

.hero {
  max-width: 640px;
  margin: 0 auto;
  padding-top: 64px;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.2;
}

.hero-sub {
  font-size: 1.125rem;
  color: #4b5563;
  margin-bottom: 32px;
}

.search-wrap {
  position: relative;
  width: 100%;
  margin-bottom: 16px;
}

.search-box {
  display: flex;
  gap: 8px;
  width: 100%;
}

#searchInput {
  flex-grow: 1;
  height: 52px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 0 16px;
  font-size: 16px;
  font-family: 'Inter', sans-serif;
  transition: all 150ms ease;
  outline: none;
  min-width: 0;
}

#searchInput:focus {
  border-color: #1a56db;
  box-shadow: 0 0 0 4px rgba(26, 86, 219, 0.1);
}

#searchBtn {
  height: 52px;
  background-color: #1a56db;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 0 24px;
  font-size: 16px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 150ms ease;
  flex-shrink: 0;
}

#searchBtn:hover {
  background-color: #1e40af;
}

.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  margin-top: 4px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  z-index: 50;
  overflow: hidden;
}

.autocomplete-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f3f4f6;
  text-align: left;
  transition: background-color 150ms ease;
}

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

.autocomplete-item:hover, .autocomplete-item.active {
  background-color: #f3f4f6;
}

.source-note {
  font-size: 0.875rem;
  color: #9ca3af;
  margin-top: 16px;
}

.chips-section {
  max-width: 640px;
  margin: 32px auto 0;
  text-align: center;
}

.chips-label {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 12px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.chip {
  background-color: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  padding: 6px 16px;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 150ms ease;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.chip:hover {
  background-color: #dbeafe;
}

#results {
  max-width: 800px;
  margin: 48px auto 0;
}

.result-header {
  margin-bottom: 24px;
}

.result-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.info-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
}

.zone-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Zone badge colors */
.zone-huda { background-color: #dbeafe; color: #1e40af; }
.zone-colony { background-color: #dcfce7; color: #166534; }
.zone-village { background-color: #f3e8ff; color: #6b21a8; }
.zone-licensed { background-color: #fef9c3; color: #854d0e; }
.zone-industrial { background-color: #fee2e2; color: #991b1b; }
.zone-road { background-color: #f3f4f6; color: #374151; }

.notes-text {
  font-size: 0.875rem;
  color: #6b7280;
}

.cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.card {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  position: relative;
  border: 1px solid #f3f4f6;
}

.card-residential {
  border-left: 4px solid #1a56db;
}

.card-commercial {
  border-left: 4px solid #374151;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: #4b5563;
}

.rate-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.rate-value {
  font-size: 2rem;
  font-weight: 700;
  user-select: none;
}

.card-residential .rate-value {
  color: #1a56db;
}

.card-commercial .rate-value {
  color: #374151;
}

.per-sqft {
  font-size: 0.9rem;
  color: #6b7280;
  margin-bottom: 16px;
}

.rate-details {
  border-top: 1px solid #f3f4f6;
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.old-rate {
  font-size: 0.875rem;
  color: #6b7280;
}

.pct-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.pct-low { background-color: #dcfce7; color: #166534; }
.pct-med { background-color: #fef9c3; color: #854d0e; }
.pct-high { background-color: #fee2e2; color: #991b1b; }

.disclaimer-box {
  background-color: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.875rem;
  color: #92400e;
}

#noResults {
  max-width: 640px;
  margin: 48px auto 0;
}

.no-results-box {
  text-align: center;
  padding: 48px 24px;
  background-color: #f9fafb;
  border-radius: 12px;
  border: 1px dashed #d1d5db;
}

.no-results-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.no-results-sub {
  color: #6b7280;
  margin-bottom: 24px;
}

#suggestions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.suggestion-item {
  background: none;
  border: none;
  color: #1a56db;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 8px;
  min-height: 44px;
}

#rateLimitMsg {
  max-width: 640px;
  margin: 24px auto 0;
}

.limit-box {
  background-color: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  padding: 16px;
  color: #991b1b;
  text-align: center;
  font-weight: 500;
}

footer {
  border-top: 1px solid #e5e7eb;
  padding: 24px;
  text-align: center;
  color: #6b7280;
  font-size: 0.875rem;
  margin-top: auto;
}

[hidden] {
  display: none !important;
}

@media (max-width: 600px) {
  .search-box {
    flex-direction: column;
  }
  
  #searchBtn {
    width: 100%;
  }
  
  .cards-grid {
    grid-template-columns: 1fr;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
}
