/* Project-level dependency overview and full-screen editor. */
.detail-dependency-section { display: flex; flex-direction: column; gap: 10px; }
.dependency-flowchart-overview-inner { width: 100%; height: 100%; }
body.dependency-flowchart-modal-open { overflow: hidden; }
body.dependency-flowchart-modal-open #confirm-modal-overlay { z-index: 1000; }
.dependency-flowchart-overview-warning { color: var(--red); font-size: 12px; line-height: 1.45; }
.dependency-flowchart-edge.is-critical { stroke: var(--review); stroke-width: 2.75; }
.dependency-flowchart-overview {
  position: relative;
  min-height: 220px;
  height: 260px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
  background: var(--paper-raised);
}
.dependency-flowchart-empty {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: var(--ink-dim);
  font-size: 13px;
  text-align: center;
}
.dependency-flowchart-canvas { display: block; width: 100%; height: 100%; touch-action: none; user-select: none; }
.dependency-flowchart-controls {
  position: absolute;
  z-index: 2;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--paper-raised);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}
.dependency-flowchart-controls button {
  min-width: 34px;
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.dependency-flowchart-controls button:hover {
  background: var(--grid-line);
  border-color: var(--accent);
}
.dependency-flowchart-actions { display: flex; justify-content: flex-end; gap: 8px; }
.dependency-flowchart-overview-group {
  fill: rgba(127, 209, 232, .055);
  stroke: var(--accent);
  stroke-width: 1.75;
  stroke-dasharray: 8 5;
  pointer-events: none;
}
.dependency-flowchart-overview-group-title {
  fill: var(--accent);
  font-size: 15px;
  font-weight: 700;
  text-anchor: start;
  pointer-events: none;
}
.dependency-flowchart-node rect {
  fill: var(--paper-raised);
  stroke: #93AFD1;
  stroke-width: 1.5;
  rx: 9;
}
.dependency-flowchart-node text {
  fill: var(--ink);
  font-size: 13px;
  font-weight: 500;
  text-anchor: middle;
  pointer-events: none;
}
.dependency-flowchart-node .flow-node-state { fill: var(--amber); font-size: 10px; }
.dependency-flowchart-node.is-selected rect { stroke: var(--accent); stroke-width: 3; }
.dependency-flowchart-node.is-deleted rect { fill: var(--grid-line); stroke: var(--ink-faint); stroke-dasharray: 5 3; }
.dependency-flowchart-node.is-deleted text { fill: var(--ink-dim); }
.dependency-flowchart-edge { fill: none; stroke: #93AFD1; stroke-width: 2.5; cursor: default; }
.dependency-flowchart-edge.is-selected { stroke: var(--red); stroke-width: 3.5; cursor: pointer; }
.dependency-flowchart-edge.is-deleted { stroke: var(--ink-faint); stroke-dasharray: 6 4; }
.dependency-flowchart-edge.is-invalid { stroke: var(--red); stroke-dasharray: 5 3; }
.dependency-flowchart-connector { fill: var(--paper-raised); stroke: var(--accent); stroke-width: 2.5; cursor: crosshair; }
.dependency-flowchart-connector:hover { fill: var(--accent); r: 7; }
.dependency-flowchart-temp-edge { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-dasharray: 6 4; pointer-events: none; }
.dependency-flowchart-modal-overlay { z-index: 900; padding: 8px; }
.dependency-flowchart-modal-card {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}
.dependency-flowchart-modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dependency-flowchart-modal-header .modal-title { margin: 0; }
.dependency-flowchart-toolbar { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 8px; }
.dependency-flowchart-search { flex: 1 1 280px; position: relative; min-width: 220px; }
.dependency-flowchart-search input {
  box-sizing: border-box;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
}
.dependency-flowchart-search input::placeholder { color: var(--ink-faint); opacity: 1; }
.dependency-flowchart-search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.dependency-flowchart-search-results {
  position: absolute;
  z-index: 5;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: min(40vh, 360px);
  overflow: auto;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--paper-raised);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
}
.dependency-flowchart-search-results button {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--rule);
  padding: 10px 12px;
  text-align: left;
  color: var(--ink);
  background: transparent;
  font-size: 13px;
  line-height: 1.5;
  cursor: pointer;
}
.dependency-flowchart-search-results button:hover,
.dependency-flowchart-search-results button:focus-visible {
  background: var(--grid-line);
  color: #fff;
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.dependency-flowchart-search-results button:last-child { border-bottom: 0; }
.dependency-flowchart-canvas-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 240px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
  background-color: var(--paper-raised);
  background-image: radial-gradient(var(--rule) 1px, transparent 1px);
  background-size: 20px 20px;
}
.dependency-flowchart-warning { color: var(--red); font-size: 13px; min-height: 18px; line-height: 1.5; }
.dependency-flowchart-hint { color: var(--ink-dim); font-size: 12px; line-height: 1.5; }
.dependency-flowchart-actions-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.dependency-flowchart-inline-confirm {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--amber);
  border-radius: 8px;
  background: rgba(232, 163, 61, .12);
  color: var(--amber);
}
.dependency-flowchart-button-row { display: flex; gap: 8px; flex-wrap: wrap; }
.dependency-flowchart-modal-card .btn-secondary {
  color: var(--ink);
  border: 1px solid var(--rule);
  background: var(--paper-raised);
}
.dependency-flowchart-modal-card .btn-secondary:hover:not(:disabled) {
  color: #fff;
  border-color: var(--accent);
  background: var(--grid-line);
}
.dependency-flowchart-modal-card button:disabled { opacity: .48; cursor: not-allowed; }
.dependency-flowchart-edge-label { fill: var(--red); font-size: 11px; }
@media (max-width: 720px) {
  .dependency-flowchart-overview { height: 220px; min-height: 180px; }
  .dependency-flowchart-modal-overlay { padding: 4px; }
  .dependency-flowchart-modal-card { padding: 10px; gap: 8px; }
  .dependency-flowchart-toolbar { gap: 6px; }
  .dependency-flowchart-search { flex-basis: 100%; min-width: 0; }
  .dependency-flowchart-canvas-wrap { min-height: 220px; }
  .dependency-flowchart-actions-row { align-items: stretch; }
  .dependency-flowchart-actions-row > .btn-secondary,
  .dependency-flowchart-actions-row .dependency-flowchart-button-row,
  .dependency-flowchart-actions-row .dependency-flowchart-button-row button { flex: 1 1 auto; }
}
