@import "../../../style/index.less";
@import "../../input/style/mixin.less";

@ui-prefix-inputbutton: yyui-inputbutton;
/**带按钮的文本输入框**/
.@{ui-prefix-inputbutton}{
    position: relative;
    display: flex;
    align-items: center;
    //display: table;
    //font-size: 16px;
    //.input-base();
    height: @input-height-base;
    &.small{
        height: auto;
        line-height: normal;
    }
    &-lg {
        .input-lg();
    }
    &-sm {
        .input-sm();
    }
    //.yyui-button.ant-btn{
    //    position: absolute;
    //    min-width: 44px;
    //    top:0px;
    //    right: 0px;
    //    height: 100%;
    //    z-index: 2;
    //    -webkit-border-radius:0 3px 3px 0;
    //    -moz-border-radius:0 3px 3px 0;
    //    -ms-border-radius:0 3px 3px 0;
    //    -o-border-radius:0 3px 3px 0;
    //    border-radius:0 3px 3px 0;
    //}
    //// 右侧按钮最小宽度是44px,border-radius是3px
    //.ant-input{
    //    max-width: calc(~"100% - 41px");
    //    max-width: -webkit-calc(~"100% - 41px");
    //    max-width: -moz-calc(~"100% - 41px");
    //}
    .yyui-input{
        //display: table-cell;
        flex: auto;
        //width: 100%;
        height: inherit;
        line-height: @input-height-base;
        .ant-input-wrapper{
            height: inherit;
            line-height: inherit;
        }
        .ant-input{
            background: #FFF;
            height: inherit;
            line-height: inherit;
            -webkit-border-radius:@border-radius-base 0 0 @border-radius-base;
            -moz-border-radius:@border-radius-base 0 0 @border-radius-base;
            -ms-border-radius:@border-radius-base 0 0 @border-radius-base;
            -o-border-radius:@border-radius-base 0 0 @border-radius-base;
            border-radius:@border-radius-base 0 0 @border-radius-base;
        }
        .ant-input[disabled]{
            background-color: #f7f7f7;
        }
    }
    .yyui-button.ant-btn{
        //display: block;
        height: inherit;
        min-width: 44px;
        //margin-top:1px;
        line-height: 20px;
        border-left: 0;
        -webkit-border-radius:0 @border-radius-base @border-radius-base 0;
        -moz-border-radius:0 @border-radius-base @border-radius-base 0;
        -ms-border-radius:0 @border-radius-base @border-radius-base 0;
        -o-border-radius:0 @border-radius-base @border-radius-base 0;
        border-radius:0 @border-radius-base @border-radius-base 0;
    }
}
//可编辑表格内嵌的带按钮的输入框，例如：参照
.yyui-table .ant-table-row .yyui-inputbutton .yyui-button{
    padding: 4px;
}
//.ant-form-item-control .@{ui-prefix-inputbutton}{
    //line-height: 32px;
    //.yyui-button.ant-btn{
    //    margin-top: 1px;
    //}
//}
//.ant-form-inline .@{ui-prefix-inputbutton}{
//    .yyui-button.ant-btn{
//        margin-top: 3px 0 0 0;
//    }
//}
.yyui-inputrefer .yyui-inputbutton .yyui-button{
    padding: 0;
    background-color: #FFF;
    min-width: 28px;
    .ant-btn .yyui-ripple:before{
        min-width: 28px !important;
    }
}
.yyui-inputrefer .yyui-inputbutton .yyui-button[disabled]{
    background-color: #F7F7F7;
}
