/* this gets exported as style.css and can be used for the default theming */
/* these are the necessary styles for React/Svelte Flow, they get used by base.css and style.css */
.react-flow {
  direction: ltr;

  --xy-edge-stroke-default: #b1b1b7;
  --xy-edge-stroke-width-default: 1;
  --xy-edge-stroke-selected-default: #555;

  --xy-connectionline-stroke-default: #b1b1b7;
  --xy-connectionline-stroke-width-default: 1;

  --xy-attribution-background-color-default: rgba(255, 255, 255, 0.5);

  --xy-minimap-background-color-default: #fff;
  --xy-minimap-mask-background-color-default: rgba(240, 240, 240, 0.6);
  --xy-minimap-mask-stroke-color-default: transparent;
  --xy-minimap-mask-stroke-width-default: 1;
  --xy-minimap-node-background-color-default: #e2e2e2;
  --xy-minimap-node-stroke-color-default: transparent;
  --xy-minimap-node-stroke-width-default: 2;

  --xy-background-color-default: transparent;
  --xy-background-pattern-dots-color-default: #91919a;
  --xy-background-pattern-lines-color-default: #eee;
  --xy-background-pattern-cross-color-default: #e2e2e2;
  background-color: var(--xy-background-color, var(--xy-background-color-default));
  --xy-node-color-default: inherit;
  --xy-node-border-default: 1px solid #1a192b;
  --xy-node-background-color-default: #fff;
  --xy-node-group-background-color-default: rgba(240, 240, 240, 0.25);
  --xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(0, 0, 0, 0.08);
  --xy-node-boxshadow-selected-default: 0 0 0 0.5px #1a192b;
  --xy-node-border-radius-default: 3px;

  --xy-handle-background-color-default: #1a192b;
  --xy-handle-border-color-default: #fff;

  --xy-selection-background-color-default: rgba(0, 89, 220, 0.08);
  --xy-selection-border-default: 1px dotted rgba(0, 89, 220, 0.8);

  --xy-controls-button-background-color-default: #fefefe;
  --xy-controls-button-background-color-hover-default: #f4f4f4;
  --xy-controls-button-color-default: inherit;
  --xy-controls-button-color-hover-default: inherit;
  --xy-controls-button-border-color-default: #eee;
  --xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, 0.08);

  --xy-edge-label-background-color-default: #ffffff;
  --xy-edge-label-color-default: inherit;
  --xy-resize-background-color-default: #3367d9;
}
.react-flow.dark {
  --xy-edge-stroke-default: #3e3e3e;
  --xy-edge-stroke-width-default: 1;
  --xy-edge-stroke-selected-default: #727272;

  --xy-connectionline-stroke-default: #b1b1b7;
  --xy-connectionline-stroke-width-default: 1;

  --xy-attribution-background-color-default: rgba(150, 150, 150, 0.25);

  --xy-minimap-background-color-default: #141414;
  --xy-minimap-mask-background-color-default: rgba(60, 60, 60, 0.6);
  --xy-minimap-mask-stroke-color-default: transparent;
  --xy-minimap-mask-stroke-width-default: 1;
  --xy-minimap-node-background-color-default: #2b2b2b;
  --xy-minimap-node-stroke-color-default: transparent;
  --xy-minimap-node-stroke-width-default: 2;

  --xy-background-color-default: #141414;
  --xy-background-pattern-dots-color-default: #555;
  --xy-background-pattern-lines-color-default: #333;
  --xy-background-pattern-cross-color-default: #333;
  --xy-node-color-default: #f8f8f8;
  --xy-node-border-default: 1px solid #3c3c3c;
  --xy-node-background-color-default: #1e1e1e;
  --xy-node-group-background-color-default: rgba(240, 240, 240, 0.25);
  --xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(255, 255, 255, 0.08);
  --xy-node-boxshadow-selected-default: 0 0 0 0.5px #999;

  --xy-handle-background-color-default: #bebebe;
  --xy-handle-border-color-default: #1e1e1e;

  --xy-selection-background-color-default: rgba(200, 200, 220, 0.08);
  --xy-selection-border-default: 1px dotted rgba(200, 200, 220, 0.8);

  --xy-controls-button-background-color-default: #2b2b2b;
  --xy-controls-button-background-color-hover-default: #3e3e3e;
  --xy-controls-button-color-default: #f8f8f8;
  --xy-controls-button-color-hover-default: #fff;
  --xy-controls-button-border-color-default: #5b5b5b;
  --xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, 0.08);

  --xy-edge-label-background-color-default: #141414;
  --xy-edge-label-color-default: #f8f8f8;
}
.react-flow__background {
  background-color: var(--xy-background-color-props, var(--xy-background-color, var(--xy-background-color-default)));
  pointer-events: none;
  z-index: -1;
}
.react-flow__container {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}
.react-flow__pane {
  z-index: 1;
  touch-action: none;
}
.react-flow__pane.draggable {
    cursor: grab;
  }
.react-flow__pane.dragging {
    cursor: grabbing;
  }
.react-flow__pane.selection {
    cursor: pointer;
  }
.react-flow__viewport {
  transform-origin: 0 0;
  z-index: 2;
  pointer-events: none;
}
.react-flow__renderer {
  z-index: 4;
}
.react-flow__selection {
  z-index: 6;
}
.react-flow__nodesselection-rect:focus,
.react-flow__nodesselection-rect:focus-visible {
  outline: none;
}
.react-flow__edge-path {
  stroke: var(--xy-edge-stroke, var(--xy-edge-stroke-default));
  stroke-width: var(--xy-edge-stroke-width, var(--xy-edge-stroke-width-default));
  fill: none;
}
.react-flow__connection-path {
  stroke: var(--xy-connectionline-stroke, var(--xy-connectionline-stroke-default));
  stroke-width: var(--xy-connectionline-stroke-width, var(--xy-connectionline-stroke-width-default));
  fill: none;
}
.react-flow .react-flow__edges {
  position: absolute;
}
.react-flow .react-flow__edges svg {
    overflow: visible;
    position: absolute;
    pointer-events: none;
  }
.react-flow__edge {
  pointer-events: visibleStroke;
}
.react-flow__edge.selectable {
    cursor: pointer;
  }
.react-flow__edge.animated path {
    stroke-dasharray: 5;
    animation: dashdraw 0.5s linear infinite;
  }
.react-flow__edge.animated path.react-flow__edge-interaction {
    stroke-dasharray: none;
    animation: none;
  }
.react-flow__edge.inactive {
    pointer-events: none;
  }
.react-flow__edge.selected,
  .react-flow__edge:focus,
  .react-flow__edge:focus-visible {
    outline: none;
  }
.react-flow__edge.selected .react-flow__edge-path,
  .react-flow__edge.selectable:focus .react-flow__edge-path,
  .react-flow__edge.selectable:focus-visible .react-flow__edge-path {
    stroke: var(--xy-edge-stroke-selected, var(--xy-edge-stroke-selected-default));
  }
.react-flow__edge-textwrapper {
    pointer-events: all;
  }
.react-flow__edge .react-flow__edge-text {
    pointer-events: none;
    -webkit-user-select: none;
       -moz-user-select: none;
            user-select: none;
  }
/* Arrowhead marker styles - use CSS custom properties as default */
.react-flow__arrowhead polyline {
  stroke: var(--xy-edge-stroke, var(--xy-edge-stroke-default));
}
.react-flow__arrowhead polyline.arrowclosed {
  fill: var(--xy-edge-stroke, var(--xy-edge-stroke-default));
}
.react-flow__connection {
  pointer-events: none;
}
.react-flow__connection .animated {
    stroke-dasharray: 5;
    animation: dashdraw 0.5s linear infinite;
  }
svg.react-flow__connectionline {
  z-index: 1001;
  overflow: visible;
  position: absolute;
}
.react-flow__nodes {
  pointer-events: none;
  transform-origin: 0 0;
}
.react-flow__node {
  position: absolute;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  pointer-events: all;
  transform-origin: 0 0;
  box-sizing: border-box;
  cursor: default;
}
.react-flow__node.selectable {
    cursor: pointer;
  }
.react-flow__node.draggable {
    cursor: grab;
    pointer-events: all;
  }
.react-flow__node.draggable.dragging {
      cursor: grabbing;
    }
.react-flow__nodesselection {
  z-index: 3;
  transform-origin: left top;
  pointer-events: none;
}
.react-flow__nodesselection-rect {
    position: absolute;
    pointer-events: all;
    cursor: grab;
  }
.react-flow__handle {
  position: absolute;
  pointer-events: none;
  min-width: 5px;
  min-height: 5px;
  width: 6px;
  height: 6px;
  background-color: var(--xy-handle-background-color, var(--xy-handle-background-color-default));
  border: 1px solid var(--xy-handle-border-color, var(--xy-handle-border-color-default));
  border-radius: 100%;
}
.react-flow__handle.connectingfrom {
    pointer-events: all;
  }
.react-flow__handle.connectionindicator {
    pointer-events: all;
    cursor: crosshair;
  }
.react-flow__handle-bottom {
    top: auto;
    left: 50%;
    bottom: 0;
    transform: translate(-50%, 50%);
  }
.react-flow__handle-top {
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
  }
.react-flow__handle-left {
    top: 50%;
    left: 0;
    transform: translate(-50%, -50%);
  }
.react-flow__handle-right {
    top: 50%;
    right: 0;
    transform: translate(50%, -50%);
  }
.react-flow__edgeupdater {
  cursor: move;
  pointer-events: all;
}
.react-flow__pane.selection .react-flow__panel {
  pointer-events: none;
}
.react-flow__panel {
  position: absolute;
  z-index: 5;
  margin: 15px;
}
.react-flow__panel.top {
    top: 0;
  }
.react-flow__panel.bottom {
    bottom: 0;
  }
.react-flow__panel.top.center, .react-flow__panel.bottom.center {
      left: 50%;
      transform: translateX(-15px) translateX(-50%);
    }
.react-flow__panel.left {
    left: 0;
  }
.react-flow__panel.right {
    right: 0;
  }
.react-flow__panel.left.center, .react-flow__panel.right.center {
      top: 50%;
      transform: translateY(-15px) translateY(-50%);
    }
.react-flow__attribution {
  font-size: 10px;
  background: var(--xy-attribution-background-color, var(--xy-attribution-background-color-default));
  padding: 2px 3px;
  margin: 0;
}
.react-flow__attribution a {
    text-decoration: none;
    color: #999;
  }
@keyframes dashdraw {
  from {
    stroke-dashoffset: 10;
  }
}
.react-flow__edgelabel-renderer {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  left: 0;
  top: 0;
}
.react-flow__viewport-portal {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.react-flow__minimap {
  background: var(
    --xy-minimap-background-color-props,
    var(--xy-minimap-background-color, var(--xy-minimap-background-color-default))
  );
}
.react-flow__minimap-svg {
    display: block;
  }
.react-flow__minimap-mask {
    fill: var(
      --xy-minimap-mask-background-color-props,
      var(--xy-minimap-mask-background-color, var(--xy-minimap-mask-background-color-default))
    );
    stroke: var(
      --xy-minimap-mask-stroke-color-props,
      var(--xy-minimap-mask-stroke-color, var(--xy-minimap-mask-stroke-color-default))
    );
    stroke-width: var(
      --xy-minimap-mask-stroke-width-props,
      var(--xy-minimap-mask-stroke-width, var(--xy-minimap-mask-stroke-width-default))
    );
  }
.react-flow__minimap-node {
    fill: var(
      --xy-minimap-node-background-color-props,
      var(--xy-minimap-node-background-color, var(--xy-minimap-node-background-color-default))
    );
    stroke: var(
      --xy-minimap-node-stroke-color-props,
      var(--xy-minimap-node-stroke-color, var(--xy-minimap-node-stroke-color-default))
    );
    stroke-width: var(
      --xy-minimap-node-stroke-width-props,
      var(--xy-minimap-node-stroke-width, var(--xy-minimap-node-stroke-width-default))
    );
  }
.react-flow__background-pattern.dots {
    fill: var(
      --xy-background-pattern-color-props,
      var(--xy-background-pattern-color, var(--xy-background-pattern-dots-color-default))
    );
  }
.react-flow__background-pattern.lines {
    stroke: var(
      --xy-background-pattern-color-props,
      var(--xy-background-pattern-color, var(--xy-background-pattern-lines-color-default))
    );
  }
.react-flow__background-pattern.cross {
    stroke: var(
      --xy-background-pattern-color-props,
      var(--xy-background-pattern-color, var(--xy-background-pattern-cross-color-default))
    );
  }
.react-flow__controls {
  display: flex;
  flex-direction: column;
  box-shadow: var(--xy-controls-box-shadow, var(--xy-controls-box-shadow-default));
}
.react-flow__controls.horizontal {
    flex-direction: row;
  }
.react-flow__controls-button {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 26px;
    width: 26px;
    padding: 4px;
    border: none;
    background: var(--xy-controls-button-background-color, var(--xy-controls-button-background-color-default));
    border-bottom: 1px solid
      var(
        --xy-controls-button-border-color-props,
        var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default))
      );
    color: var(
      --xy-controls-button-color-props,
      var(--xy-controls-button-color, var(--xy-controls-button-color-default))
    );
    cursor: pointer;
    -webkit-user-select: none;
       -moz-user-select: none;
            user-select: none;
  }
.react-flow__controls-button svg {
      width: 100%;
      max-width: 12px;
      max-height: 12px;
      fill: currentColor;
    }
.react-flow__edge.updating .react-flow__edge-path {
      stroke: #777;
    }
.react-flow__edge-text {
    font-size: 10px;
  }
.react-flow__node.selectable:focus,
  .react-flow__node.selectable:focus-visible {
    outline: none;
  }
.react-flow__node-input,
.react-flow__node-default,
.react-flow__node-output,
.react-flow__node-group {
  padding: 10px;
  border-radius: var(--xy-node-border-radius, var(--xy-node-border-radius-default));
  width: 150px;
  font-size: 12px;
  color: var(--xy-node-color, var(--xy-node-color-default));
  text-align: center;
  border: var(--xy-node-border, var(--xy-node-border-default));
  background-color: var(--xy-node-background-color, var(--xy-node-background-color-default));
}
.react-flow__node-input.selectable:hover, .react-flow__node-default.selectable:hover, .react-flow__node-output.selectable:hover, .react-flow__node-group.selectable:hover {
      box-shadow: var(--xy-node-boxshadow-hover, var(--xy-node-boxshadow-hover-default));
    }
.react-flow__node-input.selectable.selected,
    .react-flow__node-input.selectable:focus,
    .react-flow__node-input.selectable:focus-visible,
    .react-flow__node-default.selectable.selected,
    .react-flow__node-default.selectable:focus,
    .react-flow__node-default.selectable:focus-visible,
    .react-flow__node-output.selectable.selected,
    .react-flow__node-output.selectable:focus,
    .react-flow__node-output.selectable:focus-visible,
    .react-flow__node-group.selectable.selected,
    .react-flow__node-group.selectable:focus,
    .react-flow__node-group.selectable:focus-visible {
      box-shadow: var(--xy-node-boxshadow-selected, var(--xy-node-boxshadow-selected-default));
    }
.react-flow__node-group {
  background-color: var(--xy-node-group-background-color, var(--xy-node-group-background-color-default));
}
.react-flow__nodesselection-rect,
.react-flow__selection {
  background: var(--xy-selection-background-color, var(--xy-selection-background-color-default));
  border: var(--xy-selection-border, var(--xy-selection-border-default));
}
.react-flow__nodesselection-rect:focus,
  .react-flow__nodesselection-rect:focus-visible,
  .react-flow__selection:focus,
  .react-flow__selection:focus-visible {
    outline: none;
  }
.react-flow__controls-button:hover {
      background: var(
        --xy-controls-button-background-color-hover-props,
        var(--xy-controls-button-background-color-hover, var(--xy-controls-button-background-color-hover-default))
      );
      color: var(
        --xy-controls-button-color-hover-props,
        var(--xy-controls-button-color-hover, var(--xy-controls-button-color-hover-default))
      );
    }
.react-flow__controls-button:disabled {
      pointer-events: none;
    }
.react-flow__controls-button:disabled svg {
        fill-opacity: 0.4;
      }
.react-flow__controls-button:last-child {
    border-bottom: none;
  }
.react-flow__controls.horizontal .react-flow__controls-button {
    border-bottom: none;
    border-right: 1px solid
      var(
        --xy-controls-button-border-color-props,
        var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default))
      );
  }
.react-flow__controls.horizontal .react-flow__controls-button:last-child {
    border-right: none;
  }
.react-flow__resize-control {
  position: absolute;
}
.react-flow__resize-control.left,
.react-flow__resize-control.right {
  cursor: ew-resize;
}
.react-flow__resize-control.top,
.react-flow__resize-control.bottom {
  cursor: ns-resize;
}
.react-flow__resize-control.top.left,
.react-flow__resize-control.bottom.right {
  cursor: nwse-resize;
}
.react-flow__resize-control.bottom.left,
.react-flow__resize-control.top.right {
  cursor: nesw-resize;
}
/* handle styles */
.react-flow__resize-control.handle {
  width: 5px;
  height: 5px;
  border: 1px solid #fff;
  border-radius: 1px;
  background-color: var(--xy-resize-background-color, var(--xy-resize-background-color-default));
  translate: -50% -50%;
}
.react-flow__resize-control.handle.left {
  left: 0;
  top: 50%;
}
.react-flow__resize-control.handle.right {
  left: 100%;
  top: 50%;
}
.react-flow__resize-control.handle.top {
  left: 50%;
  top: 0;
}
.react-flow__resize-control.handle.bottom {
  left: 50%;
  top: 100%;
}
.react-flow__resize-control.handle.top.left {
  left: 0;
}
.react-flow__resize-control.handle.bottom.left {
  left: 0;
}
.react-flow__resize-control.handle.top.right {
  left: 100%;
}
.react-flow__resize-control.handle.bottom.right {
  left: 100%;
}
/* line styles */
.react-flow__resize-control.line {
  border-color: var(--xy-resize-background-color, var(--xy-resize-background-color-default));
  border-width: 0;
  border-style: solid;
}
.react-flow__resize-control.line.left,
.react-flow__resize-control.line.right {
  width: 1px;
  transform: translate(-50%, 0);
  top: 0;
  height: 100%;
}
.react-flow__resize-control.line.left {
  left: 0;
  border-left-width: 1px;
}
.react-flow__resize-control.line.right {
  left: 100%;
  border-right-width: 1px;
}
.react-flow__resize-control.line.top,
.react-flow__resize-control.line.bottom {
  height: 1px;
  transform: translate(0, -50%);
  left: 0;
  width: 100%;
}
.react-flow__resize-control.line.top {
  top: 0;
  border-top-width: 1px;
}
.react-flow__resize-control.line.bottom {
  border-bottom-width: 1px;
  top: 100%;
}
.react-flow__edge-textbg {
  fill: var(--xy-edge-label-background-color, var(--xy-edge-label-background-color-default));
}
.react-flow__edge-text {
  fill: var(--xy-edge-label-color, var(--xy-edge-label-color-default));
}
/**
 * Copyright (c) 2014 The xterm.js authors. All rights reserved.
 * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
 * https://github.com/chjj/term.js
 * @license MIT
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 * Originally forked from (with the author's permission):
 *   Fabrice Bellard's javascript vt100 for jslinux:
 *   http://bellard.org/jslinux/
 *   Copyright (c) 2011 Fabrice Bellard
 *   The original design remains. The terminal itself
 *   has been extended to include xterm CSI codes, among
 *   other features.
 */

/**
 *  Default styles for xterm.js
 */

.xterm {
    cursor: text;
    position: relative;
    user-select: none;
    -ms-user-select: none;
    -webkit-user-select: none;
}

.xterm.focus,
.xterm:focus {
    outline: none;
}

.xterm .xterm-helpers {
    position: absolute;
    top: 0;
    /**
     * The z-index of the helpers must be higher than the canvases in order for
     * IMEs to appear on top.
     */
    z-index: 5;
}

.xterm .xterm-helper-textarea {
    padding: 0;
    border: 0;
    margin: 0;
    /* Move textarea out of the screen to the far left, so that the cursor is not visible */
    position: absolute;
    opacity: 0;
    left: -9999em;
    top: 0;
    width: 0;
    height: 0;
    z-index: -5;
    /** Prevent wrapping so the IME appears against the textarea at the correct position */
    white-space: nowrap;
    overflow: hidden;
    resize: none;
}

.xterm .composition-view {
    /* TODO: Composition position got messed up somewhere */
    background: #000;
    color: #FFF;
    display: none;
    position: absolute;
    white-space: nowrap;
    z-index: 1;
}

.xterm .composition-view.active {
    display: block;
}

.xterm .xterm-viewport {
    /* On OS X this is required in order for the scroll bar to appear fully opaque */
    background-color: #000;
    overflow-y: scroll;
    cursor: default;
    position: absolute;
    right: 0;
    left: 0;
    top: 0;
    bottom: 0;
}

.xterm .xterm-screen {
    position: relative;
}

.xterm .xterm-screen canvas {
    position: absolute;
    left: 0;
    top: 0;
}

.xterm-char-measure-element {
    display: inline-block;
    visibility: hidden;
    position: absolute;
    top: 0;
    left: -9999em;
    line-height: normal;
}

.xterm.enable-mouse-events {
    /* When mouse events are enabled (eg. tmux), revert to the standard pointer cursor */
    cursor: default;
}

.xterm.xterm-cursor-pointer,
.xterm .xterm-cursor-pointer {
    cursor: pointer;
}

.xterm.column-select.focus {
    /* Column selection mode */
    cursor: crosshair;
}

.xterm .xterm-accessibility:not(.debug),
.xterm .xterm-message {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    right: 0;
    z-index: 10;
    color: transparent;
    pointer-events: none;
}

.xterm .xterm-accessibility-tree:not(.debug) *::selection {
  color: transparent;
}

.xterm .xterm-accessibility-tree {
  font-family: monospace;
  user-select: text;
  white-space: pre;
}

.xterm .xterm-accessibility-tree > div {
  transform-origin: left;
  width: fit-content;
}

.xterm .live-region {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.xterm-dim {
    /* Dim should not apply to background, so the opacity of the foreground color is applied
     * explicitly in the generated class and reset to 1 here */
    opacity: 1 !important;
}

.xterm-underline-1 { text-decoration: underline; }
.xterm-underline-2 { text-decoration: double underline; }
.xterm-underline-3 { text-decoration: wavy underline; }
.xterm-underline-4 { text-decoration: dotted underline; }
.xterm-underline-5 { text-decoration: dashed underline; }

.xterm-overline {
    text-decoration: overline;
}

.xterm-overline.xterm-underline-1 { text-decoration: overline underline; }
.xterm-overline.xterm-underline-2 { text-decoration: overline double underline; }
.xterm-overline.xterm-underline-3 { text-decoration: overline wavy underline; }
.xterm-overline.xterm-underline-4 { text-decoration: overline dotted underline; }
.xterm-overline.xterm-underline-5 { text-decoration: overline dashed underline; }

.xterm-strikethrough {
    text-decoration: line-through;
}

.xterm-screen .xterm-decoration-container .xterm-decoration {
	z-index: 6;
	position: absolute;
}

.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer {
	z-index: 7;
}

.xterm-decoration-overview-ruler {
    z-index: 8;
    position: absolute;
    top: 0;
    right: 0;
    pointer-events: none;
}

.xterm-decoration-top {
    z-index: 2;
    position: relative;
}



/* Derived from vs/base/browser/ui/scrollbar/media/scrollbar.css */

/* xterm.js customization: Override xterm's cursor style */
.xterm .xterm-scrollable-element > .scrollbar {
    cursor: default;
}

/* Arrows */
.xterm .xterm-scrollable-element > .scrollbar > .scra {
	cursor: pointer;
	font-size: 11px !important;
}

.xterm .xterm-scrollable-element > .visible {
	opacity: 1;

	/* Background rule added for IE9 - to allow clicks on dom node */
	background:rgba(0,0,0,0);

	transition: opacity 100ms linear;
	/* In front of peek view */
	z-index: 11;
}
.xterm .xterm-scrollable-element > .invisible {
	opacity: 0;
	pointer-events: none;
}
.xterm .xterm-scrollable-element > .invisible.fade {
	transition: opacity 800ms linear;
}

/* Scrollable Content Inset Shadow */
.xterm .xterm-scrollable-element > .shadow {
	position: absolute;
	display: none;
}
.xterm .xterm-scrollable-element > .shadow.top {
	display: block;
	top: 0;
	left: 3px;
	height: 3px;
	width: 100%;
	box-shadow: var(--vscode-scrollbar-shadow, #000) 0 6px 6px -6px inset;
}
.xterm .xterm-scrollable-element > .shadow.left {
	display: block;
	top: 3px;
	left: 0;
	height: 100%;
	width: 3px;
	box-shadow: var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset;
}
.xterm .xterm-scrollable-element > .shadow.top-left-corner {
	display: block;
	top: 0;
	left: 0;
	height: 3px;
	width: 3px;
}
.xterm .xterm-scrollable-element > .shadow.top.left {
	box-shadow: var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset;
}
:root {
  --bg: #0d0d0f;
  --panel: #18181b;
  --panel-2: #1f1f23;
  --line: #2e2e33;
  --text: #e6e4df;
  --muted: #94928c;
  --accent: #e8825a;
  --blue: #7aa7e8;
  --green: #7fc98b;
  --yellow: #e6c172;
  color-scheme: dark;
  font-family: 'Segoe UI Variable Text', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html, body, #root { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); font-size: 13px; overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.spacer { flex: 1; }
.canvas { position: relative; width: 100%; height: 100%; }
.react-flow { --xy-background-color: var(--bg); }

/* Barra de cima */
.toolbar {
  position: absolute; top: 12px; left: 12px; z-index: 10;
  display: flex; align-items: center; gap: 6px; padding: 6px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 9px;
}
.toolbar button {
  height: 28px; padding: 0 10px; background: transparent;
  border: 1px solid transparent; border-radius: 6px;
}
.toolbar button:hover:not(:disabled) { background: var(--panel-2); }
.toolbar button:disabled { color: #5d5c58; cursor: default; }
.toolbar button.primary { background: var(--accent); color: #1a0f0a; font-weight: 600; }
.toolbar button.primary:hover { background: #f09470; }
.divider { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }
.counter { color: var(--muted); padding: 0 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.counter.alert { color: var(--yellow); font-weight: 600; }
.menu-wrap { position: relative; }
.menu {
  position: absolute; top: 34px; left: 0; width: 190px; padding: 4px;
  display: flex; flex-direction: column;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px;
}
.menu button { text-align: left; width: 100%; }
.menu button:hover { background: #2a2a2f !important; }

/* Estado vazio */
.empty {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; pointer-events: none; text-align: center; padding: 16px;
}
.empty h1 { font-size: 20px; font-weight: 600; margin: 0 0 8px; }
.empty p { margin: 2px 0; color: var(--muted); }
.empty .muted { color: #6d6c69; }

/* Terminal */
.terminal-node {
  width: 100%; height: 100%; display: flex; flex-direction: column;
  background: #141416; border: 1px solid var(--line); border-radius: 9px; overflow: hidden;
}
.terminal-head {
  flex: none; height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 8px 0 11px;
  background: var(--panel); border-bottom: 1px solid var(--line); cursor: grab; user-select: none;
}
.terminal-head:active { cursor: grabbing; }
.terminal-title { font-weight: 600; white-space: nowrap; }
.terminal-path {
  color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.badge {
  font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 99px;
  color: var(--muted); border: 1px solid var(--line); white-space: nowrap;
}
.dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #5d5c58; }
.terminal-slot { flex: 1; min-height: 0; padding: 6px 2px 2px 8px; overflow: hidden; }
.terminal-slot .xterm { height: 100%; }
/* O viewport nativo fica atrás da barra de rolagem do xterm. Sem isto, sobra uma faixa preta. */
.terminal-slot .xterm-viewport { background-color: #141416 !important; scrollbar-width: none; }
.status-running { border-color: var(--accent); }
.status-running .dot { background: var(--accent); animation: pulse 1.4s ease-in-out infinite; }
.status-running .badge { color: var(--blue); border-color: #3a4c66; }
.status-needs_you { border-color: var(--yellow); }
.status-needs_you .dot { background: var(--yellow); animation: pulse 0.9s ease-in-out infinite; }
.status-needs_you .badge { color: #1d1608; background: var(--yellow); border-color: var(--yellow); }
.status-idle .dot { background: var(--green); }
.status-ended { opacity: 0.8; }
.icon {
  width: 24px; height: 24px; padding: 0; font-size: 16px; line-height: 1;
  color: var(--muted); background: transparent; border: 0; border-radius: 5px;
}
.icon:hover { background: var(--panel-2); color: var(--text); }
.link { background: transparent; border: 1px solid var(--line); border-radius: 5px; padding: 1px 8px; color: var(--accent); }
.link:hover { background: var(--panel-2); }

/* Cards */
.agent-card, .session-card {
  width: 100%; height: 100%; padding: 9px 12px; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
}
.agent-card { border-left: 3px solid #5d5c58; cursor: pointer; }
.agent-card:hover { background: var(--panel-2); }
.agent-card.open { outline: 1px solid var(--accent); }
.agent-working { border-left-color: var(--accent); }
.agent-working .dot { background: var(--accent); animation: pulse 1.4s ease-in-out infinite; }
.agent-done { border-left-color: var(--green); }
.agent-done .dot { background: var(--green); }
.agent-stale { border-left-color: var(--yellow); }
.agent-stale .dot { background: var(--yellow); }
/* Laranja é do Claude. Shell e watcher rodando são azuis. */
.activity-shell.agent-working { border-left-color: #7aa7e8; }
.activity-shell.agent-working .dot { background: #7aa7e8; }
/* MCP rodando é roxo. */
.activity-mcp.agent-working { border-left-color: #c79be8; }
.activity-mcp.agent-working .dot { background: #c79be8; }
.agent-top { display: flex; align-items: center; gap: 7px; }
.agent-type { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-status { margin-left: auto; font-size: 11px; color: var(--muted); white-space: nowrap; }
.agent-working .agent-status { color: var(--text); font-weight: 600; }
.agent-desc, .agent-meta, .agent-action { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 3px; }
.agent-meta { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.agent-action { color: var(--muted); font-size: 12px; font-family: 'Cascadia Mono', Consolas, monospace; }
.session-card { border-left: 3px solid #5d5c58; cursor: pointer; }
.session-card:hover { background: var(--panel-2); }
.session-card.open { outline: 1px solid var(--accent); }
.session-card .agent-top .icon { margin: -3px -6px -3px 0; flex: none; }
.session-action {
  margin-top: 5px; font-size: 12px; line-height: 1.35; color: var(--text);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.session-running { border-left-color: var(--accent); }
.session-running .dot { background: var(--accent); animation: pulse 1.4s ease-in-out infinite; }
.session-running .agent-status { color: var(--text); font-weight: 600; }
.session-needs_you { border-left-color: var(--yellow); }
.session-needs_you .dot { background: var(--yellow); animation: pulse 0.9s ease-in-out infinite; }
.session-needs_you .agent-status { color: var(--yellow); font-weight: 600; }
.session-idle { border-left-color: var(--green); }
.session-idle .dot { background: var(--green); }
.session-idle .session-action { color: var(--muted); }

/* Ligações */
.handle { opacity: 0; width: 1px !important; height: 1px !important; min-width: 0 !important; min-height: 0 !important; border: 0 !important; pointer-events: none; }
.react-flow__edge-path { stroke: #4a4a50; stroke-width: 1.4; }
.edge-working .react-flow__edge-path { stroke: var(--accent); }
.edge-shell.edge-working .react-flow__edge-path { stroke: #7aa7e8; }
.edge-mcp.edge-working .react-flow__edge-path { stroke: #c79be8; }
.edge-stale .react-flow__edge-path { stroke: var(--yellow); }
.resize-line { border-color: var(--accent) !important; }
.resize-handle { background: var(--accent) !important; border: 0 !important; width: 8px !important; height: 8px !important; }

/* Painel do agente */
.drawer {
  position: absolute; top: 0; right: 0; bottom: 0; z-index: 20; width: min(680px, 100%);
  display: flex; flex-direction: column;
  background: var(--panel); border-left: 1px solid var(--line);
}
.drawer header {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
}
.drawer p { margin: 3px 0 0; color: var(--muted); }
.drawer-actions { flex: none; display: flex; align-items: center; gap: 6px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 10px 14px 20px; }
.drawer-empty { color: var(--muted); }
.line { overflow-wrap: anywhere; line-height: 1.5; }
.line-tool {
  padding: 2px 0; color: var(--muted); white-space: pre-wrap;
  font-family: 'Cascadia Mono', Consolas, monospace; font-size: 12px;
}
.line-text { padding: 8px 0; }
.line-prompt {
  width: fit-content; max-width: 85%; margin: 14px 0 8px auto; padding: 8px 12px; white-space: pre-wrap;
  background: #2b2522; border: 1px solid #47362d; border-radius: 10px 10px 2px 10px;
}
.line-prompt.pending { opacity: 0.6; }

/* Respostas do Claude */
.markdown > :first-child { margin-top: 0; }
.markdown > :last-child { margin-bottom: 0; }
.markdown p, .markdown ul, .markdown ol, .markdown pre, .markdown table, .markdown blockquote { margin: 8px 0; }
.markdown h1, .markdown h2, .markdown h3 { font-size: 14px; margin: 14px 0 6px; }
.markdown ul, .markdown ol { padding-left: 22px; }
.markdown a { color: var(--accent); }
.markdown code {
  font-family: 'Cascadia Mono', Consolas, monospace; font-size: 12px;
  padding: 1px 4px; background: #111113; border-radius: 4px;
}
.markdown pre { padding: 10px; overflow-x: auto; background: #111113; border: 1px solid var(--line); border-radius: 6px; }
.markdown pre code { padding: 0; background: none; }
.markdown table { display: block; overflow-x: auto; border-collapse: collapse; }
.markdown th, .markdown td { padding: 4px 9px; border: 1px solid var(--line); text-align: left; }
.markdown blockquote { padding-left: 10px; color: var(--muted); border-left: 2px solid var(--line); }

/* Pergunta do Claude */
.permission {
  margin-bottom: 10px; padding: 10px 12px;
  background: #241f14; border: 1px solid #6b5a2e; border-radius: 8px;
}
.permission strong { color: var(--yellow); }
.permission pre {
  max-height: 260px; margin: 8px 0; padding: 8px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere;
  font-family: 'Cascadia Mono', Consolas, monospace; font-size: 12px; line-height: 1.4;
  background: #111113; border: 1px solid var(--line); border-radius: 6px;
}
.permission-options { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.permission-options button {
  padding: 7px 10px; text-align: left; line-height: 1.35; overflow-wrap: anywhere;
  background: var(--panel-2); border: 1px solid #4a4a50; border-radius: 6px;
}
.permission-options button:hover:not(:disabled) { background: #2a2a2f; border-color: var(--yellow); }
.permission-options button:disabled { opacity: 0.5; cursor: default; }
.permission-options button.deny { color: #f79590; }
.permission .composer-note { margin: 8px 0 0; }

/* Campo de envio */
.composer { flex: none; padding: 10px 14px 12px; border-top: 1px solid var(--line); }
.composer-note { margin: 0 0 8px; font-size: 12px; color: var(--muted); }
.composer > .composer-note:last-child { margin-bottom: 0; }
.composer-note.warn { color: var(--yellow); }
.composer-note.error { color: #f0746e; }
.composer-row { display: flex; align-items: flex-end; gap: 8px; }
.composer textarea {
  flex: 1; min-width: 0; max-height: 200px; padding: 8px 10px; resize: vertical;
  font: inherit; color: var(--text);
  background: #111113; border: 1px solid var(--line); border-radius: 7px;
}
.composer textarea:focus { outline: none; border-color: var(--accent); }
.composer.dragging { background: #241a14; box-shadow: inset 0 0 0 1px var(--accent); }
.attach {
  flex: none; width: 36px; height: 36px; padding: 0; font-size: 20px; line-height: 1; color: var(--text);
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 7px;
}
.attach:hover:not(:disabled) { border-color: var(--accent); }
.attach:disabled { opacity: 0.5; cursor: default; }
.attachments { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; padding: 0; list-style: none; }
.attachment {
  display: flex; align-items: center; gap: 7px; max-width: 240px; padding: 3px 3px 3px 4px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 7px;
}
.attachment img { flex: none; width: 34px; height: 34px; object-fit: cover; border-radius: 4px; }
.attachment-kind { flex: none; padding: 0 3px; font-size: 11px; color: var(--muted); }
.attachment-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.attachment .icon { flex: none; }
.sent-files { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.line-prompt > .sent-files:first-child { margin-top: 0; }
.sent-file {
  max-width: 100%; padding: 1px 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 12px; background: #3a2f29; border-radius: 5px;
}
.send {
  height: 36px; padding: 0 14px; font-weight: 600; color: #1a0f0a;
  background: var(--accent); border: 0; border-radius: 7px;
}
.send:hover:not(:disabled) { background: #f09470; }
.send:disabled { color: #6d6c69; background: var(--panel-2); cursor: default; }

/* Entrar e criar conta */
.auth { height: 100%; display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }
.auth form { width: min(380px, 100%); display: flex; flex-direction: column; gap: 12px; }
.auth h1 { margin: 0; font-size: 22px; }
.auth p { margin: 0; line-height: 1.45; color: var(--muted); }
.auth label { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 12px; }
.auth small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.auth input, .remote-form input {
  height: 38px; padding: 0 10px; font: inherit; color: var(--text);
  background: #111113; border: 1px solid var(--line); border-radius: 7px;
}
.auth input:focus, .remote-form input:focus { outline: none; border-color: var(--accent); }
.auth .send { width: 100%; height: 40px; }
.auth .auth-switch { align-self: center; padding: 6px 10px; }
.auth-reset { font-size: 12px; overflow-wrap: anywhere; user-select: text; }

/* Botão e painel do celular */
.remote-dot { display: inline-block; width: 7px; height: 7px; margin-left: 6px; border-radius: 50%; background: var(--muted); }
.remote-dot.on { background: var(--green); }
.remote-back { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 16px; background: #0009; }
.remote-panel {
  width: min(400px, 100%); max-height: 100%; overflow-y: auto; padding: 14px 16px 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
}
.remote-panel header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.remote-panel p { margin: 8px 0; line-height: 1.45; }
.remote-note { font-size: 12px; color: var(--muted); }
.remote-qr { display: block; width: 240px; height: 240px; margin: 10px auto; border-radius: 6px; }
.remote-panel dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 10px 0; }
.remote-panel dt { color: var(--muted); }
.remote-panel dd { margin: 0; font-family: 'Cascadia Mono', Consolas, monospace; user-select: text; overflow-wrap: anywhere; }
.remote-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.remote-tabs button, .remote-actions button {
  padding: 4px 10px; font-size: 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px;
}
.remote-tabs button.on { border-color: var(--accent); }
.remote-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.remote-section { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.remote-section > strong { display: block; margin-bottom: 6px; }
.remote-devices { margin: 6px 0; padding: 0; list-style: none; color: var(--muted); font-size: 12px; }
.remote-form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.remote-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }

@keyframes pulse { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) {
  .dot { animation: none !important; }
}
