@import "../const.less";

.ant-input,
.ant-input-affix-wrapper {
    padding: 5px 11px;
    line-height: 20px;
    .ant-input-suffix {
        .anticon-info-circle {
            font-size: 13px;
            padding: 1.5px;
            color: @black_msg;
        }
    }
}

.ant-input[disabled],
.ant-input-affix-wrapper-disabled {
    border-color: transparent;
    &:hover {
        border-color: transparent;
    }
}

.ant-input-clear-icon {
    &:hover {
        color: @black_Desc;
    }
}

.ant-input-focused {
    border-color: #005CE6 !important;
    box-shadow: none;
}

.ant-input::-ms-input-placeholder {
    color: #B1B4C5 !important;
}

.ant-input::-webkit-input-placeholder {
    color: #B1B4C5 !important;
}

.ant-input.ant-input-sm {
    padding: 1px 11px;
}

.ant-input-search .ant-input-wrapper .ant-input-search-button {
    border-left: 0;
}

.ant-input-wrapper {
    .ant-input-group-addon {
        .ant-select-focused {
            .ant-select-selector {
                border-color: #FAFAFA !important;
            }
        }
        .ant-input-search-button {
            .anticon-search {
                margin: 0 auto;
            }
        }
    }
}

.ant-input-search-with-button {
    .ant-input-group .ant-input:first-child,
    .ant-input-group-addon:first-child {
        border-top-right-radius: 4px;
        border-bottom-right-radius: 4px;
    }
    .ant-input-group .ant-input-group-addon:last-child {
        .ant-input-search-button {
            border-radius: 0 4px 4px 0;
        }
    }
}

.ant-btn-icon-only {
    width: 32px;
    background: none;
    .anticon-search {
        margin-left: 9px;
    }
}

.ant-input-search > .ant-input-group > .ant-input-group-addon:last-child .ant-input-search-button:not(.ant-btn-primary) {
    margin-inline-end: -1px;
    color: @black_msg;
    border: solid 1px #D8DAE1;
    &:hover {
        border: solid 1px @primaryColor;
        color: @primaryColor;
    }
}

// 密码输入框 icon 颜色
.ant-input-password {
    .ant-input-password-icon {
        color: @black_msg;
        &:hover {
            color: @black_Desc;
        }
    }
}

// 穿梭框 icon 颜色
.ant-input-prefix {
    color: @black_msg;
}

.ant-input-search {
    .ant-input-group-addon {
        background-color: @white;
    }
}

/* ————Custom ClassName———— */
.dt-input-search-group-shadow.ant-input-group {
    .ant-select-focused {
        z-index: 0;
    }
    .ant-select {
        box-shadow: 0 12px 20px 0 rgba(29, 120, 255, 0.1);
        border-color: @white;
        &:hover {
            color: @primaryColor;
            .ant-select-arrow {
                color: @primaryColor;
            }
        }
        & > .ant-select-selector {
            height: 44px;
            border-color: @white;
            transition: none;
            .ant-select-selection-item {
                line-height: 42px;
            }
        }
    }
    .ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector {
        border-color: @white;
        box-shadow: none;
    }
    .ant-input-search {
        box-shadow: 0 12px 20px 0 rgba(29, 120, 255, 0.1);
        .ant-input {
            border-left: 0;
            padding: 11px;
            border-color: @white;
            box-shadow: none;
        }
        .ant-input-wrapper {
            position: relative;
            &::before {
                content: "";
                position: absolute;
                left: 0;
                top: 50%;
                transform: translateY(-50%);
                width: 1px;
                height: 24px;
                background-color: @grey_border;
                z-index: 2;
            }
        }
        .ant-input-group-addon:last-child {
            box-shadow: none !important;
            .ant-input-search-button:not(.ant-btn-primary) {
                height: 44px;
                width: 44px;
                border-color: @white;
            }
        }
    }
}

.dt-input-search-external {
    .ant-input-group {
        .ant-input-group-addon:last-child {
            left: 16px;
            .ant-input-search-button {
                border-radius: 4px;
                width: 48px;
            }
        }
    }
}
