$color-error-border: #FF6A6A;
$color-error-text: #F34F4F;
$background-color-error-text: #F9F9F9;
$color-required-star: #FF6A6A;
$color-help-text: #999;
$color-placeholder: #CCC;

.itsa-input {
    position: relative;
    width: 15em;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;

    input {
        width: 100% !important;
        display: block !important;
        margin: 0 !important;
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        box-sizing: border-box;
    }

    input::-webkit-input-placeholder { /* WebKit, Blink, Edge */
        color: $color-placeholder;
    }

    input:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
        color: $color-placeholder;
        opacity: 1;
    }

    input::-moz-placeholder { /* Mozilla Firefox 19+ */
        color: $color-placeholder;
        opacity: 1;
    }

    input:-ms-input-placeholder { /* Internet Explorer 10-11 */
        color: $color-placeholder;
    }

    input:placeholder-shown { /* Standard (https://drafts.csswg.org/selectors-4/#placeholder) */
        color: $color-placeholder;
    }
}

.itsa-input-required::after {
    content: "*";
    position: absolute;
    top: 0.1em;
    right: 0;
    color: $color-required-star;
}

.itsa-input-feedback-success::after {
    content: url("../img/icon-success.svg");
    position: absolute;
    top: 0.1em;
    right: 0;
}

.itsa-input-inputbox {
    position: relative;
}

.itsa-input-error input {
    border-color: $color-error-border !important;
    -webkit-transition: all 0.2s ease-out 0s;
    -moz-transition: all 0.2s ease-out 0s;
    -ms-transition: all 0.2s ease-out 0s;
    -o-transition: all 0.2s ease-out 0s;
    transition: all 0.2s ease-out 0s;
}

.itsa-input-error-text {
    color: $color-error-text;
    font-size: 0.8em;
    line-height: 1em;
    margin: 0;
    opacity: 1;
    position: absolute;
    z-index: 1;
    background-color: $background-color-error-text;
    border: 1px solid $color-error-border;
    bottom: -0.7em;
    left: auto;
    padding: 0.15em 0.4em 0.1em;
    right: 0.2em;
    -webkit-transition: all 0.2s ease-out 0s;
    -moz-transition: all 0.2s ease-out 0s;
    -ms-transition: all 0.2s ease-out 0s;
    -o-transition: all 0.2s ease-out 0s;
    transition: all 0.2s ease-out 0s;
}

.itsa-input-help-text {
    color: $color-help-text;
    font-size: 0.8em;
    margin: 0.2em 0 0.4em;
}
