/* Figure: the global map with one base lens, served from the prototype's lens cache.
   Behaviour lives in static/js/lens-cache-demo.js;
   markup is <d-figure id="lens-cache-demo" class="l-body"> in src/index.html.
   The map is a light panel in both themes, like the octopus and simplicial panels;
   the chrome under it follows the page. */
.lc {
  margin: 2rem 0 1rem;
}

/* data-datasets: the switch sits above the figure, and the figure under it drops its top margin */
.lc-switch {
  margin: 2rem 0 1rem;
}
.lc-datasets {
  margin-bottom: 8px;
}
.lc-switch > .lc {
  margin: 0;
}

.lc-body {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.lc-map {
  position: relative;
  width: 100%;
  background: var(--vx-panel, #fff);
  border-radius: 3px;
  overflow: hidden;
}

.lc-map canvas {
  position: absolute;
  left: 0;
  top: 0;
}

.lc-over {
  cursor: crosshair;
  touch-action: none;
}

.lc-hint {
  position: absolute;
  right: 10px;
  bottom: 8px;
  font: 12px -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, sans-serif;
  color: var(--vx-panel-muted, #6b6a63);
  pointer-events: none;
  transition: opacity 0.4s;
}

.lc-side {
  font: 13px -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, sans-serif;
  color: var(--vx-muted, #6b6a63);
}

.lc-preview {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  aspect-ratio: 1;
  border-radius: 3px;
  background: var(--vx-panel-grid, #e6e5dd);
}

.lc-note {
  margin: 8px 0 12px;
  line-height: 1.45;
  color: var(--vx-ink, #333);
}

.lc-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.lc-wander {
  font: inherit;
  color: var(--vx-ink, #333);
  background: transparent;
  border: 1px solid var(--vx-rule, #d8d7cf);
  border-radius: 3px;
  padding: 3px 10px;
  cursor: pointer;
}

.lc-wander:hover,
.lc-wander.lc-on {
  border-color: var(--vx-active-outline, #16160f);
  color: var(--vx-accent-text, #da3b2d);
}

.lc-toggle {
  display: flex;
  gap: 6px;
  align-items: center;
  cursor: pointer;
}

@media (max-width: 720px) {
  .lc-body {
    grid-template-columns: 1fr;
  }
}
