/* ============================================================
   Living Map — Ambient Strip & Full-Map Modal
   ============================================================ */

/* ---------- Ambient Strip ---------- */

.map-ambient {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  background: rgba(20, 20, 30, 0.82);
  backdrop-filter: blur(4px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  color: #d0d8e8;
  z-index: 10;
  /* Strip sits between message list and chat input */
}

#map-north-star {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-style: italic;
  color: #a8bbd8;
}

#map-nodes {
  flex-shrink: 0;
}

#map-open-btn {
  flex-shrink: 0;
  background: none;
  border: 1px solid rgba(160, 190, 230, 0.4);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  color: #a0bee6;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

#map-open-btn:hover,
#map-open-btn:focus-visible {
  background: rgba(160, 190, 230, 0.15);
  color: #cce0ff;
  outline: none;
}

/* ---------- Full-Map Modal ---------- */

.map-modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 20, 0.94);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 2rem 1rem 1rem;
  z-index: 200;
  overflow-y: auto;
}

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

#map-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.15s;
}

#map-close-btn:hover,
#map-close-btn:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

#map-full {
  width: min(700px, 100%);
  height: 70vh;
  display: block;
  margin-top: 1rem;
}

/* ---------- SVG Node Styles ---------- */

.map-node-circle {
  fill: #5b9bd5;
  stroke: rgba(255, 255, 255, 0.25);
  stroke-width: 1.5;
  cursor: pointer;
  transition: fill 0.2s;
}

.map-node-circle:hover {
  fill: #89c4f4;
}

.map-node-label {
  fill: #d8e8f8;
  font-size: 11px;
  text-anchor: middle;
  pointer-events: none;
  dominant-baseline: middle;
}

.map-north-star-label {
  fill: #f0d080;
  font-size: 13px;
  text-anchor: middle;
  font-weight: 600;
}

.map-edge {
  stroke: rgba(150, 190, 230, 0.35);
  stroke-width: 1;
  stroke-dasharray: 4 3;
  fill: none;
}

/* Tooltip */
.map-tooltip {
  position: absolute;
  background: rgba(20, 25, 40, 0.95);
  border: 1px solid rgba(100, 150, 220, 0.4);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.78rem;
  color: #d0e0f0;
  pointer-events: none;
  z-index: 250;
  max-width: 200px;
  line-height: 1.5;
}

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

.map-tooltip-skill {
  font-weight: 600;
  color: #89c4f4;
  margin-bottom: 0.2rem;
}

.map-tooltip-meta {
  color: #a0b8cc;
  font-size: 0.74rem;
}
