/* Professional workflow canvas.
   The simple studio stays unchanged; these rules only apply to advanced users. */
body.theme-neofuture .professional-workspace {
  --pro-node-step: 248px;
  --pro-canvas: #e9eff3;
  --pro-panel: #f9fbfc;
  --pro-surface: #ffffff;
  --pro-line: #c5d0d8;
  --pro-line-strong: #8195a3;
  --pro-ink: #17232d;
  --pro-muted: #71818d;
  --pro-cyan: #087f99;
  --pro-orange: #d95b2b;
  --pro-green: #3e8f6d;
  background: var(--pro-canvas);
  color: var(--pro-ink);
}

body.theme-neofuture .professional-workspace .pro-rail,
body.theme-neofuture .professional-workspace .pro-inspector {
  background: var(--pro-panel);
}

body.theme-neofuture .professional-workspace .pro-stage-toolbar {
  border-bottom-color: var(--pro-line);
  background: rgba(249, 251, 252, .96);
}

body.theme-neofuture .professional-workspace .pro-canvas-viewport {
  isolation: isolate;
  background-color: var(--pro-canvas);
  background-image:
    linear-gradient(180deg, rgba(237, 242, 245, .8), rgba(223, 232, 238, .9)),
    url("/static/backgrounds/professional-mecha-atelier.webp");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%, cover;
}

body.theme-neofuture .professional-workspace .pro-canvas-viewport::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 18px;
  pointer-events: none;
  background:
    linear-gradient(#087f99, #087f99) left top / 92px 2px no-repeat,
    linear-gradient(#087f99, #087f99) left top / 2px 58px no-repeat,
    linear-gradient(#d95b2b, #d95b2b) right bottom / 92px 2px no-repeat,
    linear-gradient(#d95b2b, #d95b2b) right bottom / 2px 58px no-repeat;
  opacity: .42;
}

body.theme-neofuture .professional-workspace .pro-canvas-viewport::after {
  content: "";
  position: absolute;
  z-index: 0;
  right: -36px;
  top: 72px;
  width: min(30vw, 330px);
  height: 158px;
  pointer-events: none;
  border: 1px solid rgba(8, 127, 153, .13);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .34) 0 32%, transparent 32%),
    linear-gradient(315deg, rgba(8, 127, 153, .12), rgba(185, 64, 120, .05) 56%, transparent 56%);
  clip-path: polygon(17% 0, 100% 0, 100% 70%, 78% 100%, 0 100%, 9% 35%);
}

body.theme-neofuture .professional-workspace .aiwp-main-scene {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: .92;
  pointer-events: none;
  mix-blend-mode: multiply;
  mask-image: linear-gradient(to bottom, transparent 0 10%, #000 34% 100%);
}

body.theme-neofuture .professional-workspace .pro-canvas-origin {
  position: relative;
  z-index: 1;
}

body.theme-neofuture .professional-workspace .pro-version-strip {
  position: sticky;
  z-index: 7;
  top: 12px;
  left: 12px;
  width: max-content;
  max-width: calc(100% - 24px);
  min-height: 42px;
  margin: 12px auto -54px;
  padding: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  border: 1px solid rgba(159, 178, 192, .78);
  border-radius: 7px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 10px 26px rgba(31, 52, 67, .11);
  backdrop-filter: blur(12px);
}

body.theme-neofuture .professional-workspace .pro-version-label {
  height: 32px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--pro-muted);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

body.theme-neofuture .professional-workspace .pro-version-label svg {
  width: 13px;
  height: 13px;
}

body.theme-neofuture .professional-workspace .pro-version-strip button {
  height: 32px;
  min-width: 104px;
  padding: 4px 9px;
  display: grid;
  grid-template-columns: 1fr;
  align-content: center;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--pro-ink);
  text-align: left;
  cursor: pointer;
}

body.theme-neofuture .professional-workspace .pro-version-strip button:hover:not(:disabled) {
  border-color: var(--pro-line);
  background: #f0f4f6;
}

body.theme-neofuture .professional-workspace .pro-version-strip button.active {
  border-color: rgba(8, 127, 153, .42);
  background: #e8f5f7;
  color: #075f72;
}

body.theme-neofuture .professional-workspace .pro-version-strip button:disabled {
  cursor: not-allowed;
  opacity: .58;
}

body.theme-neofuture .professional-workspace .pro-version-strip strong,
body.theme-neofuture .professional-workspace .pro-version-strip small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.theme-neofuture .professional-workspace .pro-version-strip strong {
  font-size: 10px;
  font-weight: 720;
}

body.theme-neofuture .professional-workspace .pro-version-strip small {
  margin-top: 1px;
  color: var(--pro-muted);
  font-size: 8px;
  font-weight: 520;
}

body.theme-neofuture .professional-workspace .pro-canvas-origin {
  padding-right: 40px;
  padding-left: 40px;
  padding-top: 148px;
  padding-bottom: 148px;
}

body.theme-neofuture .professional-workspace .pro-node-track {
  gap: 58px;
}

body.theme-neofuture .professional-workspace .pro-node-card {
  width: 190px;
  height: 126px;
  flex-basis: 190px;
  padding: 14px;
  overflow: visible;
  border-color: var(--pro-line);
  border-radius: 7px;
  background: var(--pro-surface);
  box-shadow: 0 6px 18px rgba(31, 52, 67, .08);
}

body.theme-neofuture .professional-workspace .pro-node-card:hover {
  border-color: #7695a8;
  box-shadow: 0 11px 26px rgba(31, 52, 67, .13);
}

body.theme-neofuture .professional-workspace .pro-node-card.selected {
  border-color: var(--pro-orange);
  box-shadow: 0 0 0 3px rgba(217, 91, 43, .13), 0 12px 28px rgba(31, 52, 67, .14);
}

body.theme-neofuture .professional-workspace .pro-node-card:not(:last-child)::after {
  top: 61px;
  width: 59px;
  height: 2px;
  background: var(--pro-line-strong);
}

body.theme-neofuture .professional-workspace .pro-node-card.complete:not(:last-child)::after {
  background: var(--pro-green);
}

body.theme-neofuture .professional-workspace .pro-node-card:not(:last-child)::before {
  left: calc(100% + 50px);
  top: 56px;
  border-color: var(--pro-line-strong);
}

body.theme-neofuture .professional-workspace .pro-node-card.complete:not(:last-child)::before {
  border-color: var(--pro-green);
}

body.theme-neofuture .professional-workspace .pro-node-index {
  position: absolute;
  top: 10px;
  right: 12px;
  color: #93a2ad;
  font-family: var(--aiwp-font-mono);
  font-size: 8px;
  font-weight: 700;
}

body.theme-neofuture .professional-workspace .pro-node-top {
  padding-right: 24px;
}

body.theme-neofuture .professional-workspace .pro-node-port {
  position: absolute;
  z-index: 3;
  top: 57px;
  width: 9px;
  height: 9px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: var(--pro-line-strong);
  box-shadow: 0 0 0 1px rgba(90, 112, 126, .28);
  pointer-events: none;
}

body.theme-neofuture .professional-workspace .pro-node-port-in {
  left: -5px;
}

body.theme-neofuture .professional-workspace .pro-node-port-out {
  right: -5px;
}

body.theme-neofuture .professional-workspace .pro-node-card.complete .pro-node-port {
  background: var(--pro-green);
}

body.theme-neofuture .professional-workspace .pro-node-card.running .pro-node-port {
  background: var(--pro-cyan);
}

body.theme-neofuture .professional-workspace .pro-node-card.failed .pro-node-port {
  background: var(--aiwp-danger);
}

body.theme-neofuture .professional-workspace .pro-feedback-branch {
  position: relative;
  width: min(470px, calc(100vw - 120px));
  min-height: 58px;
  margin: 64px auto 0;
  padding: 10px 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #aac7d0;
  border-radius: 7px;
  background: #f7fcfd;
  color: #285e6a;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 7px 18px rgba(31, 52, 67, .07);
}

body.theme-neofuture .professional-workspace .pro-feedback-branch::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 100%;
  width: 1px;
  height: 64px;
  background: #88aab5;
}

body.theme-neofuture .professional-workspace .pro-feedback-branch::after {
  content: "";
  position: absolute;
  left: calc(50% - 4px);
  top: -64px;
  width: 7px;
  height: 7px;
  border-top: 1px solid #88aab5;
  border-left: 1px solid #88aab5;
  transform: rotate(45deg);
}

body.theme-neofuture .professional-workspace .pro-feedback-branch:hover {
  border-color: var(--pro-cyan);
  background: #eef9fb;
}

body.theme-neofuture .professional-workspace .pro-feedback-branch > svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

body.theme-neofuture .professional-workspace .pro-feedback-branch span,
body.theme-neofuture .professional-workspace .pro-feedback-branch strong,
body.theme-neofuture .professional-workspace .pro-feedback-branch small {
  display: block;
}

body.theme-neofuture .professional-workspace .pro-feedback-branch strong {
  font-size: 11px;
  font-weight: 760;
}

body.theme-neofuture .professional-workspace .pro-feedback-branch small {
  margin-top: 3px;
  color: #67818a;
  font-size: 9px;
  line-height: 1.45;
}

body.theme-neofuture .professional-workspace .pro-feedback-branch.pro-video-route {
  border-color: #e5b79e;
  background: #fff9f5;
  color: #94471f;
  transform: translateX(calc(var(--pro-node-step) * -1));
}

body.theme-neofuture .professional-workspace .pro-feedback-branch.pro-image-route {
  transform: translateX(var(--pro-node-step));
}

body.theme-neofuture .professional-workspace .pro-run-progress {
  width: min(220px, 24vw);
  height: 4px;
  overflow: hidden;
  border-radius: 2px;
  background: #dce4e9;
}

body.theme-neofuture .professional-workspace .pro-run-progress > span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--pro-cyan);
  transition: width 240ms ease-out;
}

body.theme-neofuture .professional-workspace .pro-inspector-head {
  min-height: 96px;
}

body.theme-neofuture .professional-workspace .pro-inspector-commands {
  margin-top: 11px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

body.theme-neofuture .professional-workspace .pro-inspector-commands button {
  min-width: 0;
  height: 31px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--pro-line);
  border-radius: 5px;
  background: #ffffff;
  color: #40515e;
  font-size: 9px;
  font-weight: 680;
  cursor: pointer;
}

body.theme-neofuture .professional-workspace .pro-inspector-commands button:hover:not(:disabled) {
  border-color: var(--pro-cyan);
  color: #075f72;
}

body.theme-neofuture .professional-workspace .pro-inspector-commands button:disabled {
  cursor: not-allowed;
  opacity: .52;
}

body.theme-neofuture .professional-workspace .pro-inspector-commands svg {
  width: 12px;
  height: 12px;
}

@media (max-width: 1320px) {
  body.theme-neofuture .professional-workspace {
    --pro-node-step: 224px;
  }
  body.theme-neofuture .professional-workspace .pro-node-card {
    width: 174px;
    flex-basis: 174px;
  }

  body.theme-neofuture .professional-workspace .pro-node-track {
    gap: 50px;
  }

  body.theme-neofuture .professional-workspace .pro-node-card:not(:last-child)::after {
    width: 51px;
  }

  body.theme-neofuture .professional-workspace .pro-node-card:not(:last-child)::before {
    left: calc(100% + 42px);
  }
}

@media (max-width: 760px) {
  body.theme-neofuture .professional-workspace .pro-version-strip {
    top: 8px;
    max-width: calc(100% - 16px);
    margin-top: 8px;
  }

  body.theme-neofuture .professional-workspace .pro-version-strip button {
    min-width: 94px;
  }

  body.theme-neofuture .professional-workspace .pro-canvas-origin {
    padding: 96px 30px 110px;
  }

  body.theme-neofuture .professional-workspace .pro-feedback-branch {
    width: min(420px, calc(100vw - 72px));
  }

  body.theme-neofuture .professional-workspace .pro-run-progress {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.theme-neofuture .professional-workspace .pro-run-progress > span {
    transition: none;
  }
}
