* {
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  margin: 0;
  padding: 0;
  background-color: #4a4446;
}

/* Map Container */
.map-container {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  container-type: inline-size;
}

.map-image {
  width: 100%;
  height: auto;
  display: block;
  pointer-events:none;
}

/* Interactive Dots */
.unit-dot {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 4.2cqw;
  height: 4.2cqw;
  border-radius: 50%;
  color: white;
  font-size: 1.3cqw;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0.2cqw 0.5cqw rgba(0,0,0,0.3);
  transition: all 0.2s ease;
  border: 0.2cqw solid white;
  filter: brightness(0.8);
}

/* Active Dot State */
.unit-dot.active {
  transform: translate(-50%, -50%) scale(1.2);
  border: 0.2cqw solid #ffffff;
  box-shadow: 0 0 1cqw rgba(0,0,0,0.5);
  z-index: 10;
  filter: brightness(1.1);
}

/* Status Colors matching legend */
.status-available { background-color: #5cb85c; }
.status-closed { background-color: #777777; }
.status-contract { background-color: #d9534f; }
.status-model { background-color: #5bc0de; }

/* Popup Card Styling (Matching your screenshot) */
.popup-card {
  position: absolute;
  top: 50%; 
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  display: flex;
  width: 380px;
  max-width: 90%;
  z-index: 100;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.popup-card.hidden {
  opacity: 0;
  pointer-events: none;
}

.popup-image {
  width: 140px;
  background-size: cover;
  background-position: center;
}

.popup-content {
  padding: 20px;
  flex: 1;
  position: relative;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #888;
}

.popup-content h3 {
  margin: 0 0 5px 0;
  font-size: 20px;
  color: #111;
}

.popup-subtitle {
  margin: 0 0 15px 0;
  font-size: 13px;
  color: #666;
}

.popup-subtitle span {
  font-weight: bold;
}

/* Text Colors based on status */
.text-available { color: #2e8b57; }
.text-contract { color: #d9534f; }
.text-closed { color: #777777; }

.popup-detail {
  margin: 5px 0;
  font-size: 14px;
  color: #444;
}

.popup-actions {
  display: flex;
  margin-top: 15px;
  gap: 10px;
}

.action-btn {
  text-decoration: none;
  border-radius: 8px;
  padding: 8px 15px;
  font-size: 14px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-btn {
  border: 1px solid #ccc;
  color: #333;
  background: white;
  width: 40px;
}

.mls-btn {
  background: #1e7b3a;
  color: white;
  flex: 1;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
  .popup-card {
    flex-direction: column;
    width: 280px;
  }
  .popup-image {
    width: 100%;
    height: 120px;
  }
}