/* ============================================================
   ImmoSpeurder – Adres Autocomplete & Gebouwdata
   Enkel geladen op /schatjouwwoning/
   ============================================================ */

/* --- Adresveld wrapper --- */
#adresAutocompleteWrapper {
  grid-column: 1 / -1;
  position: relative;
}

#adresAutocompleteWrapper > label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  font-size: 0.95em;
  color: #1a1a1a;
}

/* --- Invoerveld --- */
#adresInput {
  width: 100%;
  padding: 10px 14px;
  font-size: 1em;
  border: 1.5px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
  outline: none;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#adresInput:focus {
  border-color: #2d7a4f;
  box-shadow: 0 0 0 3px rgba(45, 122, 79, 0.12);
}

/* --- Dropdown suggesties --- */
#adresSuggestiesList {
  position: absolute;
  top: calc(100% - 1px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1.5px solid #2d7a4f;
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 280px;
  overflow-y: auto;
  z-index: 9999;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.13);
  display: none;
  margin: 0;
  padding: 0;
  list-style: none;
}

#adresSuggestiesList li {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.92em;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #222;
}

#adresSuggestiesList li:last-child {
  border-bottom: none;
}

#adresSuggestiesList li:hover,
#adresSuggestiesList li.actief {
  background: #edf6f1;
  color: #1a5c38;
}

/* Tweeregelige suggestie: straat + huisnummer (vet) boven, postcode + gemeente eronder */
#adresSuggestiesList .adres-pin {
  font-size: 1.1em;
  flex-shrink: 0;
}

#adresSuggestiesList .adres-tekst {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}

#adresSuggestiesList .adres-straat {
  font-weight: 600;
  color: #1a3d2b;
}

#adresSuggestiesList .adres-plaats {
  font-size: 0.85em;
  color: #6a7c70;
}

#adresSuggestiesList .adres-hint {
  font-weight: 400;
  font-size: 0.82em;
  color: #9aa39c;
}

/* --- Statusbalk onder het invoerveld --- */
#adresStatusBar {
  margin-top: 5px;
  font-size: 0.83em;
  min-height: 18px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #555;
}

#adresStatusBar.laden {
  color: #2d7a4f;
}

#adresStatusBar.ok {
  color: #1a5c38;
  font-weight: 600;
}

#adresStatusBar.fout {
  color: #c0392b;
}

/* --- Laadanimatie (spinner) --- */
.immo-spinner {
  width: 13px;
  height: 13px;
  border: 2px solid #ccc;
  border-top-color: #2d7a4f;
  border-radius: 50%;
  animation: immoSpin 0.7s linear infinite;
  display: inline-block;
  flex-shrink: 0;
}

@keyframes immoSpin {
  to { transform: rotate(360deg); }
}

/* --- Infobanner met gevonden gebouwdata --- */
#immoBanner {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #f0f7f3, #e8f4ee);
  border: 1.5px solid #2d7a4f;
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 0.88em;
  color: #1a3d2b;
  display: none;
}

#immoBanner .banner-title {
  font-weight: 700;
  font-size: 0.95em;
  margin-bottom: 10px;
}

#immoBanner .banner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px 16px;
}

#immoBanner .banner-item {
  display: flex;
  flex-direction: column;
}

#immoBanner .banner-label {
  font-size: 0.76em;
  color: #4a7c5f;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1px;
}

#immoBanner .banner-value {
  font-weight: 700;
  color: #0d3320;
  font-size: 1em;
}

#immoBanner .banner-note {
  margin-top: 10px;
  font-size: 0.78em;
  color: #5a7a65;
  border-top: 1px solid #b8d9c4;
  padding-top: 8px;
}
