.tb-label {
    font-size: $text-sm;
    cursor: pointer;
}

.tb-input {
    line-height: 1;
    border: 1px solid config('colors.grey-light');
    padding: .875rem $spacing-3;
    width: 100%;
    background: config('colors.white');
    color: config('colors.grey-darkest');
    border-radius: $radius-small;
    transition: border-color $transition-fast;

    &:hover {
        border-color: config('colors.grey');
    }

    &:focus {
        border-color: config('colors.primary');
    }

    // If a field is required, it will be validated.
    &:required:valid {
        border-color: config('colors.positive');
    }

    &:hover:required:valid {
        border-color: config('colors.positive-dark');
    }

    &:focus:required:valid,
    &:active:required:valid {
        border-color: config('colors.positive-light');
    }
}

.tb-input--small {
    font-size: $text-sm;
    padding: $spacing-3;
}

.tb-input--large {
    font-size: $text-lg;
    padding: $spacing-3 $spacing-base;
}

/* stylelint-disable */
.tb-input--date {
    position: relative;
}

// Push the datepicker trigger to a reasonable position in Webkit browsers.
.tb-input--date::-webkit-calendar-picker-indicator {
    position: absolute;
    left: 12ch;
}

.tb-input--date::-webkit-clear-button {
    display: none;
    -webkit-appearance: none;
}

.tb-input--date::-webkit-inner-spin-button {
    display: none;
    -webkit-appearance: none;
}
/* stylelint-enable */

.tb-input--textarea {
    line-height: 1.5;
    padding: $spacing-3;
    resize: vertical;
    min-height: 20vh;
}

// Remove IE default UI.
::-ms-clear {
    display: none;
}

.tb-input--select {
    appearance: none;

    + .tb-icon {
        font-size: $text-2xl;
    }

    &::-ms-expand {
        display: none;
    }
}

