/****************************************************************************
 ** @license
 ** This demo file is part of yFiles for HTML 3.1.0.4.
 ** Copyright (c) 2026 by yWorks GmbH, Vor dem Kreuzberg 28,
 ** 72070 Tuebingen, Germany. All rights reserved.
 **
 ** yFiles demo files exhibit yFiles for HTML functionalities. Any redistribution
 ** of demo files in source code or binary form, with or without
 ** modification, is not permitted.
 **
 ** Owners of a valid software license for a yFiles for HTML version that this
 ** demo is shipped with are allowed to use the demo source code as basis
 ** for their own yFiles for HTML powered applications. Use of such programs is
 ** governed by the rights and conditions as set out in the yFiles for HTML
 ** license agreement.
 **
 ** THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESS OR IMPLIED
 ** WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 ** MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
 ** NO EVENT SHALL yWorks BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
 ** TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 ** PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 ** LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 ** NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 **
 ***************************************************************************/
.sidebar-slim {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--toolbar-color);
  line-height: 140%;
  border-left: 1px solid #d5d7d8;
  width: 274px;
}

.demo-dnd-panel__item {
  height: 64px;
  padding: 8px 0;
  cursor: move !important;
  svg {
    transition: transform 0.2s ease;
  }
}

.yfiles-drag {
  z-index: 15;
}

.main-container {
  user-select: none;
  .collapse-interaction-panel {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    margin-right: 0 !important;
    transform: none !important;
  }
  .panel-container {
    display: flex !important;
    flex-direction: column;
    height: 100%;
    .sub-panel {
      flex: 1;
      overflow: hidden;
      display: flex;
      flex-direction: column;
    }

    .sub-panel:has(> #tags-explorer-list) {
      container-type: inline-size;
    }

    #drag-and-drop-panel {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
      gap: 5px;

      min-height: 0;
      overflow-x: hidden;
      overflow-y: auto;

      touch-action: pan-y;
      overscroll-behavior-y: contain;
      scrollbar-gutter: stable;
    }

    #drag-and-drop-panel .demo-dnd-panel__item {
      touch-action: pan-y;
    }

    #separator {
      content: '';
      left: 0;
      right: 0;
      height: 3px;
      flex: 0 0 3px;
      margin-top: 3px;
      background: var(--scrollbar-bg);
    }
  }
}

#drag-and-drop-panel,
#tags-explorer-list {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-bg) transparent;
}

#drag-and-drop-panel::-webkit-scrollbar,
#tags-explorer-list::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

#drag-and-drop-panel::-webkit-scrollbar-track,
#tags-explorer-list::-webkit-scrollbar-track {
  background-color: transparent;
}

#drag-and-drop-panel::-webkit-scrollbar-thumb,
#tags-explorer-list::-webkit-scrollbar-thumb {
  background-color: rgb(from var(--scrollbar-bg) r g b / 0.6);
  border-radius: 6px;
}

#drag-and-drop-panel::-webkit-scrollbar-thumb:hover,
#tags-explorer-list::-webkit-scrollbar-thumb:hover {
  background-color: var(--scrollbar-bg);
}

#tags-explorer-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;

  .tags-explorer-list-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin: 0 !important;
  }

  .tags-explorer-list-label {
    flex: 1 1 auto;
    min-width: 0;
    color: var(--color-text);
  }

  .tags-explorer-list-input {
    box-sizing: border-box;
    flex: 0 1 50%;
    min-width: 0;
    max-width: 50%;
    padding: 8px;
    font-size: 14px;
    border: 1px solid #d5d7d8;
    border-radius: 8px;
    background: #fff;
    color: var(--color-casper-blue-dark);
  }

  @container (max-width: 240px) {
    .tags-explorer-list-item {
      flex-direction: column;
      align-items: stretch;
    }

    .tags-explorer-list-label,
    .tags-explorer-list-input {
      width: 100%;
      max-width: none;
      flex: none;
    }
  }

  .tags-explorer-list-input:focus {
    outline: var(--color-highlight-blue) solid 2px;
  }

  .tags-explorer-list-input:disabled {
    background: #d5d7d8;
  }

  .tags-explorer-list-item__invalid .tags-explorer-list-input {
    border-color: #cb1414;
  }
}

.tooltip {
  position: relative;
  padding-left: 12px;

  &:before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    content: '';
    width: 4px;
    border-radius: 100px;
    background: #cb1414;
  }

  h4 {
    margin: 4px;
    color: #2e2e2e;
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: 148%;
  }

  ul {
    margin: 4px;
    color: #2e2e2e;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 148%; /* 20.72px */
  }
}

.yfiles-tooltip {
  border-radius: 12px;
  border: 1px solid #d5d7d8;
  background: #fff;
  /* light shadow */
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.08);
  display: inline-flex;
  padding: 12px;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.yfiles-context-menu {
  border-radius: 12px;
}

.flow-context-menu {
  display: inline-flex;
  padding: 12px;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  border-radius: 12px;
  border: 1px solid #d5d7d8;
  background: #fff;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.08);
  top: 0;
  left: 0;
  list-style: none;
  margin: 0;
  min-width: 186px;
  width: auto;
  user-select: none;
}

.flow-context-menu {
  .flow-context-menu__item {
    position: relative;
    display: flex;
    gap: 8px;
    vertical-align: middle;
    min-width: fit-content;
    width: 100%;
    padding: 8px 12px;
    background-color: #ffffff;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    color: #2e2e2e;
    font-size: 18px;
    font-style: normal;
    font-weight: 500;
    line-height: 148%;

    &:hover {
      background-color: #ebebeb !important;
    }

    &:focus {
      outline: solid #ebebeb 1px;
    }
  }

  &:last-child {
    border-bottom: none;
  }
}

.flow-context-menu__item-label {
  font-family: var(--font-family), sans-serif;
  font-size: 18px;
  margin-left: 10px;
}

.flow-context-menu__item-disabled {
  background: #ffffff;
  opacity: 32%;
}

.flow-context-menu__item:hover {
  background-color: #ebebeb !important;
}

.flow-context-menu__item:focus {
  outline: solid #ebebeb 1px;
}

.flow-context-menu__separator {
  width: 100%;
  height: 1px;
  background-color: #d5d7d8;
}
/****************************************************************************
 ** @license
 ** This demo file is part of yFiles for HTML 3.1.0.4.
 ** Copyright (c) 2026 by yWorks GmbH, Vor dem Kreuzberg 28,
 ** 72070 Tuebingen, Germany. All rights reserved.
 **
 ** yFiles demo files exhibit yFiles for HTML functionalities. Any redistribution
 ** of demo files in source code or binary form, with or without
 ** modification, is not permitted.
 **
 ** Owners of a valid software license for a yFiles for HTML version that this
 ** demo is shipped with are allowed to use the demo source code as basis
 ** for their own yFiles for HTML powered applications. Use of such programs is
 ** governed by the rights and conditions as set out in the yFiles for HTML
 ** license agreement.
 **
 ** THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESS OR IMPLIED
 ** WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 ** MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
 ** NO EVENT SHALL yWorks BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
 ** TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 ** PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 ** LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 ** NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 **
 ***************************************************************************/
.flow-edge {
}

.flow-edge__main {
  stroke-width: 2;
  transition:
    opacity 0.4s,
    stroke 0.2s;
  stroke: rgb(153, 153, 153);
}

.flow-edge__outline {
  stroke-width: 4;
  stroke: rgb(153, 153, 153);
}

.flow-edge__animation {
  opacity: 0;
  stroke-width: 2;
  transition: opacity 0.4s;
  stroke: rgb(255, 255, 255);
  stroke-dasharray: 5;
  stroke-dashoffset: 0;
  animation: marquee 0.5s linear infinite;
}

.flow-edge--reversed .flow-edge__animation {
  animation: marquee-reversed 0.5s linear infinite;
}

@keyframes marquee {
  to {
    stroke-dashoffset: -10;
  }
}

@keyframes marquee-reversed {
  to {
    stroke-dashoffset: 10;
  }
}

/* Existing edge is hovered */

.flow-edge--hovered .flow-edge__main {
  stroke: rgb(93, 93, 93);
}

/* Existing edge is selected OR edge is being reconnected */

.flow-edge--selected .flow-edge__main,
.flow-edge--reconnecting .flow-edge__main {
  stroke: rgb(255, 108, 0);
}

/* New edge is being created */

.flow-edge--dummy-new-edge .flow-edge__main {
  stroke: rgb(255, 108, 0);
}

.flow-edge--dummy-new-edge .flow-edge__animation {
  opacity: 1;
}

/* Connected node is selected OR edge is selected & hovered */

.flow-edge--selected.flow-edge--hovered .flow-edge__main,
.flow-edge--connected-node-selected .flow-edge__main {
  stroke: rgb(255, 108, 0);
}

.flow-edge--selected.flow-edge--hovered .flow-edge__animation,
.flow-edge--connected-node-selected .flow-edge__animation {
  opacity: 1;
}
