
/* WIP Folder Group: collapsible container for 6 lesser-used component groups */
.palette-wip-folder {
  border-color: rgba(194, 160, 88, 0.32);
  background: rgba(28, 24, 16, 0.65);
}

.palette-wip-btn {
  background: linear-gradient(180deg, rgba(62, 50, 24, 0.92), rgba(48, 38, 18, 0.92)) !important;
  color: #f0dcb0 !important;
  letter-spacing: 0.1em;
}

.palette-wip-btn:hover {
  filter: brightness(1.15);
}

.palette-wip-btn .count {
  color: #c8b47e !important;
}

.palette-wip-container {
  padding: 6px;
  display: grid;
  gap: 6px;
}

.palette-wip-subgroup {
  border-color: rgba(175, 190, 212, 0.18);
  margin-left: 6px;
  border-left: 3px solid rgba(194, 160, 88, 0.38);
}

.node-card {
  position: absolute;
  width: 300px;
  border: 1px solid rgba(175, 190, 212, 0.26);
  border-radius: 11px;
  background: linear-gradient(180deg, rgba(41, 52, 66, 0.95), rgba(30, 40, 53, 0.95));
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.45);
  padding: 10px 10px 12px;
  overflow: visible;
}

.node-card.active {
  border-color: rgba(165, 182, 205, 0.9);
  box-shadow:
    0 0 0 2px rgba(145, 169, 204, 0.22),
    0 14px 24px rgba(0, 0, 0, 0.55);
}

.node-head {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  cursor: grab;
  align-items: flex-start;
}

.node-head:active {
  cursor: grabbing;
}

.node-title-wrap {
  flex: 1 1 auto;
  min-width: 0;
}

.node-name {
  font-size: 16px;
  line-height: 1.02;
  font-weight: 700;
  color: #edf4ff;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.node-id {
  display: none;
}

.node-actions {
  display: flex;
  gap: 6px;
}

.node-icon-btn {
  border: 1px solid rgba(110, 150, 224, 0.34);
  background: rgba(18, 34, 59, 0.96);
  color: #d7e7ff;
  border-radius: 9px;
  width: 30px;
  height: 30px;
  font-weight: 900;
  line-height: 1;
}

.node-icon-btn:hover {
  filter: brightness(1.12);
}

.node-desc {
  margin-top: 8px;
  color: #c6d8f4;
  font-size: 13px;
  line-height: 1.18;
  min-height: 64px;
}

.node-inline {
  margin-top: 7px;
  display: grid;
  gap: 4px;
}

.node-inline span {
  color: #abc4e8;
  font-size: 12px;
}

.node-inline select,
.node-inline input,
.node-inline textarea,
.builder-left input,
.builder-left select,
.builder-left textarea,
.builder-right input,
.builder-right select,
.builder-right textarea {
  border-color: rgba(101, 147, 224, 0.36);
  background: rgba(8, 18, 34, 0.96);
  color: #e4eeff;
}

.node-connect-row {
  margin-top: 10px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.node-handle {
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 3px;
  padding: 0;
  box-shadow: 0 0 0 2px rgba(4, 9, 20, 0.75);
}

.node-handle.in {
  background: #7fc9ff;
}

.node-handle.out {
  background: #92f8dc;
}

.node-handle.active {
  box-shadow:
    0 0 0 2px rgba(4, 9, 20, 0.75),
    0 0 0 4px rgba(131, 184, 255, 0.42);
}

.node-handle.linked {
  filter: saturate(1.15) brightness(1.06);
}

.node-handle:focus {
  outline: none;
  box-shadow:
    0 0 0 2px rgba(4, 9, 20, 0.75),
    0 0 0 4px rgba(116, 172, 255, 0.34);
}

.node-handle:hover {
  transform: scale(1.15);
}

.node-input-handle {
  margin-top: 0;
  left: calc(-1 * var(--builder-port-half, 7px));
}

.node-outputs {
  display: grid;
  gap: 10px;
}

.node-handle-abs {
  position: absolute;
  z-index: 4;
}

.node-output-handle {
  right: calc(-1 * var(--builder-port-half, 7px));
}

.builder-canvas .muted-line {
  color: #9db7df;
}

.builder-save {
  position: absolute;
  inset: 0;
  z-index: 24;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 8, 19, 0.62);
}

.builder-save-card {
  width: min(530px, calc(100vw - 36px));
  border: 1px solid rgba(175, 190, 212, 0.28);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(34, 44, 58, 0.98), rgba(25, 34, 46, 0.98));
  box-shadow: var(--shadow-xl);
  padding: 14px;
  display: grid;
  gap: 11px;
}

.builder-save-title {
  font-size: 16px;
  font-weight: 700;
  color: #e6edf7;
}

.builder-save-card label {
  display: grid;
  gap: 6px;
}

.builder-preflight-summary {
  border: 1px solid rgba(117, 151, 200, 0.3);
  border-radius: 10px;
  padding: 8px 10px;
  background: #101828;
  display: grid;
  gap: 6px;
}

.builder-preflight-summary.ok {
  border-color: rgba(56, 195, 123, 0.6);
  background: rgba(15, 54, 34, 0.32);
}

.builder-preflight-summary.error {
  border-color: rgba(230, 98, 98, 0.64);
  background: rgba(62, 20, 26, 0.34);
}

.builder-preflight-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #cde2ff;
}

.builder-preflight-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
}

.builder-preflight-list li {
  color: #cfe2ff;
  font-size: 12px;
  line-height: 1.4;
}

.builder-canvas-head .row-actions .btn {
  min-width: 34px;
  padding: 6px 10px;
}

#builderZoomOutBtn,
#builderZoomInBtn {
  font-size: 18px;
  line-height: 1;
  font-weight: 700;
}

.builder-left label {
  color: #c2d8fa;
}

/* Capture Bot Position Button */
.btn-capture-pos {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  margin-bottom: 6px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  background: rgba(14, 165, 233, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #7dd3fc;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
}
.btn-capture-pos:hover {
  background: rgba(14, 165, 233, 0.3);
  border-color: #38bdf8;
  color: #fff;
}

/* Quick Favorites Row in Component Palette */
.palette-favorites {
  padding: 8px;
  margin-bottom: 8px;
  background: rgba(30, 41, 59, 0.7);
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.2);
}
.palette-favorites-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fbbf24;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.palette-favorites-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
}
.palette-fav-btn {
  padding: 5px 6px;
  font-size: 11px;
  font-weight: 600;
  text-align: left;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.palette-fav-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.5);
  color: #fff;
}

