/* Harta imobilelor cu risc seismic — stiluri pagină */

/* Hero: fundal desenat în CSS (grilă de străzi + unde seismice), fără imagine */
.harta-hero.gtco-cover {
  background-color: #161b23;
  background-image:
    radial-gradient(circle at 76% 42%, rgba(239, 34, 34, .35) 0, rgba(239, 34, 34, .12) 22%, rgba(239, 34, 34, 0) 46%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .05) 0, rgba(255, 255, 255, .05) 1px, transparent 1px, transparent 72px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .05) 0, rgba(255, 255, 255, .05) 1px, transparent 1px, transparent 72px),
    linear-gradient(118deg, #14181f 0%, #1c232d 55%, #262f3b 100%);
}
.harta-hero .overlay { background: rgba(15, 18, 24, .45); }

#harta-app { position: relative; }

.harta-intro { font-size: 15px; color: #555; margin: 0 0 14px; max-width: 900px; }
.harta-intro strong { color: #333; }

.clasa-count {
  font-size: 12px;
  font-weight: 600;
  color: #777;
  background: #eee;
  border-radius: 10px;
  padding: 2px 9px;
  vertical-align: middle;
  white-space: nowrap;
}

#harta-map {
  height: 68vh;
  min-height: 420px;
  width: 100%;
  border-radius: 6px;
  border: 1px solid #e2e2e2;
  z-index: 1; /* sub navigația site-ului */
}
#harta-map.harta-pinning,
#harta-map.harta-pinning .leaflet-container {
  cursor: crosshair;
}

/* Bara „nu găsiți imobilul" — deasupra hărții */
.harta-addpin-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 14px;
  color: #555;
}
.harta-locate.active {
  background: #118DF0;
  color: #fff;
}

/* Pin personalizat (imobil neincadrat in lista oficiala) */
.leaflet-div-icon.harta-custom-pin { background: transparent; border: none; }
.harta-popup .pin-remove {
  display: inline-block;
  margin-top: 4px;
  font-size: 12px;
  color: #ef2222;
  text-decoration: underline;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

/* Bara de filtre */
.harta-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}
.harta-filters .form-inline-group { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.harta-filters input[type="text"],
.harta-filters input[type="number"],
.harta-filters select {
  height: 36px;
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  background: #fff;
}
.harta-filters input[type="text"] { width: 240px; padding-right: 30px; }
.harta-filters input[type="number"] { width: 90px; }

/* Căutare cu sugestii */
.harta-search { position: relative; }
.harta-clear {
  position: absolute;
  right: 4px; top: 4px;
  width: 28px; height: 28px;
  border: none; background: none;
  color: #999; font-size: 18px; line-height: 1;
  cursor: pointer; border-radius: 50%;
}
.harta-clear:hover { color: #333; background: #f0f0f0; }
.harta-sugestii {
  position: absolute;
  top: calc(100% + 4px); left: 0;
  min-width: 100%; width: max-content; max-width: 90vw;
  background: #fff;
  border: 1px solid #d5d5d5;
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .15);
  z-index: 1100; /* peste hartă */
  max-height: 300px;
  overflow-y: auto;
  padding: 4px;
}
.harta-sug {
  display: flex; align-items: center; gap: 8px;
  width: 100%;
  border: none; background: none;
  text-align: left;
  padding: 8px 10px;
  font-size: 13px;
  border-radius: 4px;
  cursor: pointer;
}
.harta-sug:hover, .harta-sug.active { background: #f2f6fa; }
.harta-sug .dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; border: 1px solid rgba(0,0,0,.25); }
.harta-sug .adr { flex: 1 1 auto; color: #333; }
.harta-sug .sec { color: #999; font-size: 12px; flex: 0 0 auto; }

.harta-locate {
  height: 36px;
  padding: 6px 14px;
  border: 1px solid #118DF0;
  border-radius: 18px;
  background: #fff;
  color: #118DF0;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.harta-locate:hover { background: #118DF0; color: #fff; }
.harta-locate:disabled { opacity: .5; cursor: wait; }

/* Chip-uri clase de risc (dublează legenda) */
.harta-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.harta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid #d5d5d5;
  border-radius: 16px;
  background: #fff;
  font-size: 13px;
  line-height: 1.2;
  cursor: pointer;
  user-select: none;
  transition: opacity .15s, box-shadow .15s;
}
.harta-chip .dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(0,0,0,.25);
}
.harta-chip .cnt { color: #888; font-size: 12px; }
.harta-chip.off { opacity: .38; }
.harta-chip:hover { box-shadow: 0 1px 4px rgba(0,0,0,.15); }

.harta-meta { font-size: 13px; color: #777; margin: 10px 2px 0; }
.harta-meta a { text-decoration: underline; }
#harta-count { font-weight: 600; color: #444; }

.harta-reset { font-size: 13px; margin-left: 4px; cursor: pointer; text-decoration: underline; color: #ef2222; background: none; border: none; padding: 4px; }

/* Popup */
.harta-popup h4 { margin: 0 0 4px; font-size: 15px; font-weight: 700; }
.harta-popup .detalii { color: #777; font-style: italic; font-size: 12px; margin: 0 0 6px; }
.harta-popup .fapte { font-size: 13px; color: #444; margin: 0 0 6px; }
.harta-popup .badge-clasa {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
}
.harta-popup .istoric { font-size: 12px; color: #666; margin: 0 0 6px; }
.harta-popup .aprox { font-size: 11px; color: #999; font-style: italic; margin: 0 0 8px; }
.harta-popup .btn-cta {
  display: block;
  text-align: center;
  background: #ef2222;
  color: #fff !important;
  border-radius: 4px;
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.harta-popup .btn-cta:hover { background: #d31212; }

.harta-popup .gmaps {
  display: block;
  font-size: 12px;
  margin-bottom: 8px;
  color: #118DF0;
  text-decoration: underline;
}

/* Stare fără rezultate + notificări scurte, suprapuse pe hartă */
.harta-empty {
  position: absolute;
  inset: 0;
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(255, 255, 255, .82);
  text-align: center;
  padding: 20px;
}
.harta-empty p { font-size: 16px; color: #444; margin: 0; }
.harta-empty .btn-cta {
  background: #ef2222; color: #fff; border: none;
  border-radius: 4px; padding: 9px 18px;
  font-size: 14px; font-weight: 600; cursor: pointer;
}
.harta-empty .btn-cta:hover { background: #d31212; }

.harta-toast {
  position: absolute;
  left: 50%; bottom: 18px;
  transform: translateX(-50%);
  z-index: 900;
  background: rgba(30, 33, 40, .92);
  color: #fff;
  font-size: 13px;
  padding: 9px 16px;
  border-radius: 20px;
  max-width: 86%;
  text-align: center;
  transition: opacity .5s;
}
.harta-toast.out { opacity: 0; }

/* Legenda claselor, sub hartă */
.harta-legend-note { font-size: 12px; color: #888; margin-top: 8px; }

@media (max-width: 767px) {
  #harta-map { height: 58vh; min-height: 360px; }
  /* chip-urile devin un rând derulabil orizontal, ca să nu împingă harta */
  .harta-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    scrollbar-width: thin;
  }
  .harta-chip { flex: 0 0 auto; white-space: nowrap; }
  .harta-search { width: 100%; }
  .harta-filters input[type="text"] { width: 100%; }
  .harta-filters select { flex: 1 1 auto; min-width: 0; }
  .harta-filters .form-inline-group { width: 100%; }
}
