/****************************************************************************
 ** @license
 ** This demo file is part of yFiles for HTML 3.1.0.2+demo1.
 ** 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.
 **
 ***************************************************************************/
/* poppins-devanagari-600-normal */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(./poppins-devanagari-600-normal-STEjXBNN.woff2) format('woff2'), url(./poppins-devanagari-600-normal-ClASKHrr.woff) format('woff');
  unicode-range: U+0900-097F,U+1CD0-1CF9,U+200C-200D,U+20A8,U+20B9,U+20F0,U+25CC,U+A830-A839,U+A8E0-A8FF,U+11B00-11B09;
}

/* poppins-latin-ext-600-normal */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(./poppins-latin-ext-600-normal-CAhIAdZj.woff2) format('woff2'), url(./poppins-latin-ext-600-normal-Df5ffKXP.woff) format('woff');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* poppins-latin-600-normal */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(./poppins-latin-600-normal-zEkxB9Mr.woff2) format('woff2'), url(./poppins-latin-600-normal-BJdTmd5m.woff) format('woff');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* poppins-devanagari-400-normal */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(./poppins-devanagari-400-normal-CJDn6rn8.woff2) format('woff2'), url(./poppins-devanagari-400-normal-CqVvlrh5.woff) format('woff');
  unicode-range: U+0900-097F,U+1CD0-1CF9,U+200C-200D,U+20A8,U+20B9,U+20F0,U+25CC,U+A830-A839,U+A8E0-A8FF,U+11B00-11B09;
}

/* poppins-latin-ext-400-normal */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(./poppins-latin-ext-400-normal-by3JarPu.woff2) format('woff2'), url(./poppins-latin-ext-400-normal-DaBSavcJ.woff) format('woff');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* poppins-latin-400-normal */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(./poppins-latin-400-normal-cpxAROuN.woff2) format('woff2'), url(./poppins-latin-400-normal-BOb3E3N0.woff) format('woff');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* material-symbols-outlined-latin-300-normal */
@font-face {
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  font-display: swap;
  font-weight: 300;
  src: url(./material-symbols-outlined-latin-300-normal-CWqEDh7P.woff2) format('woff2'), url(./material-symbols-outlined-latin-300-normal-UcP-3lp0.woff) format('woff');
}

/* Layout of the page: header, main area */

:root {
  --gap: 8px;
  --border-radius: 12px;
  --text-color: #2a3e50;
  --background-color: #e8edf2;
  --text-accent-color: #00adcc;
}

html,
body {
  height: 100%;
  overflow: hidden;
  margin: 0;
  box-sizing: border-box;
}

body {
  display: flex;
  flex-direction: column;
}

.demo-header {
  flex: 0 0 70px;
  height: 70px;
}

.demo-main {
  flex: 1 1 auto;
  min-height: 0; /* allows scrolling content inside the remaining space */
  overflow: auto;
  padding: 0 var(--gap) var(--gap);
}

/* Layout of the main area: component-panel, interaction-panel, description-panel */

.demo-main {
  display: flex;
  gap: var(--gap);
  align-items: stretch;

  > div {
    flex: 1 1 0; /* all non-last columns get equal widths */
    min-width: 0;
    position: relative;
  }

  .demo-main__description-panel {
    flex: 0 0 320px;
  }
}

/* Theme: colors, font, etc.*/

body {
  color: var(--text-color);
  background-color: var(--background-color);
  font-family: 'poppins', sans-serif;
}

.demo-main__description-panel,
.demo-main__interaction-panel {
  background-color: #ffffff;
  font-weight: 400;
  font-size: 0.875rem;

  border-radius: var(--border-radius);
  padding: var(--border-radius);
  overflow: auto;

  :first-child {
    margin-top: 0;
  }

  a {
    color: var(--text-color);
    &:hover {
      text-decoration-thickness: 2px;
    }
  }
}

.demo-main__component-panel {
  border-radius: var(--border-radius);
  background-color: #ffffff;
}

.demo-main__description-panel {
  h1 {
    color: var(--text-accent-color);
    font-size: 160%;
    font-weight: 600;
  }

  h2 {
    font-size: 140%;
  }
  h3 {
    font-size: 120%;
  }
}

.demo-main__interaction-panel {
  h2 {
    color: var(--text-accent-color);
    font-size: 160%;
    font-weight: 600;
  }
}

/* Header */

.demo-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 0 92px;

  font-size: 1.125rem;
  font-weight: 400;
  color: #2a3e50;

  a {
    text-decoration: none;
    color: inherit;
  }
  .y-logo {
    margin: 4px 4px 4px 16px;
    height: 100%;
    background-color: #2a3e50;

    mask: url('./ylogo-large-Bw46093E.svg') no-repeat center;
    width: 12rem;
  }
}

/* Toolbar*/

.component-toolbar {
  font-family: 'poppins', sans-serif;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap; /* keep items on a single line */
  white-space: nowrap; /* prevent the text button from wrapping */
  color: #000000;
  background: #f2f5f8;
  padding: 4px 6px;
  gap: 2px;
  z-index: 2;
  box-shadow:
    0 5px 20px rgba(0, 0, 0, 0.1),
    0 3px 10px rgba(0, 0, 0, 0.1),
    0 1px 5px rgba(0, 0, 0, 0.15);
  border-radius: 999px;
  user-select: none;
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  button {
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 16px;
    background-color: transparent;
    color: #000000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    &:hover {
      background-color: #aec3d5;
      color: #000000;
      cursor: pointer;
    }
  }

  .separator {
    width: 1px;
    height: 1.75rem;
    margin-inline: 4px;
    background: #000000;
    display: inline-block;
  }
}

/* Misc */

#graphComponent {
  width: 100%;
  height: 100%;
}

.material-symbols-outlined {
  font-variation-settings: 'GRAD' 30;
  font-family: 'Material Symbols Outlined', sans-serif;
  font-weight: 270;
  font-optical-sizing: auto;
  font-style: normal;
  font-size: 1.5rem;
  display: inline-block;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;
}
/****************************************************************************
 ** @license
 ** This demo file is part of yFiles for HTML 3.1.0.2+demo1.
 ** 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.
 **
 ***************************************************************************/
.demo-main__interaction-panel {
  background-color: #f3f4f6;
  display: flex;
  flex-direction: column;

  .heading-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2ex 0 1ex;

    &:first-child {
      margin-block-start: 0;
    }

    h2 {
      margin: 0;
    }
  }

  .editorText {
    font-family: 'Consolas', 'Courier New', Courier, mono, serif;
    font-size: 13px;
  }

  #templateEditorContainer {
    flex: 0 1 70%;
    min-height: 0;
  }

  #tagEditorContainer {
    flex: 0 1 fit-content;
    min-height: 0;
  }

  .cm-editor {
    height: 100% !important;
    background-color: #fff;
  }

  .error {
    display: none;
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    vertical-align: baseline;
    text-align: center;
    height: 0;
    box-sizing: border-box;
    margin-left: 1ex;
    transition:
      height 0.3s ease,
      display 0.3s ease allow-discrete;
    &.open-error {
      display: flex;
      height: 1.5em;
      background-color: #f44336;
      padding: 2px 4px;
    }
  }
  @starting-style {
    .error.open-error {
      height: 0;
    }
  }

  #template-text-area-error {
    bottom: 250px;
  }

  #tag-text-area-error {
    bottom: 15px;
  }

  .apply-button {
    margin: 1ex 0 1ex 0;
    padding: 5px 9px 5px 9px;
    color: #00adcc;
    background-color: transparent;
    border: 1px solid #00adcc;
    border-radius: 16px;
    cursor: pointer;
    &:hover {
      color: #ffffff;
      background-color: #00adcc;
    }
  }

  .apply-button:disabled {
    background-color: #a0a0a0;
    color: #ffffff;
  }

  .switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    user-select: none;
    cursor: pointer;

    input {
      opacity: 0;
      width: 0;
      height: 0;
    }
  }

  .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
  }

  .slider:before {
    position: absolute;
    content: '';
    top: 3px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
  }

  input:focus + .slider {
    box-shadow: 0 0 1px #2196f3;
  }

  input:checked + .slider:before {
    transform: translateX(26px);
  }
  .slider.round {
    border-radius: 12px;
  }
  .slider.round:before {
    border-radius: 50%;
  }
}
