/* 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 - glass card (matches legend) */
.grid-controls {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(26, 30, 36, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-family: "Rubik", sans-serif;
  font-size: 0.85rem;
  color: #fff;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.grid-control-btn {
  background: transparent;
  border: none;
  border-radius: 10px;
  color: #fff;
  padding: 0.5rem;
  cursor: pointer;
  font-family: "Rubik", sans-serif;
  font-size: 0.85rem;
  transition: background 0.2s ease, transform 0.15s ease;
}

.grid-control-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.grid-control-btn:active {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(0.96);
}

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

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

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

/* Zoom indicator - glass badge */
.zoom-level {
  position: absolute;
  bottom: 1.25rem;
  left: 1.25rem;
  padding: 0.5rem 1rem;
  background: rgba(26, 30, 36, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #fff;
  font-family: "Rubik", sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}
