/* ==========================================================================
   ps-map-popup.css
   Shared Mapbox popup styles for the Project Sidewalk cities map.
   Linked by BOTH ps-dashboard.html and ps-cities-map.html so the popup look
   is defined in exactly one place. Dark-mode rules apply on the standalone
   page (which toggles body.dark-mode); they are inert elsewhere.
   ========================================================================== */

/* --- Light (default) --- */
.mapboxgl-popup-content {
  padding: 0 !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15) !important;
  overflow: hidden;
}

.ps-map-popup {
  padding: 14px 16px;
  border-left: 4px solid #78B9AB;
  font-size: 13px;
  line-height: 1.5;
}

.ps-map-popup-title {
  font-weight: 700;
  font-size: 1.05em;
  color: #333;
  margin-bottom: 2px;
}

.ps-map-popup-meta {
  color: #666;
  font-size: 0.88em;
  margin-bottom: 10px;
}

.ps-map-popup-stats {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 10px;
}

.ps-map-popup-stats td {
  padding: 2px 0;
  border: none;
}

.ps-map-popup-stats td:first-child {
  color: #777;
  padding-right: 12px;
  white-space: nowrap;
}

.ps-map-popup-stats td:last-child {
  font-weight: 600;
  color: #333;
  text-align: right;
}

.ps-map-popup-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 8px;
  border-top: 1px solid #eee;
}

.ps-map-popup-links a {
  color: #548177;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92em;
}

.ps-map-popup-links a:hover {
  text-decoration: underline;
  color: #78B9AB;
}

/* --- Dark mode (active when body.dark-mode is set) --- */
.dark-mode .mapboxgl-popup-content {
  background: #1e2128 !important;
}

.dark-mode .mapboxgl-popup-tip {
  border-top-color: #1e2128 !important;
  border-bottom-color: #1e2128 !important;
}

.dark-mode .ps-map-popup {
  border-left-color: #5EEDC7;
}

.dark-mode .ps-map-popup-title {
  color: #eee;
}

.dark-mode .ps-map-popup-meta {
  color: #999;
}

.dark-mode .ps-map-popup-stats td:first-child {
  color: #888;
}

.dark-mode .ps-map-popup-stats td:last-child {
  color: #ddd;
}

.dark-mode .ps-map-popup-links {
  border-top-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .ps-map-popup-links a {
  color: #5EEDC7;
}

.dark-mode .ps-map-popup-links a:hover {
  color: #8FF5DA;
}
