/* Leaflet Map Visual Styling */
.map-view-container {
  position: sticky;
  top: 5.5rem;
  height: 680px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
  background-color: #E2E8F0;
  z-index: 10;
}

#leaflet-map {
  width: 100%;
  height: 100%;
}

/* Remove Leaflet's default white box & border on divIcon */
.custom-map-icon {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.map-price-badge {
  background: #064E3B !important;
  /* Rich Dark Emerald */
  color: #FFFFFF !important;
  /* Ultra sharp white text */
  padding: 0.35rem 0.75rem;
  border-radius: 50px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;

  font-size: 0.82rem;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  border: 2px solid #F59E0B;
  /* Vibrant Gold border for high visibility */
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-align: center;
  line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.Sarmayadar-map-animated-icon {
  display: inline-block;
  font-size: 0.92rem;
  animation: SarmayadarBadgePulse 1.8s infinite ease-in-out;
  transform-origin: center;
}

@keyframes SarmayadarBadgePulse {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 0 2px rgba(245, 158, 11, 0.6));
  }

  50% {
    transform: scale(1.35) rotate(-6deg);
    filter: drop-shadow(0 0 8px rgba(245, 158, 11, 1));
  }

  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 2px rgba(245, 158, 11, 0.6));
  }
}

.map-price-badge:hover {
  transform: scale(1.12);
  background: #047857 !important;
  border-color: #FBBF24;
}

/* Custom Leaflet Popup */
.leaflet-popup-content-wrapper {
  padding: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.leaflet-popup-content {
  margin: 0 !important;
  width: 240px !important;
}

.map-popup-card {
  display: flex;
  flex-direction: column;
}

.map-popup-img {
  width: 100%;
  height: 110px;
  object-fit: cover;
}

.map-popup-info {
  padding: 0.75rem;
}

.map-popup-price {
  font-weight: 800;
  color: var(--primary-emerald);
  font-size: 1rem;
}

.map-popup-location {
  font-size: 0.73rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

/* Ultra Compact Viewports (<= 360px & 317px width, <= 560px height) */
@media (max-width: 360px) {
  .map-view-container {
    height: calc(100dvh - 120px) !important;
    max-height: 400px !important;
    border-radius: 8px !important;
  }

  .map-price-badge {
    padding: 0.2rem 0.45rem !important;
    font-size: 0.7rem !important;
  }

  .leaflet-popup-content {
    width: 190px !important;
  }

  .map-popup-img {
    height: 80px !important;
  }

  .map-popup-info {
    padding: 0.5rem !important;
  }

  .map-popup-price {
    font-size: 0.88rem !important;
  }

  .map-popup-title {
    font-size: 0.75rem !important;
  }
}