/* Global styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background: #f8f9fa;
}

.chart-container {
  width: 100%;
  height: 2750px;
  /* background: #ffffff;
            border-radius: 12px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); */
  margin: 1.5rem auto;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  /* ? fixes chart to the top */
  justify-content: center;
}
.chart-controls {
  position: fixed;
  top: 100px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 2000;
}

.ctrl-btn {
  width: 40px;
  height: 40px;
  background: #ffffff;
  border: 1px solid #e1e5ea;
  border-radius: 10px;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.15s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.ctrl-btn:hover {
  background: #0d6efd;
  color: #fff;
  border-color: #0d6efd;
}

@media (max-width: 768px) {
  .chart-controls {
    flex-direction: row;
    bottom: 15px;
    top: auto;
    right: 50%;
    transform: translateX(50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 6px 8px;
    border-radius: 16px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  }
}

.node-rect {
  rx: 10;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.15));
  cursor: pointer;
}

.node-rect:hover {
  filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.25));
}

.node-text {
  fill: #fff;
  font-size: 14px;
  font-weight: 600;
  text-anchor: middle;
  user-select: none;
}

.link {
  fill: none;
  stroke: #cbd5e1;
  stroke-width: 1;
}

.icon-sign {
  fill: #ffffff;
  font-size: 8px;
  font-weight: bold;
  text-anchor: middle;
  pointer-events: none;
}

/* Buttons */
.obtn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  font-size: 0.813rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  background: white;
  color: #34495e;
  border: 2px solid #e9ecef;
}

.btn:hover {
  background: #34495e;
  color: white;
  border-color: #34495e;
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
  color: white;
  border: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(192, 57, 43, 0.4);
}

/* Zoom control buttons */
.zoom-controls {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

@media (max-width: 768px) {
  .chart-container {
    height: 1300px;
    /* reduce height for phones */
    overflow: auto;
    /* enable scroll if needed */
  }

  .zoom-controls {
    flex-wrap: wrap;
    /* buttons go to next line */
    gap: 0.5rem;
    justify-content: center;
  }

  .btn {
    padding: 0.4rem 0.7rem;
    font-size: 0.75rem;
  }
}
