@import '~@thumbtack/thumbprint-tokens/dist/scss/_index';

// The `.root.root.root` is used to increase specificity so Thumbprint takes precedence over a
// highly specific selector in Thumbtack's website.
// https://github.com/thumbtack/thumbprint-archive/issues/244
.root.root.root {
    font-family: $tp-font-family__base;
    font-size: $tp-font__body__1__size;
    line-height: $tp-font__body__1__line-height;
    width: 100%;
    border-width: 1px;
    border-style: solid;
    border-radius: $tp-border-radius__base;
    padding: 10px 14px;
    vertical-align: middle;
    resize: vertical;
    height: 152px;
    min-height: 104px;

    &:focus {
        color: $tp-color__black;
        border-color: $tp-color__blue;
    }

    ::-webkit-input-placeholder,
    ::-moz-placeholder,
    :-ms-input-placeholder {
        color: $tp-color__black-300;
    }

    &StateDefault {
        border-color: $tp-color__gray;
        color: $tp-color__black;
        background-color: $tp-color__white;
    }

    &StateDisabled {
        border-color: $tp-color__gray;
        color: $tp-color__gray;
        background-color: $tp-color__gray-200;
    }

    &StateError {
        border-color: $tp-color__red;
        color: $tp-color__red;
        background-color: $tp-color__white;

        // This must be three separate rules, not a comma-separated list, to avoid the different
        // vendor prefixes conflicting.
        &::-webkit-input-placeholder {
            color: $tp-color__red;
        }

        &::-moz-placeholder {
            color: $tp-color__red;
        }

        &:-ms-input-placeholder {
            color: $tp-color__red;
        }
    }
}
