@import './../../index.scss';

.param-treeselect {
  .ant-select {
    width: 100%;

    &-selection {
      color: var(--graph-from-color);
      background-color: var(--graph-from-background-color);
      border: 1px solid var(--graph-from-border-color);
    }
  }

  .amos-idropdown-toggle.amos-cascader-dropdown.amos-popover-trigger {
      color: var(--graph-from-color);
      background-color: var(--graph-from-background-color);
      border: 1px solid var(--graph-from-border-color);
  }

  .ant-select-dropdown {
    color: var(--graph-from-color);
    background-color: var(--graph-popover-background-color);
  }

  .ant-select-tree-dropdown {
    @include pretty-scrollbar(5px, 8px, $scrollOutColor, $scrollInnerColor);

    .ant-select-dropdown-search .ant-select-search__field {
      background-color: var(--graph-from-background-color);
      border: 1px solid var(--graph-from-border-color);
      border-radius: 4px;
      outline: none;
    }
  }

  .ant-select-tree-title {
    color: var(--graph-from-color);
  }

  .ant-select-tree-node-content-wrapper.ant-select-tree-node-content-wrapper-normal:hover,
  .ant-select-tree-node-content-wrapper.ant-select-tree-node-content-wrapper-open:hover,
  .ant-select-tree li .ant-select-tree-node-content-wrapper.ant-select-tree-node-content-wrapper-normal.ant-select-tree-node-selected {
    background: var(--graph-popover-hover-color);
  }
}

.amos-cascader-menus-inner {
  color: var(--graph-popover-color);
  background: var(--graph-popover-background-color);
  border: 1px solid var(--graph-popover-border-color);
  -webkit-box-shadow: var(--graph-popover-box-shadow);
  box-shadow: var(--graph-popover-box-shadow);

  .amos-cascader-menu .amos-cascader-menu-item-expand-icon {
    color: var(--graph-popover-color);
  }
}

.mods-inputpoi-modal {
  .amos-modal-content {
    width: 100%;
    height: 100%;
    max-height: none;
    padding: 0;

    .mods-inputpoi-content {
      width: 100%;
      height: 100%;
    }

    .mods-inputpoi-map {
      position: relative;
      height: calc(100% - 42px);
    }

    .mods-inputpoi-values {
      height: 42px;
      align-items: center;
      display: flex;
      padding-left: 10px;
      font-size: 16px;
      color: #333;
      background: #eeeeee;
      border-bottom: 1px solid #e5e5e5;

      input {
        width: 170px;
        height: 28px;
        padding: 0 5px;
        margin-left: 10px;
        font-size: 14px;
        background: white;
        border: 1px solid #e5e5e5;
      }
    }
  }
}

.amos-checkbox-group.check-box-group {
  .check-box {
    width: 20%;
    margin-right: 0;
  }
}

.amos-form-builder {
  .select-scroll-wrapper {
    width: 100%;

    .param-link-select {
      width: 100%;
    }
  }
}

.tree-select-model {
  display: inline-flex;
  width: 100%;
  height: 32px;
  line-height: 30px;
  color: var(--graph-from-color);
  background-color: var(--graph-from-background-color);
  border: 1px solid var(--graph-from-border-color);
  border-radius: 4px;
  box-shadow: none;

  .tree-select-model-input {
    display: inline-block;
    width: 94%;
    height: 100%;
  }

  .tree-select-model-icon {
    display: inline-block;
    width: 6%;
    vertical-align: top;
    padding-top: 5px;
  }

  .amos-btn.mods-modelinput-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 12%;
    height: calc(100% - 8px);
    margin: 4px;
    font-size: 12px;
    color: white;
    text-align: center;
    vertical-align: top;
    background-color: #27b3fe;
    border: 1px solid #27b3fe;
    border-radius: 3px;
    min-width: 46px;
  }
}

.tree-select-model-box {
  .amos-modal-content {
    height: 88%;
  }
}

.tree-select-model-content {
  width: 50%;
  height: 100%;
  margin: auto;
}


.gm-common-inputselect-wrapper {
  position: relative;

  &:hover {
    .gm-common-inputselect-icons {
      .aficon {
        display: inline-block;
      }
    }
  }

  > .amos-input {
    &:focus {
      & + .gm-common-inputselect-icons {
        .aficon {
          display: inline-block;
        }
      }
    }
  }

  .gm-common-inputselect-icons {
    position: absolute;
    top: 0;
    right: 4px;
    display: flex;
    height: 100%;
    align-items: center;

    > .aficon {
      display: none;
      font-size: 12px;
      font-weight: bold;
      color: #aaa;
      cursor: pointer;
      transform: scale(0.7);
    }
  }

  > .aficon {
    position: absolute;
    top: 0;
    right: 4px;
    display: none;
    height: 100%;
    align-items: center;
    font-size: 12px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transform: scale(0.7);
  }

  .gm-common-inputselect-bar {
    position: absolute;
    top: 0;
    z-index: -1;
    // opacity: 0;
    width: 100%;
    height: 100%;
  }

  input {
    border: 0;
  }
}

.gm-common-inputselect-popover-wrapper.amos-popover-down {
  z-index: 100;
  padding-top: 2px;

  &::after {
    display: none;
  }

  ul {
    height: auto;
    max-height: 260px;
    overflow: auto;
    background: white;
    box-shadow: 0 3px 8px #ccc;

    li {
      height: 30px;
      padding: 5px 12px;
      overflow: hidden;
      line-height: 22px;
      text-overflow: ellipsis;
      white-space: nowrap;
      cursor: pointer;

      &:hover {
        background-color: var(--graph-popover-hover-color);
      }

      &:focus {
        background-color: red;
      }
    }
  }
}

.param-inputpoi .amos-search.amos-search-disabled {
  &::before {
    content: none;
  }
}

.eh-listselect-modal {
  width: calc(100% - 20px);
  margin: 0 10px;
  border: 1px solid $border-color-eaeaea;

  .eh-listselect-search {
    position: relative;
    height: 32px;
    margin: 8px 8px 0;

    input {
      width: 100%;
      height: 100%;
      color: $font-color-black;
      background-color: $background-color-f0f0f0;
      border: solid 1px $border-color-eaeaea;
      border-radius: 4px;
    }

    img {
      position: absolute;
      top: 1px;
      right: 3px;
      width: 28px;
      height: 28px;
    }
  }

  .eh-listselect-list {
    height: 320px;
    padding-top: 4px;
    padding-left: 10px;
    overflow: auto;
    color: $font-color-black;

    .amos-tree li .amos-tree-node-content-wrapper {
      display: inline-block;
      height: 24px;
      padding: 0 5px;
      margin: 0;
      color: #000;
      text-decoration: none;
      cursor: pointer;
      border-radius: 2px;
    }

    .amos-tree li > span.amos-tree-treenode {
      color: $color-f6f6f6;
    }

    .amos-tree li.eh-listselect-tree-item > span.amos-tree-switcher.amos-tree-switcher-noop {
      // display: none;
    }

    .amos-tree li .amos-tree-node-content-wrapper.amos-tree-node-selected {
      background-color: $background-color-f0f0f0;
    }

    .amos-tree li.eh-listselect-tree-item .amos-tree-node-content-wrapper:hover {
      background-color: $background-color-f0f0f0;
    }

    .amos-tree li .amos-tree-node-content-wrapper:hover {
      background-color: $background-color-f0f0f0;
    }

    .amos-tree-node-content-wrapper.amos-tree-node-content-wrapper-open.amos-tree-node-haschild .amos-tree-title{
      color: $font-color-black;
    }

    .amos-tree .amos-tree-title {
      display: inline-block;

      > span {
        display: flex;
        align-items: center;
        color: $font-color-black;

        .amos-checkbox {
          margin-right: 5px;
          margin-left: 5px;
          line-height: 18px;
        }
      }
    }
  }
}

.search-model-style {
  .amos-modal-container {
    height: 730px;

    .amos-modal-content {
      min-height: 640px;

      .eh-listselect-list {
        min-height: 610px;
        padding-right: 5px;
        padding-left: 5px;
      }
    }

    .search-model-form {
      display: flex;
      justify-content: space-around;
      align-items: center;
      padding-top: 0.8em;

      .amos-form-item-label {
        width: 8em;
      }

      .search-model-btn {
        margin-bottom: 1em;
      }
    }
  }

  .amos-modal-footer {
    .amos-btn.eb-modal-save {
      color: white;
    }
  }
}

.input-icon-box {
  display: flex;
  align-items: center;

  .input-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 10px;
    background: red;
    border-radius: 50%;
  }

  .input-text {
    color: red;
  }

  .input-icon1 {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 10px;
    background: rgb(4, 206, 4);
    border-radius: 50%;
  }

  .input-text1 {
    color: rgb(4, 206, 4);
  }

  .input-icon2 {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 10px;
    background: rgb(223, 223, 15);
    border-radius: 50%;
  }

  .input-text2 {
    color: rgb(223, 223, 15);
  }
}
