@import '~@gm/graphmod-common/src/index.scss';

.mod-com-form.amos-form {
  .amos-form-item-label {
    font-size: 12px;
    color: #3f3f3f;
    text-align: left;

    .amos-form-item-field {
      font-size: inherit;
      color: $form-label-font-color;
    }
  }

  .amos-form-item-control {
    display: inline-block;
    flex: 1;
    width: 100%;
    vertical-align: top;

    .tree-select-model {
      border: 1px solid $amos-form-item-border;
    }
  }

  input {
    width: 100%;
    height: 32px;
    padding: 0 8px;
    font-size: 12px;
    color: $form-label-font-color;
    background: $amos-form-item-background;
    border: 1px solid $amos-form-item-border;
    border-radius: 4px;
    outline: none;
    opacity: 1;

    &:not([disabled]):hover {
      border-color: #27b3fe;
    }
  }

  .amos-radio-group {
    color: $form-label-font-color;
  }

  .amos-radio:hover {
    color: $form-label-font-color;
  }

  .amos-textarea {
    width: 100%;
    padding: 0 8px;
    font-size: 12px;
    line-height: 1.5;
    color: $form-label-font-color;
    background: $amos-form-item-background;
    border: 1px solid $amos-form-item-border;
    border-radius: 4px;
  }

  .amos-select {
    width: 100%;
    height: 32px;
    min-width: 5em;
    font-size: 12px;
    line-height: 32px;
    color: $form-label-font-color;
    background: $amos-form-item-background;
    border: 1px solid $amos-form-item-border;
    border-radius: 4px;

    .amos-select-dropdown-icon {
      margin-top: -14px;
    }
  }

  .amos-switch {
    height: 20px;
    margin: 0;

    &::after {
      top: 0;
    }
  }

  .select-scroll-wrapper {
    .ant-select {
      color: $form-label-font-color;
      background: $amos-form-item-background;

      .ant-select-selection {
        width: 100%;
        height: 32px;
        font-size: 12px;
        line-height: 32px;
        // background: white;
        color: $form-label-font-color;
        background: $amos-form-item-background;
        border: 1px solid $amos-form-item-border;
        border-radius: 4px;

        .ant-select-selection__rendered {
          padding-right: 0;
          padding-left: 0;
          line-height: 30px;
        }

        .ant-select-arrow {
          right: 0.5em;
          margin-top: 18px;
          font-size: 8px;
          color: rgba(52, 95, 166, 1);
        }
      }
    }
  }

  .amos-cascader-dropdown {
    width: 100%;
    min-height: 32px;
    font-size: 12px;
    line-height: 32px;
    background: white;
    border: 1px solid $amos-form-item-border;
    border-radius: 4px;
  }

  .amos-multi-select {
    width: 100%;
    min-height: 32px;
    font-size: 12px;
    line-height: 32px;
    color: $form-label-font-color;
    background: $amos-form-item-background;
    border: 1px solid $amos-form-item-border;
    border-radius: 4px;

    .amos-taglist {
      font-size: 13px;

      .amos-taglist-item {
        color: $form-label-font-color;
        background: $amos-form-item-background;
        border: 1px solid $amos-taglist-item-border;

        .amos-btn {
          margin-top: 0;
        }
      }
    }
  }

  .mod-com-formcollapsepane-content .amos-select-title.amos-text-overflow.amos-popover-trigger {
    background: $amos-form-item-background;
  }

  // .mod-com-form.amos-form .amos-idropdown-toggle.amos-select-dropdown.amos-select-dropdown-iconable.amos-select.amos-popover-trigger.amos-popover-trigger-disabled {
  //   background: red;
  // }

  .eb-form-number-range {
    display: flex;
    width: 100%;

    > span {
      padding: 0 5px;
    }

    input {
      flex: 1;
    }

    .amos-select {
      width: 4.9em;
      min-width: 0;
      margin-left: 3px;

      .amos-select-title {
        padding-left: 7px;
      }

      .amos-select-dropdown-icon {
        right: 4px;
      }
    }
  }

  .tree-select-scroll-wrapper {
    width: 100%;
    color: $form-label-font-color;
    background: $amos-form-item-background;

    .ant-select {
      .ant-select-selection {
        width: 100%;
        height: 32px;
        font-size: 12px;
        line-height: 32px;
        // background: white;
        color: $form-label-font-color;
        background: $amos-form-item-background;
        border: 1px solid $amos-form-item-border;
        border-radius: 4px;

        &:active {
          border-color: #27b3fe;
          outline: none;
          box-shadow: 0 0 0 1px rgba(39, 179, 254, 0.15);
        }

        .ant-select-selection__rendered {
          padding: 0;

          .ant-select-selection__choice {
            color: $form-label-font-color;
            background: $amos-form-item-background;
            border: 1px solid $amos-taglist-item-border;
          }

          .ant-select-selection__placeholder {
            top: 0;
            width: 100%;
            height: 30px;
            margin: 0;
            font-size: 12px;
            line-height: 30px;
          }
        }

        .ant-select-arrow {
          top: 50%;
          right: 7px;
          margin-top: -7px;
          font-size: 12px;
          color: rgba(52, 95, 166, 1);
        }
      }

      &.ant-select-open {
        .ant-select-selection {
          box-shadow: none;
        }
      }

      .ant-select-selection--multiple {
        height: auto;
        min-height: 32px;
      }
    }

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

      overflow: auto;
      background-color: $form-modal-background;
    }

    .ant-select-tree-switcher {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 14px;
      height: 14px;

      &::after {
        display: block;
        width: 16px;
        height: 16px;
        // background-image: url('./../assets/common/treeOpen.svg');
        background-image: url('~@gm/graphmod-assets/assets/common/treeOpen.svg');
        background-repeat: no-repeat;
        content: '';
      }

      &.ant-select-tree-switcher-open {
        position: relative;
        top: -2px;
        transform: rotate(90deg);
      }

      &.ant-select-tree-switcher-noop {
        &::after {
          display: none;
        }
      }
    }
  }

  .ant-calendar-picker {
    width: 100%;
  }

  .com-corn-generator {
    width: 100%;
  }

  .amos-divider-horizontal {
    margin: 4px 0 15px;
  }

  .mod-com-form-inputselect {
    width: 100%;
    height: 32px;
    line-height: 32px;

    input {
      width: calc(100% - 70px);
      margin-right: 5px;
      vertical-align: top;
    }

    .amos-select {
      width: 65px;
      height: 32px;
      min-width: 0;
      vertical-align: top;

      .eb-btn-conent {
        width: 32px;
      }
    }
  }

  .amos-popover-trigger-disabled * {
    background: none
  }
}

@mixin eb-form-modal {
  .eb-form-modal-content {
    @content;

    padding: 20px 0 12px;
  }

  .eb-form-content {
    @content;
  }

  .eb-form-tablelist-filter-content {
    @content;

    padding: 11px 24px 11px 24px;
  }
}

@include eb-form-modal {
  input {
    width: 100%;
    height: 30px;
    padding: 0 0.6em;
    font-size: $frame-second-fontsize;
    background: $frame-third-color;
    border: 1px solid $frame-main-bordercolor;
    border-radius: 6px;
    outline: none;
    opacity: 1;

    &:not([disabled]):hover {
      border-color: #27b3fe;
    }

    &[type='file'] {
      overflow: hidden;
    }
  }

  .amos-textarea {
    width: 100%;
    padding: 0.6em;
    font-size: $frame-second-fontsize;
    line-height: 1.5;
    background: $frame-third-color;
    border: 1px solid $frame-main-bordercolor;
    border-radius: 6px;
  }

  .amos-select {
    width: 100%;
    height: 30px;
    min-width: 5em;
    font-size: $frame-second-fontsize;
    line-height: 30px;
    background: $frame-third-color;
    border: 1px solid $frame-main-bordercolor;
    border-radius: 6px;

    .amos-select-dropdown-icon {
      margin-top: -14px;
    }
  }

  .amos-switch {
    height: 20px;
    margin: 0;

    &::after {
      top: 0;
    }
  }

  .select-scroll-wrapper {
    .ant-select {
      .ant-select-selection {
        width: 100%;
        height: 30px;
        font-size: $frame-second-fontsize;
        line-height: 30px;
        background: $frame-third-color;
        border: 1px solid $frame-main-bordercolor;
        border-radius: 6px;

        .ant-select-selection__rendered {
          padding-right: 0;
          padding-left: 0;
          line-height: 28px;
        }

        .ant-select-arrow {
          right: 0.5em;
          margin-top: 18px;
          font-size: 16px;
          color: $frame-main-color;
        }
      }
    }
  }

  .amos-cascader-dropdown {
    width: 100%;
    min-height: 30px;
    font-size: $frame-second-fontsize;
    line-height: 30px;
    background: $frame-third-color;
    border: 1px solid $frame-main-bordercolor;
    border-radius: 6px;
  }

  .amos-multi-select {
    width: 100%;
    min-height: 30px;
    font-size: $frame-second-fontsize;
    line-height: 30px;
    background: $frame-third-color;
    border: 1px solid $frame-main-bordercolor;
    border-radius: 6px;

    .amos-taglist {
      font-size: 13px;

      .amos-taglist-item {
        .amos-btn {
          margin-top: 0;
        }
      }
    }
  }

  .eb-form-number-range {
    display: flex;
    width: 100%;

    > span {
      padding: 0 5px;
    }

    input {
      flex: 1;
    }

    .amos-select {
      width: 4.9em;
      min-width: 0;
      margin-left: 3px;

      .amos-select-title {
        padding-left: 7px;
      }

      .amos-select-dropdown-icon {
        right: 4px;
      }
    }
  }

  .tree-select-scroll-wrapper {
    width: 100%;

    .ant-select {
      .ant-select-selection {
        width: 100%;
        height: 30px;
        font-size: $frame-second-fontsize;
        line-height: 30px;
        background: $frame-third-color;
        border: 1px solid $frame-main-bordercolor;
        border-radius: 6px;

        &:active {
          border-color: #27b3fe;
          outline: none;
          box-shadow: 0 0 0 1px rgba(39, 179, 254, 0.15);
        }

        .ant-select-selection__rendered {
          padding: 0;

          .ant-select-selection__placeholder {
            top: 0;
            width: 100%;
            height: 28px;
            margin: 0;
            font-size: $frame-second-fontsize;
            line-height: 28px;
          }
        }

        .ant-select-arrow {
          top: 50%;
          right: 7px;
          margin-top: -7px;
          font-size: $frame-second-fontsize;
          color: $frame-main-color;
        }
      }

      &.ant-select-open {
        .ant-select-selection {
          box-shadow: none;
        }
      }

      .ant-select-selection--multiple {
        height: auto;
        min-height: 30px;
      }
    }

    .ant-select-dropdown {
      overflow: auto;
    }
  }

  .ant-calendar-picker {
    width: 100%;
  }

  .com-corn-generator {
    width: 100%;
  }

  .amos-divider-horizontal {
    margin: 4px 0 15px;
  }

  .eb-form-input-button {
    width: 100%;
    height: 30px;
    line-height: 30px;

    input {
      width: calc(100% - 35px);
      margin-right: 5px;
      vertical-align: top;
    }

    .eb-com-btn {
      width: 30px;
      height: 30px;

      .eb-btn-conent {
        width: 30px;
      }
    }
  }
}

.mod-model-from.amos-modal {
  .eb-form-modal-content {
    padding: 10px 0 10px;
  }

  .mod-com-form.amos-form {
    .amos-row {
      padding: 0 24px;
    }
  }
}

.eb-form-file-label {
  .eb-form-file-label-title {
    font-size: 14px;
  }

  .eb-form-file-label-tip {
    font-size: 12px;
    color: #999;
  }
}

.mod-com-form {
  .amos-checkbox-input:checked + .amos-checkbox-status + .amos-checkbox-text {
    color: $font-color-1a4fa3;
  }

  .amos-checkbox:hover {
    color: $font-color-1a4fa3;
  }

  .ant-input{
    .amos-input {
    color: $form-label-font-color;
    background: $amos-form-item-background;
    border: 1px solid $amos-form-item-border;
   }
  }

  .amos-radio-group {
    .amos-radio {
      color: $form-label-font-color;
    }
  }
}

.mod-com-form .ant-select-tree-title {
  color: $font-color-paper2;
}

.mod-com-form .ant-select-tree-node-content-wrapper.ant-select-tree-node-content-wrapper-open:hover {
  background: $ant-tree-node-background-hover;
}

.mod-com-form .ant-select-tree-node-content-wrapper.ant-select-tree-node-content-wrapper-normal:hover {
  background: $ant-tree-node-background-hover;
}

.mod-com-form .ant-select-tree li .ant-select-tree-node-content-wrapper.ant-select-tree-node-content-wrapper-normal.ant-select-tree-node-selected {
  background: $ant-tree-node-background-hover;
}

.mod-com-form .ant-select-tree-dropdown .ant-select-dropdown-search .ant-select-search__field {
  padding: 0 8px;
  border: 1px solid $amos-form-item-border;
  border-radius: 4px;
  outline: none;
}

.mod-com-form .ant-select-tree-treenode.ant-select-tree-treenode-disabled.ant-select-tree-treenode-switcher-open .ant-select-tree-title{
  color: $font-color-black;
}

.mod-com-form .ant-select-tree-dropdown .ant-select-not-found {
  color: $font-color-black;
}

.mod-com-form .ant-select-selection--multiple .ant-select-search--inline .ant-select-search__field {
  border: none;
}

.mod-com-form .amos-upload.amos-upload-select.amos-upload-select-picture-card {
  background-color: $background-transparent;
}

.mods-com-firepanal .eb-form-tablelist-filter-content {
  .amos-form-item-label {
    font-size: 12px;
    text-align: left;

    .amos-form-item-field {
      font-size: inherit;
      color: $form-label-font-color;
    }
  }

  .amos-form-item-control .amos-input {
    color: $font-color-black;
    background-color: $background-transparent;
    border: 1px solid $amos-form-item-border;
  }

  .amos-form-item-control .amos-select {
    width: 100%;
    height: 30px;
    min-width: 5em;
    font-size: $frame-second-fontsize;
    line-height: 30px;
    color: $form-label-font-color;
    background: $amos-form-item-background;
    border: 1px solid $amos-form-item-border;
    border-radius: 6px;

    .amos-select-dropdown-icon {
      margin-top: -14px;
    }
  }

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

    overflow: auto;
    color: $font-color-black;
    background-color: $form-modal-background;

    .ant-select-tree-node-content-wrapper {
      padding: 0 8px;
      color: $font-color-black;
      outline: none;

      &:hover {
        background: $ant-tree-node-background-hover;
      }
    }

    .ant-select-tree-node-content-wrapper.ant-select-tree-node-selected {
      background: $ant-tree-node-background-hover;
    }

    .ant-select-tree-switcher {
      color: $font-color-black;
    }
  }

  .tree-select-scroll-wrapper .ant-select .ant-select-selection {
    color: $font-color-black;
    background-color: $background-transparent;
    border: 1px solid $amos-form-item-border;
    border-radius: 6px;
  }

  .ant-select-selection--multiple .ant-select-search--inline .ant-select-search__field {
    height: 100%;
    border: none;
  }

  .ant-select-tree-dropdown .ant-select-dropdown-search .ant-select-search__field {
    padding: 0 8px;
    background-color: $background-transparent;
    border: 1px solid $amos-form-item-border;
    border-radius: 4px;
    outline: none;
  }

  .amos-multi-select {
    width: 100%;
    font-size: 13px;
    color: $font-color-black;
    background-color: $background-transparent;
    border: 1px solid $amos-form-item-border;
  }

  .amos-taglist .amos-taglist-item {
    background: $filter-pane-background;
  }

  .amos-taglist li input {
    background: $filter-pane-background;
  }

  .ant-calendar-picker-input {
    height: 30px;
    color: $font-color-black;
    background: $background-transparent;
    border: 1px solid $amos-form-item-border;
  }
}
