/* Map actions stay reachable on a small screen, including browser safe areas. */
.estate-property-details,
.leaflet-container a.estate-property-details {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 12px;
  margin-top: 8px;
  border-radius: 7px;
  background: #246b57;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  touch-action: manipulation;
}
.estate-property-details:hover,
.leaflet-container a.estate-property-details:hover { background: #174c3d; color: #fff; }
.estate-property-details:focus-visible,
.estate-map-card:focus-visible,
.estate-selection-close:focus-visible { outline: 3px solid #c58a2e; outline-offset: 2px; }
.estate-map-card { contain-intrinsic-size: auto 164px; }
.estate-map-card.border-primary { box-shadow: inset 0 0 0 2px #246b57 !important; }
.estate-property-popup-body { width: 240px; max-width: 100%; }
.estate-property-popup .leaflet-popup-content { margin: 20px 14px 12px; }
.estate-property-popup .leaflet-popup-close-button { min-width: 32px; min-height: 32px; }
.estate-map-selection { display: none; }

@media (max-width: 768px) {
  .estate-map-split { height: auto !important; overflow: visible !important; }
  #estateMapCards { max-height: 42vh; max-height: 42svh; overscroll-behavior-y: contain; }
  #estateMapContainer { flex: none !important; height: 62vh; height: 62svh; min-height: 340px; }
  .estate-map-card .card-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .estate-map-card .card-body { padding: 10px !important; }
  .estate-property-popup-body { width: 220px; }
  .estate-property-popup-body > img { height: 64px !important; }
  .estate-map-selection:not([hidden]) {
    display: block;
    position: fixed;
    z-index: 1050;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px max(14px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
    background: #fff;
    color: #173a33;
    border-top: 2px solid #246b57;
    box-shadow: 0 -4px 20px #143a3326;
  }
  .estate-selection-title {
    padding-right: 40px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .estate-selection-price { margin-top: 4px; font-size: 15px; font-weight: 700; }
  .estate-selection-close { position: absolute; z-index: 2; top: 2px; right: 5px; width: 44px; height: 44px; border: 0; background: transparent; color: #36544e; font-size: 28px; }
  .estate-map-has-selection .ad-floating-whatsapp { bottom: calc(var(--estate-selection-height, 160px) + 12px) !important; }
  body.estate-map-has-selection { padding-bottom: var(--estate-selection-height, 160px); }
}
@media (max-width: 768px) and (max-height: 500px) {
  .estate-selection-title { -webkit-line-clamp: 1; }
  .estate-map-selection:not([hidden]) { padding-top: 6px; padding-bottom: max(6px, env(safe-area-inset-bottom)); }
}
