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

body {
  font-family: Arial, sans-serif;
  background-color: #f5f5f5;
  overflow: hidden;
}

.container {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

header {
  background-color: #333;
  color: white;
  padding: 1rem;
  text-align: center;
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
  font-size: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.file-upload-container {
  display: flex;
  align-items: center;
}

.load-json-btn {
  background-color: #4caf50;
  color: white;
  padding: 10px 15px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s;
}

.load-json-btn:hover {
  background-color: #45a049;
}

.graph-container {
  flex: 1;
  background-color: white;
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
  margin: 1rem;
  border-radius: 5px;
  overflow: hidden;
}

/* Graph styling */
.node {
  cursor: pointer;
  stroke: #333;
  stroke-width: 1px;
  fill: #c6dbef;
}

.node text {
  pointer-events: none;
  fill: #333;
}

.node-title {
  font-weight: bold;
  font-size: 18px;
}

.table-path {
  font-style: italic;
  font-size: 14px;
  fill: #666;
}

.properties-header {
  font-weight: bold;
  font-size: 16px;
}

.column-item {
  font-size: 14px;
}

.subcollection-item {
  font-size: 14px;
}

.subcollection-simple_join {
  fill: #1f77b4;
}

.subcollection-cartesian_product {
  fill: #8e44ad;
}

.link {
  stroke-opacity: 0.8;
  stroke-width: 2px;
}

.link-simple_join {
  stroke: #1f77b4;
}

.link-cartesian_product {
  stroke: #8e44ad;
}

.link-general_join {
  stroke: #ff7f0e;
}

.link-reverse {
  stroke: rgb(241, 20, 20);
  stroke-opacity: 0.5;
  stroke-dasharray: 2, 2;
}

.link-label {
  font-size: 14px;
  text-shadow: -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff,
    1px 1px 0 #fff;
  font-weight: normal;
  pointer-events: none;
  fill: #333;
}

.link-label-highlighted {
  fill: #000;
  font-size: 16px;
}

.link-highlighted {
  stroke: #000;
  stroke-width: 3px;
  stroke-dasharray: none;
  stroke-opacity: 1;
}

.node-highlighted {
  stroke: #000;
  stroke-width: 1px;
  fill: #e0e0e0;
}

.arrowhead {
  fill: #666;
}

.arrowhead-highlighted {
  fill: #000;
}

/* Tooltip */
.tooltip {
  position: absolute;
  padding: 15px;
  background-color: rgba(255, 255, 255, 0.95);
  border: 1px solid #ddd;
  border-radius: 4px;
  pointer-events: none;
  font-size: 14px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  max-width: 400px;
  line-height: 1.4;
}

.tooltip strong {
  color: #333;
  font-size: 16px;
}

.reverse-note {
  color: #777;
  font-style: italic;
}

/* Legend */
.legend {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background-color: rgba(255, 255, 255, 0.95);
  padding: 15px;
  border-radius: 5px;
  border: 1px solid #ddd;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  font-size: 14px;
}

.legend h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 16px;
}

.legend-item {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.legend-line {
  display: inline-block;
  width: 40px;
  height: 3px;
  margin-right: 10px;
}

.simple_join-line {
  background-color: #1f77b4;
}

.cartesian_product-line {
  background-color: #8e44ad; /* Purple */
}

.general_join-line {
  background-color: #ff7f0e; /* Orange */
}

.reverse-line {
  background-color:rgb(241, 20, 20); /* Red */
  border-top: 2px dashed rgb(241, 20, 20);
}

.legend-note {
  font-size: 13px;
  margin-top: 10px;
  margin-bottom: 0;
}

/* Hamburger Menu & Dropdown */
.header-left {
  position: relative;
  display: inline-block;
}

.hamburger-btn {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 0 15px;
}

.dropdown-content {
  display: none; /* Hidden by default */
  position: absolute;
  background-color: #f9f9f9;
  min-width: 200px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 1;
  border-radius: 4px;
  top: 100%; /* Position below the button */
  left: 0;
}

.dropdown-content ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

.dropdown-content li {
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  cursor: pointer;
  border-bottom: 1px solid #eee;
}

.dropdown-content li:last-child {
  border-bottom: none;
}

.dropdown-content li:hover {
  background-color: #f1f1f1;
}

/* Class to show the dropdown */
.show {
  display: block;
}
