/* ===================================================
   Power BI Visual Styles
   =================================================== */
/* Layout: sidebar + graph */
.pbi-sidebar {
  width: 0;
  min-width: 0;
  max-height: 100%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: #fff;
  border-right: 1px solid #e0e0e0;
  transition: width 0.3s ease, min-width 0.3s ease;
  flex-shrink: 0;
  position: relative;
}
.pbi-sidebar--open {
  width: 280px;
  min-width: 280px;
}
.pbi-graph-container {
  flex: 1;
  overflow: hidden;
  position: relative;
  cursor: default;
}
.pbi-graph-container svg {
  display: block;
  width: 100%;
  height: 100%;
  cursor: default;
}
/* Only show pointer cursor on clickable elements (nodes) */
.pbi-node circle {
  cursor: pointer;
}
/* Status bar — bottom-left, shows row counts and warnings */
.pbi-status-bar {
  position: absolute;
  bottom: 6px;
  left: 8px;
  font-size: 11px;
  color: #888;
  background: rgba(255, 255, 255, 0.85);
  padding: 2px 8px;
  border-radius: 3px;
  pointer-events: none;
  z-index: 10;
  font-family: -apple-system, "Segoe UI", sans-serif;
}
/* Search box (top-right of graph) */
.pbi-search-container {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 25;
  width: 240px;
  font-family: -apple-system, "Segoe UI", sans-serif;
}
.pbi-search-input {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 12px;
  outline: none;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  box-sizing: border-box;
}
.pbi-search-input:focus {
  border-color: #2d1b69;
}
.pbi-search-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-top: 3px;
  max-height: 280px;
  overflow-y: auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.pbi-search-mode {
  padding: 6px 10px;
  font-size: 10px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #f5f3f9;
  border-bottom: 1px solid #e8e0f0;
}
.pbi-search-result {
  padding: 7px 10px;
  cursor: pointer;
  font-size: 12px;
  transition: background 0.1s;
}
.pbi-search-result:hover {
  background: #f0ecf5;
}
.pbi-search-result mark {
  background: var(--pbi-search-highlight, #C5D38C);
  padding: 0 2px;
  border-radius: 2px;
  color: inherit;
}
.pbi-search-empty {
  color: #999;
  cursor: default;
  font-style: italic;
}
.pbi-search-empty:hover {
  background: transparent;
}
/* Link hover tooltip */
.pbi-link-tooltip {
  position: absolute;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11px;
  line-height: 1.4;
  pointer-events: none;
  z-index: 30;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  max-width: 280px;
  font-family: -apple-system, "Segoe UI", sans-serif;
}
/* Forschung links — dashed line */
.pbi-link--forschung {
  stroke-dasharray: 6, 4;
}
/* Wertschöpfungskette toggle button — top-left of graph */
.pbi-pathway-btn {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 20;
  background: #899F2A;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 6px 14px;
  font-size: 12px;
  font-family: "Gill Sans", Arial, sans-serif;
  cursor: pointer;
  transition: background 0.15s;
}
.pbi-pathway-btn:hover {
  opacity: 0.85;
}
.pbi-pathway-btn.active {
  background: #57555A;
}
/* Pathway sidebar */
.pbi-sidebar__hint {
  font-size: 12px;
  color: #555;
  line-height: 1.5;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 4px;
  margin-bottom: 10px;
}
.pbi-sidebar__hint--max {
  background: #fff3cd;
  border-left: 3px solid #f39c12;
  color: #856404;
  font-weight: 500;
}
.pbi-sidebar__meta {
  font-size: 11px;
  color: #666;
  margin-bottom: 10px;
}
.pbi-sidebar__path {
  list-style: none;
  padding: 0;
  margin: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pbi-sidebar__path-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: #f0ecf5;
  border-radius: 4px;
  cursor: pointer;
}
.pbi-sidebar__path-item:hover {
  background: #e0d6ec;
}
.pbi-sidebar__path-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pbi-sidebar__path-label {
  font-size: 12px;
  font-weight: 600;
  color: #333;
}
.pbi-sidebar__path-arrow {
  font-size: 14px;
  color: #2ecc40;
  text-align: center;
  padding: 2px 0;
  font-weight: bold;
}
.pbi-message {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #999;
  font-size: 14px;
  text-align: center;
  padding: 20px;
}
/* Sidebar content */
.pbi-sidebar__content {
  padding: 12px;
  width: 280px;
  box-sizing: border-box;
}
.pbi-sidebar__close {
  position: absolute;
  top: 6px;
  right: 8px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #999;
  line-height: 1;
}
.pbi-sidebar__close:hover {
  color: #333;
}
.pbi-sidebar__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--pbi-title-color, #899F2A);
  margin-bottom: 6px;
  word-wrap: break-word;
  padding-right: 24px;
}
.pbi-sidebar__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}
.pbi-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
}
.pbi-badge--biobasiert {
  background: #2ecc40;
}
.pbi-badge--fossil {
  background: #555;
}
.pbi-badge--recycling {
  background: #f39c12;
}
.pbi-badge--mineralisch {
  background: #9b59b6;
}
.pbi-badge--industrie {
  background: #3498db;
}
.pbi-badge--energienetze {
  background: #e67e22;
}
.pbi-badge--sonstig {
  background: #95a5a6;
}
.pbi-badge--recyclingbiobasiert {
  background: #27ae60;
}
.pbi-badge--gruppe {
  background: #2d1b69;
}
.pbi-sidebar__section {
  font-size: 12px;
  font-weight: 700;
  color: #333;
  margin: 12px 0 6px;
  padding-bottom: 3px;
  border-bottom: 2px solid #e8e0f0;
}
.pbi-sidebar__section--red {
  border-bottom-color: #A96020;
}
.pbi-sidebar__section--blue {
  border-bottom-color: #4C6374;
}
.pbi-sidebar__section--forschung {
  border-bottom-color: #899F2A;
}
.pbi-sidebar__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.pbi-sidebar__item {
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s;
}
.pbi-sidebar__item:hover {
  background: #f0ecf5;
}
.pbi-sidebar__item--company {
  border-left: 3px solid #2d1b69;
  padding-left: 10px;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  cursor: default;
}
.pbi-sidebar__detail {
  font-size: 10px;
  color: #888;
}
.pbi-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pbi-dot--red {
  background: #A96020;
}
.pbi-dot--blue {
  background: #4C6374;
}
.pbi-dot--forschung {
  background: #899F2A;
}
.pbi-sidebar__item--forschung-row {
  border-left: 3px solid #899F2A;
  padding-left: 10px;
  transition: background 0.15s;
}
.pbi-sidebar__item--forschung-row:hover {
  background: #C5D38C;
}
.pbi-sidebar__item--forschung-row.pbi-sidebar__item--selected {
  background: #C5D38C;
  font-weight: 600;
}
/* SVG styles */
.pbi-link {
  transition: stroke-opacity 0.3s, stroke 0.3s, stroke-width 0.3s;
}
.pbi-node circle {
  transition: fill 0.3s, r 0.3s, opacity 0.3s;
}
.pbi-node-label {
  transition: opacity 0.3s;
}
/* Dimmed state */
.pbi-node.dimmed circle {
  opacity: 0.08;
}
.pbi-node.dimmed .pbi-node-label {
  opacity: 0.05;
}
.pbi-link.dimmed {
  stroke-opacity: 0.03 !important;
}
/* Highlighted state */
.pbi-node.highlighted circle {
  opacity: 1;
}
.pbi-node.highlighted .pbi-node-label {
  opacity: 1;
}
.pbi-link.highlighted {
  stroke-opacity: 0.8 !important;
}
/* Selected node */
.pbi-node.selected circle {
  stroke: #fff;
  stroke-width: 2;
}

