/* Full page layout */
html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  display: flex;
  flex-direction: column;
}

/* Top bar stays at natural height */
.topbar {
  padding: 10px 12px;
  border-bottom: 1px solid #e6e6e6;
  background: #ffffff;
}

.title {
  font-weight: 700;
  margin-bottom: 6px;
}

.controls .row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
}

#sectionInput {
  width: 220px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #d6d6d6;
  border-radius: 10px;
  padding: 3px 8px;
  background: #fafafa;
  font-size: 13px;
}

.chip button {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

/* Graph area fills the rest of the screen */
.layout {
  flex: 1 1 auto;       /* take remaining height */
  min-height: 0;        /* critical: allow child to size correctly */
}

#graph {
  width: 100%;
  height: 100%;
  min-height: 0;        /* critical for some browsers */
}

/* Simple right-click context menu */
.context-menu {
  position: fixed;
  z-index: 9999;
  background: #ffffff;
  border: 1px solid #d0d0d0;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 6px;
}

.context-menu button {
  appearance: none;
  border: 1px solid #c8d6ff;
  background: #eef4ff;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
}

.context-menu button:hover {
  background: #e2ecff;
}
