/****************************************************************************
 ** @license
 ** This demo file is part of yFiles for HTML 2.6.
 ** Copyright (c) 2000-2024 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.
 **
 ***************************************************************************/
.data-editor-header select:not(.demo-disabled),
.data-editor-header select:not(.demo-disabled):hover {
  border-color: #888;
  border-width: 1px;
  padding-left: 1px;
}

.option-ui-content-container {
  overflow-y: visible;
}

.data-editor-header {
  padding: 8px;
}

.data-editor-header .content {
  display: grid;
  margin-bottom: 8px;
  grid-template-columns: [start] 25px [mid] auto [end] 25px;
  justify-items: center;
}

#layout-select-box,
#sample-select-box,
.sidebar-select-box {
  font-size: 14px;
  width: 95%;
  margin: 0 4px;
}

#sample-select-box {
  grid-area: mid;
}

.sidebar-button.open-button {
  grid-area: end;
}

.data-editor-header .sidebar-button {
  display: inline-block;
  outline: none;
  border: none;
  background-repeat: no-repeat;
  background-position: 50% 50%;
  background-color: transparent;
  height: 32px;
  width: 32px;
  border-radius: 50%;
  line-height: 24px;
  box-sizing: border-box;
  padding: 0;
}

.data-editor-header button:disabled {
  opacity: 0.5;
}

.data-editor-header .sidebar-button:not(:disabled):hover {
  background-color: #dedede;
  cursor: pointer;
}

#data-editor {
  -webkit-overflow-scrolling: touch;
}

#data-editor-button-container {
  position: absolute;
  bottom: 0;
  width: 100%;
  background-color: #ebeef0;
  min-width: 235px;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  height: 65px;
}

#apply-layout-button:hover:not(.demo-disabled) {
  box-shadow: 0 0 100px 100px rgba(255, 255, 255, 0.15) inset;
}

#reset-layout-button:hover {
  box-shadow: 0 0 100px 100px rgba(0, 0, 0, 0.1) inset;
}

.option-presets-button-grid {
  display: grid;
  align-items: center;
  grid-template-columns: 50% 50%;
  padding: 3px 16px;
  row-gap: 8px;
}

#data-presets {
  margin: 5px 0 8px 0;
}

.data-editor-tab-title {
  display: flex;
  width: 100%;
  height: 28px;
  line-height: 2em;
  background: transparent linear-gradient(90deg, #29323c 0%, #38434f 100%) 0 0 no-repeat padding-box;
  color: #fff;
  font-family: Tahoma, Verdana, sans-serif;
  font-size: 14px;
  letter-spacing: 1px;
}

.presets-icon {
  background-image: url('./presets-icon.svg');
  background-repeat: no-repeat;
  background-position: right;
  background-size: 16px;
  width: 20px;
  height: 28px;
  display: inline-block;
  margin: 0 10px 0 2px;
}

.option-presets-button {
  position: relative;
  margin: 4px;
  border-radius: 16px;
  border-color: rgba(0, 0, 0, 0.12);
  color: rgba(0, 0, 0, 0.87);
  background: #d9d9d9;
  height: 100%;
  outline: none;
  padding: 6px 12px;
  font-size: 13px;
  border-width: 0;
  overflow: visible;
  cursor: pointer;
  transition:
    background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.option-presets-button:disabled,
.invalid-preset {
  cursor: default;
  opacity: 0.5;
}

.option-presets-button:not(:disabled):hover {
  box-shadow: 0 0 100px 100px rgba(255, 255, 255, 0.25) inset;
}

.active-preset {
  background-color: #4caf50;
  color: white;
}

.active-preset:after {
  content: '';
  background-image: url('./checkmark-circle.svg');
  background-repeat: no-repeat;
  background-position: right;
  background-size: 20px;
  width: 20px;
  height: 20px;
  display: inline-block;
  margin-left: 8px;
  vertical-align: bottom;
  position: absolute;
  right: -8px;
  top: -6px;
}

.value-changed {
  position: relative;
  box-shadow: 0 0 0 2px #2196f3 inset;
  border-radius: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.value-changed-icon {
  position: absolute;
  left: -2px;
  top: -8px;
  background-image: url('./star-icon-blue.svg');
  background-repeat: no-repeat;
  background-size: 18px;
  width: 18px;
  height: 18px;
  display: block;
}

.editor-preset .value-changed {
  box-shadow: 0 0 0 2px #4caf50 inset;
}

.editor-preset .value-changed-icon {
  background-image: url('./star-icon.svg');
}

.demo-page__description #layout-description-container {
  background-color: #c8dce1;
  border-radius: 8px;
  padding: 16px;
  margin: 0 -8px;
}

.demo-page__description #layout-description-container :first-child {
  margin-block-start: 0;
}

.demo-page__description #layout-description-container :last-child {
  margin-block-end: 0;
}

.demo-page__description #layout-description-container #layout-description ul,
.demo-page__description #layout-description-container #layout-description ol {
  padding: 0 16px;
}

.highlight-description {
  animation-name: highlight-animation;
  animation-duration: 3s;
  animation-iteration-count: 1;
  animation-fill-mode: forwards;
}

@keyframes highlight-animation {
  0% {
    background-color: #c8dce1;
  }
  20% {
    background-color: #ff9800;
  }
  100% {
    background-color: #c8dce1;
  }
}

#preset-tooltip {
  position: absolute;
  display: none;
  opacity: 0;
  z-index: 100;
  width: 98%;
  transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 4px;
  padding: 0 18px;
  box-sizing: border-box;
  background: #dadada;
  box-shadow:
    0 2px 4px -1px rgba(0, 0, 0, 0.2),
    0 4px 5px 0 rgba(0, 0, 0, 0.14),
    0 1px 10px 0 rgba(0, 0, 0, 0.12) !important;
}

#preset-tooltip * {
  color: rgba(0, 0, 0, 0.87);
}

#preset-tooltip.active * {
  color: #fff !important;
}

#preset-tooltip.visible {
  opacity: 1;
}

#preset-tooltip .triangle {
  position: absolute;
  top: -11px;
  width: 0;
  height: 0;
  display: block;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-bottom: 12px solid #dadada;
}

#preset-tooltip.active .triangle {
  border-bottom-color: #4caf50;
}

#preset-tooltip.active {
  background-color: #4caf50;
}

.preset-tooltip-dummy {
  opacity: 0;
  pointer-events: none;
  position: absolute;
  z-index: -1;
}
