/* The Cartographer on the page (app-map-review.js): the small "✓ tidied" note
   in the map header and the short list of what changed. Calm: no motion, no
   colour shouts; the zones themselves are drawn by cytoscape (app-map-themes.js). */
:root {
  --tidy-ink: #2c8248;
  --tidy-bg: color-mix(in srgb, #2c8248 10%, transparent);
}
[data-theme='dark'] {
  --tidy-ink: #abdd65;
  --tidy-bg: color-mix(in srgb, #abdd65 14%, transparent);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --tidy-ink: #abdd65;
    --tidy-bg: color-mix(in srgb, #abdd65 14%, transparent);
  }
}

/* 28 px to the eye, 44 px to the thumb (the ::after grows the tap target). */
#right h2 .map-tidied {
  position: relative;
  margin-right: auto;
  min-height: 28px;
  padding: 0.15rem 0.6rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--tidy-bg);
  color: var(--tidy-ink);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  cursor: pointer;
}
#right h2 .map-tidied::after {
  content: '';
  position: absolute;
  inset: -8px -4px;
}
#right h2 .map-tidied[hidden] {
  display: none;
}
#right h2 .map-tidied[aria-expanded='true'] {
  border-color: var(--tidy-ink);
}
.map-tidied:focus-visible,
.tidy-undo:focus-visible {
  outline: 2px solid var(--as-marine);
  outline-offset: 2px;
}

/* The list opens over the map (never pushing it down), just under the header. */
#view-map {
  position: relative;
}
.tidy-list {
  position: absolute;
  top: 2.6rem;
  left: 1rem;
  right: 1rem;
  z-index: 6;
  max-width: 34rem;
  max-height: 60vh;
  overflow-y: auto;
  box-shadow: 0 6px 20px color-mix(in srgb, var(--as-navy) 18%, transparent);
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border-left: 3px solid var(--tidy-ink);
  background: var(--card);
  color: var(--ink);
  font-size: 0.78rem;
}
.tidy-list[hidden] {
  display: none;
}
.tidy-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.tidy-line {
  line-height: 1.35;
}
.tidy-line.tidy-hint {
  color: var(--muted);
}
.tidy-line.tidy-hint::before {
  content: '💡 ';
}
.tidy-undo {
  margin-top: 0.5rem;
  min-height: 44px;
  padding: 0 1rem;
}
.tidy-gone {
  margin: 0.45rem 0 0;
  color: var(--muted);
}
