html,
body,
svg {
  height: 100%;
  width: 100%;
  margin: 0;
  overflow: hidden;
  font: 16px sans-serif;
  line-height: 1;
}

#svg-wrapper {
  box-sizing: border-box;
  padding-top: 56px;
  height: 100%;
}

form {
  width: 100%;
  margin: 0px;
  z-index: 1;
  position: fixed;
  background: white;
  box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.14),
    0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
}

input {
  font-size: 1rem;
  /* line-height: 1.5; */
  min-width: 255px;
  border: none;
  padding: 0 0 0 1rem;
  width: 100%;
}

#searchbox {
  margin: 0.5rem;
  display: flex;
  position: relative;
  padding: 0.5rem 0;
  /* line-height: 1.5; */
  /* overflow: hidden;
  white-space: nowrap; */
}

#searchbox > svg {
  color: black;
  width: 1.5rem;
}

.node:not(.selected) {
  /* font-size: 15px; */
  cursor: pointer;
}

.node.selected {
  pointer-events: none;
  font-weight: bold;
}

rect.bg {
  fill: #ffffff;
}

.node rect {
  fill: #ddd;
}

.node:not(.selected):hover rect {
  opacity: 0.5;
}

.active rect {
  fill: #046b37;
}

.active text,
.direct text {
  fill: #ffffff;
}

.direct rect {
  fill: #584fa1;
}

.link {
  fill: none;
  stroke: #555;
  /* stroke-opacity: 0.4; */
  stroke-width: 1.5px;
}

#search ul {
  min-width: 255px;
  padding: 0;
  margin: 0.5rem 0;
  transition: opacity 0.2s ease-in-out;
}

#search ul.hidden {
  display: none;
}

#search ul:empty {
  padding: 0;
}

#search ul li {
  padding: 1rem;
  cursor: pointer;
}

#search ul li:hover {
  background: #f5f5f5;
}

@media (min-width: 600px) {
  form {
    width: auto;
    margin: 0.5rem;
  }

  #svg-wrapper {
    padding-top: 0;
  }

  #searchbox {
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  }

  #searchbox::after {
    display: block;
    content: '';
    border-bottom: 2px solid #008000;
    transform: scaleX(0);
    transition: transform 200ms ease-in-out;
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
  }

  #searchbox:focus-within::after {
    transform: scaleX(1);
  }
}
