/* frontend/style.css */
/* body {
  font-family: "Fira Mono", monospace;
  background: #f8f8f8;
  padding: 2rem;
} */
body{  
  font-family: "Inconsolata", monospace;
  font-style: normal;
  background: #f8f8f8;
  padding: 2rem;
}

.slider {
  width: 100%;
  margin-bottom: 1rem;
}

.city-card {
  background: white;
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 0.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  font-size: 1rem;
  text-transform: uppercase;
}
h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
}

label {
  font-size: 1rem;
  font-weight: 400;
  display: block;
  margin-top: 1rem;
  text-transform: uppercase;
  margin-bottom: .1rem;
}

.city-card strong {
  font-size: 1.25rem;
  display: block;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  font-weight: 400;
  text-decoration: underline;
}
.bar {
  height: 8px;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.bg-weather {
  background-color: #63e4b2;
}

.bg-afford {
  background-color:#5c87de;
}

.bg-opportunity {
  background-color: #f54881;
}

.bg-edu {
  background-color: #f5e055;
}
.toggle-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.toggle-label {
  font-size: 1rem;
  padding-top:9px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 20px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  top: 0; left: 0;
  right: 0; bottom: 0;
  background-color: #ccc;
  border-radius: 24px;
  transition: .3s;
}

.toggle-slider:before {
  content: "";
  position: absolute;
  height: 15px;
  width: 15px;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgb(77, 122, 129);
  border-radius: 50%;
  transition: .3s;
}

input:checked + .toggle-slider {
  background-color: #a9edc6;
}

input:checked + .toggle-slider:before {
  transform: translateY(-50%) translateX(20px);
}

/* Layout containers */
.container {
  display: flex;
  gap: 2rem;
  padding: 1rem;
  flex-wrap: wrap;
}

/* Sidebar on left */
.sidebar {
  width: 25%;
  flex-shrink: 0;
  position: sticky;
  top: 2rem;
  align-self: flex-start;
  background: #ffffff;
  padding: 1rem;
  border-radius: 0.75rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Right column city cards */
.main-content {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(25%, 1fr));
  gap: 1rem;
}

/* Region dropdown */
.region-select {
  width: 100%;
  padding: 0.5rem;
  font-size: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 4px;
  border: 1px solid #ccc;
}

/* Budget input */
.budget-input {
  width: 100%;
  padding: 0.5rem;
  font-size: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 4px;
  border: 1px solid #ccc;
  box-sizing: border-box;
  font-family: inherit;
}

/* Fetch state banners */
.fetch-error {
  grid-column: 1 / -1;
  background: #fde8e8;
  border: 1px solid #f5a0a0;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  color: #9b1c1c;
}

.fetch-loading {
  grid-column: 1 / -1;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  color: #666;
  text-transform: uppercase;
}

/* Budget notice banner */
.budget-notice {
  grid-column: 1 / -1;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  color: #856404;
}

/* City card clickable cursor */
.city-card {
  cursor: pointer;
}
.city-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Neighborhood panel overlay */
.panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 100;
  display: flex;
  justify-content: flex-end;
}

/* Slide-in drawer */
.neighborhood-panel {
  background: #fff;
  width: 420px;
  max-width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 1.5rem;
  box-shadow: -4px 0 16px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  margin: 0;
}

.panel-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: #555;
  padding: 0.25rem 0.5rem;
}

.panel-loading,
.panel-empty {
  font-size: 0.95rem;
  color: #666;
  text-transform: uppercase;
}

/* Individual ZIP card */
.neighborhood-card {
  background: #f8f8f8;
  border-radius: 0.5rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.neighborhood-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.zip-label {
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
}

.monthly-cost {
  font-size: 0.9rem;
  color: #444;
}

/* Affiliate link buttons */
.affiliate-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.aff-btn {
  padding: 0.3rem 0.75rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #fff;
}

.aff-btn.zillow  { background: #006aff; }
.aff-btn.redfin  { background: #cc0000; }
.aff-btn.realtor { background: #000; }

/* Responsive fallback for mobile */
@media (max-width: 768px) {
  /* manually adjust center on mobile  */
  body{
    padding-left: .5rem;
  }
  .container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    position: static;
  }

  .main-content {
    grid-template-columns: 1fr;
  }
}
