/* Zoomable Grid Component Styles */

zoomable-grid {
  display: block;
  width: 100%;
  height: 100%;
}

.grid-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  cursor: grab;
  touch-action: none; /* Prevent browser scroll/zoom for pan & pinch */
}

.grid-container:active {
  cursor: grabbing;
}

.grid-container.panning {
  cursor: grabbing;
}

/* Grid Background - size set dynamically by zoomable-grid.js */
.grid-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 50000px;
  height: 50000px;
  background-image: linear-gradient(
      rgba(16, 172, 132, 0.1) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(16, 172, 132, 0.1) 1px, transparent 1px);
  background-size: 100px 100px;
  transform-origin: 0 0;
}

/* Grid Controls - above nodes (z-index 20) */
.grid-controls {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  gap: 0.5rem;
  z-index: 100;
}

.grid-control-btn {
  background: rgba(16, 172, 132, 0.2);
  border: 1px solid var(--primary-color);
  border-radius: 5px;
  color: var(--secondary-color);
  padding: 0.5rem;
  cursor: pointer;
  font-family: "Rubik", sans-serif;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}

.grid-control-btn:hover {
  background: rgba(16, 172, 132, 0.3);
}

.grid-control-btn:active {
  background: rgba(16, 172, 132, 0.4);
}

/* Touch-friendly controls on mobile */
@media (max-width: 768px) {
  .grid-controls {
    top: 0.5rem;
    right: 0.5rem;
    gap: 0.25rem;
  }

  .grid-control-btn {
    min-width: 44px;
    min-height: 44px;
    padding: 0.75rem;
    font-size: 1rem;
  }

  .zoom-level {
    bottom: 0.5rem;
    left: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
  }
}

/* Zoom indicator - above nodes (z-index 20) */
.zoom-level {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  background: rgba(0, 0, 0, 0.7);
  color: var(--secondary-color);
  padding: 0.5rem 1rem;
  border-radius: 5px;
  font-family: "Rubik", sans-serif;
  font-size: 0.8rem;
  z-index: 100;
}
