@import "../rt.variables.less";

.rt-input{
    /*overflow: hidden;*/
    position: relative;
    &>.error-message{
        display: none;
        position: absolute;
        top: -2.9rem;
        line-height: 2.5rem;
        right: 0px;
        background: #010b10;
        color: #FFF;
        border-radius: 2px;
        padding: 0px 8px;
        &::after{
            content: " ";
            position: absolute;
            bottom: -1.5rem;
            right: 1rem;
            height: 0px;
            border-width: 1rem 1rem;
            border-style: solid;
            border-color: #151414 transparent transparent transparent;
        }
    }
    &.danger{
        &>.error-message{
            display: block;
        }
    }
    &>input, &>textarea, &>select, &.input{
        height: @rt-input-height;
        line-height: @rt-input-height;
        background-color: transparent;
        width: 100%;
        &:focus, &:active{
            -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
            -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
            box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
        }
    }

    &[data-required=true]{
        &::after{
            position: absolute;
            right: -1.8rem;
            top: -0.2rem;
            padding: 0.3rem;
            content: "\f069";
            font-family: FontAwesome;
            font-size: 1.2rem;
            color: #EA2626;
        }
    }

    textarea{
        min-height: 12rem;
    }

    .CodeMirror * {
        line-height: 1.8rem;
    }

    .choose-file{
        position: relative;
        cursor: pointer;
        overflow: hidden;
        border: 1px solid #c7c7c7;
        padding: 0px;
        &>.icon{
            position: absolute;
            margin: 0.7rem;
        }
        &>.label{
            cursor: pointer;
            padding-left: 2.5rem;
            display: inline-block;
            width: 100%;
            height: 100%;
            line-height: 3rem;
            box-sizing: border-box;
        }
        &>input[type=file]{
            position: absolute;
            width: 100%;
            height: 3rem;
            left: 0px;
            top: 0px;
            opacity: 0;
        }
    }

}

.rt-input[type=search]{
    border-radius: 5rem;
    padding: .3rem .8rem;
    -webkit-box-shadow: none;
    outline: -webkit-focus-ring-color auto 0px;
}
