.maplibregl-popup-content {
  max-width: 340px;
  padding: 0.75rem 0.9rem;
  background: var(--surface);
  color: var(--text);
  border-radius: 8px;
  box-shadow: 0 2px 10px var(--shadow);
}

.maplibregl-popup-anchor-top .maplibregl-popup-tip,
.maplibregl-popup-anchor-top-left .maplibregl-popup-tip,
.maplibregl-popup-anchor-top-right .maplibregl-popup-tip {
  border-bottom-color: var(--surface);
}

.maplibregl-popup-anchor-bottom .maplibregl-popup-tip,
.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip,
.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip {
  border-top-color: var(--surface);
}

.maplibregl-popup-anchor-left .maplibregl-popup-tip {
  border-right-color: var(--surface);
}

.maplibregl-popup-anchor-right .maplibregl-popup-tip {
  border-left-color: var(--surface);
}

.maplibregl-popup-close-button {
  display: flex;
  align-items: center;
  justify-content: center;
  top: 0;
  right: 0;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  border-radius: 0 8px 0 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.maplibregl-popup-close-button:hover {
  background: var(--hover);
  color: var(--text);
}

.maplibregl-popup-close-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.map-popup {
  max-height: 320px;
  overflow-y: auto;
  color: var(--text);
  font-size: 0.85rem;
  line-height: 1.4;
}

.map-popup [hidden] {
  display: none;
}

.map-popup-title {
  margin: 0 0 4px;
  padding-right: 3rem;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
}

.map-popup-status {
  display: inline-block;
  margin-bottom: 4px;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: var(--muted);
  color: var(--accent-contrast);
  font-size: 0.72rem;
  font-weight: 600;
}

.map-popup-description {
  margin: 0.55rem 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.map-popup-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.15rem 0.5rem;
  margin: 0.55rem 0 0;
  font-size: 0.78rem;
}

.map-popup-meta dt {
  color: var(--muted);
  white-space: nowrap;
}

.map-popup-meta dd {
  margin: 0;
}
