/* css/address-answer.css — Address-answer mode (school-zone lookup UI). */

#address-answer-container {
  position: absolute;
  /* Sit clear of the project-title pill that floats at the top centre of
     the map. The pill is roughly 56-64px tall depending on text length. */
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  width: min(460px, calc(100vw - 24px));
  pointer-events: none; /* children re-enable */
}

#address-answer-search,
#address-answer-result {
  pointer-events: auto;
}

/* Mapbox Geocoder restyle — wider, lifted off the map */
#address-answer-search .mapboxgl-ctrl-geocoder {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
  border-radius: 10px;
  font-size: 0.95rem;
}

#address-answer-search .mapboxgl-ctrl-geocoder--input {
  height: 44px;
  padding-left: 42px;
  padding-right: 36px;
  font-size: 1rem;
}

#address-answer-search .mapboxgl-ctrl-geocoder--icon-search {
  top: 12px;
  left: 12px;
  width: 22px;
  height: 22px;
}

#address-answer-search .mapboxgl-ctrl-geocoder--button {
  top: 8px;
}

/* Result panel — keep it small. The whole answer should fit at a glance. */
#address-answer-result {
  margin-top: 6px;
}

.aa-result {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.14);
  padding: 8px 12px;
  line-height: 1.35;
}

.aa-result-address {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 4px;
  /* Sentence case rather than the SCREAMING uppercase Mapbox returns. */
  text-transform: none;
}

.aa-result-outside .aa-result-headline {
  font-size: 0.9rem;
  font-weight: 600;
  color: #b45309;
  margin: 0;
}

.aa-result-outside .aa-result-headline i {
  margin-right: 4px;
}

.aa-zone-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.aa-zone-list li {
  display: grid;
  grid-template-columns: minmax(110px, max-content) 1fr;
  gap: 2px 12px;
  padding: 4px 0;
  font-size: 0.9rem;
  border-top: 1px solid #f1f5f9;
}

.aa-zone-list li:first-child {
  border-top: none;
  padding-top: 0;
}

.aa-zone-list li:last-child {
  padding-bottom: 0;
}

.aa-zone-label {
  font-weight: 600;
  color: #475569;
}

.aa-zone-value {
  color: #0f172a;
  word-break: break-word;
}

@media (max-width: 600px) {
  #address-answer-container {
    top: 64px;
    width: calc(100vw - 16px);
  }
  #address-answer-search .mapboxgl-ctrl-geocoder--input {
    height: 40px;
    font-size: 0.95rem;
  }
}
