/**
* Copyright AGNTCY Contributors (https://github.com/agntcy)
* SPDX-License-Identifier: Apache-2.0
**/

.react-flow {
  background: #23282e !important;
}

body[data-theme="light"] .react-flow {
  background: var(--app-background) !important;
}

.react-flow__background {
  fill: #23282e !important;
}

body[data-theme="light"] .react-flow__background {
  fill: var(--app-background) !important;
}

.react-flow__controls {
  background: rgba(35, 40, 46, 0.9);
  border: 1px solid #30363d;
  border-radius: 8px;
  bottom: 40px !important;
  right: 16px !important;
  width: auto !important;
  max-width: 50px !important;
  flex-direction: column !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 4px !important;
}

body[data-theme="light"] .react-flow__controls {
  background: var(--node-background);
  border: none;
}

.react-flow__controls-button {
  background: transparent;
  border: none;
  color: #f0f6fc;
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative;
}

body[data-theme="light"] .react-flow__controls-button {
  color: var(--node-text-primary);
}

.react-flow__controls-button:hover {
  background: rgba(47, 54, 61, 0.8);
}

.react-flow__controls-button::before {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: rgba(55, 65, 81, 0.95);
  color: #ffffff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease-in-out;
  z-index: 10000;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(75, 85, 99, 0.2);
}

.react-flow__controls-button::after {
  content: "";
  position: absolute;
  left: calc(100% + 6px);
  top: 50%;
  transform: translateY(-50%);
  border: 4px solid transparent;
  border-right-color: rgba(55, 65, 81, 0.95);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease-in-out;
  z-index: 10000;
  pointer-events: none;
}

.react-flow__controls-button:hover::before,
.react-flow__controls-button:hover::after {
  opacity: 1;
  visibility: visible;
}

body[data-theme="light"] .react-flow__controls-button::before {
  background: var(--node-background);
  color: #374151;
  border: 1px solid rgba(156, 163, 175, 0.3);
}

body[data-theme="light"] .react-flow__controls-button::after {
  border-right-color: var(--node-background);
}

body[data-theme="light"] .react-flow__controls-button:hover {
  background: var(--node-background-hover);
}

.react-flow__edge-path {
  stroke: #00409f;
  stroke-width: 2;
}

.react-flow__arrowhead {
  fill: #00409f !important;
  stroke: #00409f !important;
}

.react-flow__edge .react-flow__edge-path {
  stroke: #00409f;
}

marker path {
  fill: #00409f !important;
  stroke: #00409f !important;
}

marker {
  fill: #00409f !important;
  stroke: #00409f !important;
}

.react-flow__edge path {
  stroke: #00409f !important;
  fill: none !important;
}

marker polygon,
marker circle {
  fill: #00409f !important;
  stroke: #00409f !important;
}

.react-flow__handle {
  opacity: 0 !important;
  pointer-events: none !important;
}

.react-flow__handle-top,
.react-flow__handle-bottom,
.react-flow__handle-left,
.react-flow__handle-right {
  opacity: 0 !important;
  pointer-events: none !important;
}
