#cps-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 15px;           /* Add padding so popup doesn’t touch edges */
  box-sizing: border-box;
  overflow-y: auto;        /* Allow vertical scrolling if needed */
}


#cps-popup {
  position: relative; /* make popup container a positioning context */
  background: #fff;
  border-radius: 8px;
  padding: 40px 25px 25px 25px; /* extra top padding for close button */
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto; /* allow scrolling in popup */
  text-align: center;
  box-shadow: 0 0 15px rgba(0,0,0,0.3);
  box-sizing: border-box;
}

/* Close button positioned absolutely inside popup */
#cps-popup-close {
  position: absolute; /* relative to #cps-popup */
  top: 12px;
  right: 12px;
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
  color: #D13866;
  transition: color 0.3s ease;
  user-select: none;
  z-index: 10;
}

/* Hover color change */
#cps-popup-close:hover {
  color: #a32753;
}

#cps-popup h2 {
  margin-bottom: 20px;
}

/* 3x3 city grid */
#cps-cities-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 20px;
}

/* Individual city block styles */
.cps-city {
  cursor: pointer;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 12px;
  transition: box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cps-city:hover {
  box-shadow: 0 0 12px #D13866;
  border-color: #D13866;
}

/* City logo styles: circular shape, fixed size, margin below */
.cps-city-logo img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 12px;
  border: 2px solid transparent;
  transition: border-color 0.3s ease;
}
.cps-city:hover .cps-city-logo img {
  border-color: #D13866;
}

/* City name below logo */
.cps-city-name {
  font-weight: 600;
  font-size: 16px;
  color: #333;
  text-align: center;
}

/* Responsive grid adjustments */
@media (max-width: 600px) {
  #cps-popup {
    padding: 40px 15px 15px 15px; /* adjust padding for small width */
    max-height: 85vh;
  }
  #cps-cities-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
  .cps-city-logo img {
    width: 60px;
    height: 60px;
  }
  .cps-city-name {
    font-size: 14px;
  }
  #cps-popup-close {
    top: 10px;
    right: 10px;
    font-size: 20px;
  }
}