.search_container {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  position: absolute;
  font-size: 12px;
  user-select: none;

  .search_options {
    padding: 0 8px;
    display: block;

    input {
      font-size: 12px; //  搜索这里字号会小一号 12px
    }
  }

  .replace {
    padding: 0 5px;
  }

  .header {
    padding: 10px 5px;
    > span {
      display: inline-block;
      margin-left: 10px;
    }

    .menu {
      float: right;
      margin-left: 5px;
      opacity: 0.5;
    }

    .menu_active {
      opacity: 1;
    }
  }

  .result_describe,
  .result_error {
    padding: 10px;
    padding-top: 15px;
    margin: 0;
    display: flex;
    .text {
      display: inline;
      flex: 1;
      line-height: 16px;
    }
    .result_fresh,
    .result_fold {
      cursor: pointer;
      &:hover {
        transform: scale(1.1);
      }
      &.disabled {
        opacity: 0.5;
        cursor: not-allowed;
        pointer-events: none;
      }
    }
    .result_fresh {
      margin: 0 5px;
    }
  }

  .result_error {
    color: var(--errorForeground);
  }

  input[type='text'] {
    width: 100%;
  }

  .search_and_replace_container {
    display: flex;

    .replace-toggle {
      display: flex;
      align-items: center;
      width: 15px;
      min-width: 15px;
      justify-content: center;
      margin-right: 2px;
      box-sizing: border-box;

      &:hover {
        background: var(--input-background);
      }
    }

    .replace_all {
      color: var(--textLink-foreground);
      cursor: pointer;
    }

    .search_and_replace_fields {
      display: flex;
      flex-direction: column;
      flex: 1;
    }

    .search_input_title {
      line-height: 20px;
      margin-top: 8px;
      margin-bottom: 8px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      .search_title {
        margin-right: 5px;
        text-transform: uppercase;
      }
    }

    .search_field {
      display: flex;
      align-items: center;
      border: var(--input-border);
      margin-bottom: 4px;

      &:hover {
        border-color: var(--inputOption-activeBorder);
      }

      .option_buttons {
        height: 23px;
        display: flex;
        align-items: center;
        background: var(--input-background);
      }
    }

    .replace_field {
      display: flex;
    }
  }

  .search_details {
    .glob_field {
      display: flex;
      flex-direction: column;
      white-space: nowrap;

      .label {
        line-height: 20px;
        margin: 8px 0 4px 0;
        user-select: none;
        font-size: 11px;
        display: flex;
        align-items: center;
        justify-content: space-between;
      }

      .use_default_excludes_wrapper {
        display: flex;
        align-items: center;
        .search_option {
          margin-left: 3px;
        }
      }
    }
  }

  .search_excludes_description {
    line-height: 1;
    margin-left: 5px;
  }

  @option-size: 20px;

  .search_option {
    width: @option-size;
    height: @option-size;
    margin: 0 1px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    user-select: none;
    background-repeat: no-repeat;
    background-position: center;
    border: 1px solid transparent;
    cursor: pointer;
    opacity: 0.7;

    &:hover {
      opacity: 1;
    }

    &::before {
      display: inline-block;
      height: @option-size - 2;
      line-height: @option-size - 2;
    }

    &.select {
      background-color: var(--inputOption-activeBackground);
      border-color: var(--inputOption-activeBorder);
      opacity: 1;
    }
  }

  .replace_all_button {
    margin-left: 4px;
    padding: 0 5px;
    text-align: center;
    line-height: 26px;
    color: var(--textLink-foreground);
    border: 1px solid transparent;
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
    flex-shrink: 0;
    cursor: pointer;
    &.disabled {
      color: inherit;
      opacity: 0.7;
      pointer-events: none;
    }
    &:hover {
      border-radius: 2px;
      border-color: currentColor;
    }
  }
}

.line_text {
  white-space: nowrap;
}

.tree {
  overflow: hidden;
}

.tree_child {
  .icon {
    font-size: 25px;
    margin-left: 0px;
    margin-right: 10px;
  }

  .text {
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .title {
    display: flex;
    align-items: center;
    height: 22px;

    &:hover {
      color: var(--list-hoverForeground);
      background: var(--list-hoverBackground);
    }
  }

  .result {
    padding: 0;
    margin: 0;
    list-style-type: none;

    li {
      padding-left: 30px;
      text-overflow: ellipsis;
      width: 100%;
      overflow: hidden;

      &:hover {
        color: var(--list-hoverForeground);
        background: var(--list-hoverBackground);
      }
    }
  }

  &.kt_mod_selected {
    color: var(--list-activeSelectionForeground);
    background: var(--list-activeSelectionBackground);
  }

  &.kt_mod_focused {
    color: var(--list-focusForeground);
    background: var(--list-focusBackground);
  }

  &.kt_mod_invalid {
    color: var(--list-invalidItemForeground);
  }
}

.include_rule_content {
  font-size: 11px;

  > p {
    margin-tio: 2px;
    margin-bottom: 0;
  }

  > ul {
    margin: 0;
    padding: 0;

    > li {
      opacity: 0.7;
      list-style-type: none;
    }
  }
}

.exclude_rule_content {
  font-size: 11px;

  > p {
    margin-bottom: 5px;
    > span {
      float: right;
      color: var(--textLink-foreground);
      cursor: pointer;

      &::hover {
        color: var(--textLink-activeForeground);
      }
    }
  }

  > div {
    max-width: 200px;
    opacity: 0.7;
  }
}

.limit {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.loading-wrap {
  position: relative;
  width: calc(100% - 16px);
  margin-left: 8px;
}

.search_result_code {
  color: var(--foreground);
}

.search_result_label {
  margin-right: 0;
}

.checkbox :global(.kt-checkbox-icon) {
  width: 14px;
  height: 14px;
  border-color: var(--input-placeholderForeground);
}
