/* Draft sold-homes map, styled to sit on the Union site. */

.review-banner {
  background: var(--cream-deep);
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.92rem;
}
.review-banner p {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0.55rem 1.25rem;
}

.sold-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--denim);
  color: #f7f3ec;
}
.sold-facts .fact b { font-variant-numeric: tabular-nums; }

.map-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  margin: 1.1rem 0 0.85rem;
}
.map-toolbar .filter-btn {
  appearance: none;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
.map-toolbar .filter-btn[aria-pressed="true"] {
  background: var(--denim-deep);
  color: #fff;
  border-color: var(--denim-deep);
}
.map-toolbar .filter-btn:hover { background: var(--cream); color: var(--ink); }
.map-toolbar .filter-btn[aria-pressed="true"]:hover { background: var(--ink); color: #fff; }
.map-legend {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.map-legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.swatch {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(27, 23, 20, 0.2);
}
.swatch-in { background: var(--red); }
.swatch-out { background: var(--denim-bright); }
.swatch-city { background: transparent; box-shadow: 0 0 0 2px var(--denim); border-radius: 2px; width: 0.95rem; height: 0.7rem; }

.map-frame {
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #d9e2ea;
}
#sold-map {
  width: 100%;
  height: min(72vh, 760px);
  min-height: 440px;
}

.price-pin {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.72rem;
  line-height: 1;
  color: #fff;
  padding: 0.28rem 0.42rem;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 6px 14px rgba(23, 40, 56, 0.28);
  border: 2px solid #fff;
}
.price-pin-in { background: var(--red); }
.price-pin-out { background: var(--denim-bright); }

.leaflet-popup-content-wrapper {
  border-radius: 14px;
  box-shadow: var(--shadow);
  font-family: var(--sans);
  color: var(--ink);
}
.leaflet-popup-content { margin: 0; min-width: 220px; max-width: 280px; }
.leaflet-popup-content p { margin: 0; }
.popup-card { padding: 0 0 0.7rem; }
.popup-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  background: var(--cream-deep);
  border-radius: 14px 14px 0 0;
}
.popup-card .popup-body { padding: 0.7rem 0.85rem 0; }
.popup-card .popup-price {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 560;
  letter-spacing: -0.03em;
  margin: 0;
}
.popup-card .popup-addr { font-weight: 600; margin: 0.15rem 0 0.35rem; }
.popup-card .popup-meta { font-size: 0.9rem; color: var(--ink-soft); }
.popup-card .popup-tag {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--red);
}
.popup-card .popup-tag.is-out { color: var(--denim-bright); }
.popup-card .popup-link {
  display: inline-block;
  margin-top: 0.55rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.source-line { font-size: 0.92rem; color: var(--ink-soft); }
.update-line { font-size: 0.92rem; color: var(--ink-soft); margin-top: 0.2rem; }

.sold-table-wrap { overflow-x: auto; margin-top: 1.4rem; }
.sold-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  background: #fff;
}
.sold-table th, .sold-table td {
  text-align: left;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.sold-table th {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
}
.sold-table tbody tr[hidden] { display: none; }
.sold-table .price { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sold-cta { margin-top: 2rem; }

.leaflet-container a { color: var(--denim); }
.leaflet-attribution-flag { display: none !important; }

@media (max-width: 800px) {
  .sold-facts { grid-template-columns: 1fr 1fr; }
  .map-legend { margin-left: 0; }
  #sold-map { min-height: 360px; height: 70vh; }
}
