/* narramix_block/static/style.css */

/* Make LiteGraph Dark Mode by default */
.litegraph {
  background-color: #030712 !important;
}

.graphdialog {
  background-color: #1f2937 !important;
  color: white !important;
  border: 1px solid #374151 !important;
}

.graphdialog input {
  background-color: #111827 !important;
  color: white !important;
  border: 1px solid #4b5563 !important;
}

/* Fix LiteGraph Context Menu Hover Styling */
.lite-menu,
.litegraph .litemenu {
  background-color: #1f2937 !important;
  color: #f3f4f6 !important;
  border: 1px solid #374151 !important;
}
.lite-menu .litemenu-entry,
.litegraph .litemenu .litemenu-entry {
  color: #f3f4f6 !important;
}
.lite-menu .litemenu-entry:hover,
.litegraph .litemenu .litemenu-entry:hover {
  background-color: #374151 !important;
  color: #ffffff !important;
}
.lite-menu .litemenu-entry.selected,
.litegraph .litemenu .litemenu-entry.selected {
  background-color: #3b82f6 !important;
  color: #ffffff !important;
}
.litegraph .litemenu-entry.has_submenu:hover {
  background-color: #374151 !important;
}
.litegraph .litemenu-entry .property_name {
  color: #9ca3af !important;
}

/* Fix LiteGraph Search Box Styling */
.litegraph .lite-searchbox {
  background-color: #1f2937 !important;
  color: #f3f4f6 !important;
  border: 1px solid #374151 !important;
}
.litegraph .lite-searchbox input {
  background-color: #111827 !important;
  color: white !important;
  border: 1px solid #4b5563 !important;
  padding: 4px !important;
  border-radius: 4px !important;
}
.litegraph .lite-search-item {
  color: #f3f4f6 !important;
  background-color: transparent !important;
  padding: 4px 8px !important;
}
.litegraph .lite-search-item:hover,
.litegraph .lite-search-item.selected {
  background-color: #3b82f6 !important;
  color: #ffffff !important;
}

/* Execution Animation */
@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 5px #3b82f6;
  }
  50% {
    box-shadow:
      0 0 20px #3b82f6,
      0 0 10px #8b5cf6;
  }
  100% {
    box-shadow: 0 0 5px #3b82f6;
  }
}

/* Custom overlay class applied via JS to running nodes */
.node-running-overlay {
  position: absolute;
  border: 3px solid #3b82f6;
  border-radius: 6px;
  animation: pulseGlow 1.5s infinite;
  pointer-events: none;
  z-index: 100;
}

.tool-btn {
  width: 32px;
  height: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 0.375rem;
  transition: background-color 0.2s;
}
.tool-btn:hover {
  background-color: #374151;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #111827;
}
::-webkit-scrollbar-thumb {
  background: #374151;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #4b5563;
}

/* Drag and Drop Styles */
.draggable-item.dragging {
  opacity: 0.5;
  border: 1px dashed #3b82f6;
}

.draggable-item.drag-over {
  border-top: 2px solid #3b82f6;
}

/* Python Editor Area Styling */
#pythonEditorInput {
  tab-size: 4;
  line-height: 1.5;
}
#pythonEditorInput:focus {
  box-shadow: inset 0 0 0 1px #3b82f6;
}

/* Hide scrollbar for Tab bar */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}

/* Sidebar Drag and Favorites Elements */
.sidebar-node-item {
  display: flex;
  align-items: center;
  padding: 6px 10px;
  background-color: #1f2937;
  border: 1px solid #374151;
  border-radius: 6px;
  cursor: grab;
  user-select: none;
  transition:
    background-color 0.2s,
    border-color 0.2s;
}
.sidebar-node-item:hover {
  background-color: #374151;
  border-color: #4b5563;
}
.sidebar-node-item i.node-icon {
  width: 20px;
  text-align: center;
  margin-right: 8px;
  font-size: 14px;
}
.sidebar-fav-btn {
  margin-left: auto;
  color: #6b7280;
  cursor: pointer;
  transition: color 0.2s;
}
.sidebar-fav-btn:hover,
.sidebar-fav-btn.active {
  color: #eab308;
}
.fav-drag-over {
  border-top: 2px solid #3b82f6 !important;
}

/* Sidebar Toggle Transition */
#left-sidebar {
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.-ml-64 {
  margin-left: -16rem;
}

/* Chat UI Styles */
.chat-bubble-user {
  background-color: #312e81; /* Indigo 900 */
  border-radius: 12px 12px 0 12px;
  align-self: flex-end;
  color: #e0e7ff;
}

.chat-bubble-ai {
  background-color: #1f2937; /* Gray 800 */
  border: 1px solid #374151;
  border-radius: 12px 12px 12px 0;
  align-self: flex-start;
  color: #f3f4f6;
}

.chat-bubble-ai pre {
  background-color: #111827 !important;
  padding: 8px;
  border-radius: 6px;
  overflow-x: auto;
  margin-top: 8px;
  margin-bottom: 8px;
  font-size: 0.75rem;
}
