/* TextBox, TextArea, NumericTextBox and shared Telerik input states. */
.yess-theme-host .k-input,
.yess-theme-host .k-textbox,
.yess-theme-host .k-textarea,
.yess-theme-host .k-numerictextbox,
.yess-theme-host .k-maskedtextbox,
.yess-theme-host .k-picker {
    min-height: var(--yess-control-height-md);
    border: var(--yess-control-border-width) solid var(--yess-input-border);
    border-radius: var(--yess-control-radius);
    background: var(--yess-input-background);
    color: var(--yess-input-foreground);
    box-shadow: none;
    transition:
        border-color var(--yess-control-transition-duration) ease,
        background-color var(--yess-control-transition-duration) ease,
        color var(--yess-control-transition-duration) ease,
        box-shadow var(--yess-control-transition-duration) ease;
}

.yess-theme-host .k-input:hover:not(.k-disabled),
.yess-theme-host .k-textbox:hover:not(.k-disabled),
.yess-theme-host .k-textarea:hover:not(.k-disabled),
.yess-theme-host .k-numerictextbox:hover:not(.k-disabled),
.yess-theme-host .k-picker:hover:not(.k-disabled) {
    border-color: var(--yess-input-border-hover);
}

.yess-theme-host .k-input:focus-within,
.yess-theme-host .k-textbox:focus-within,
.yess-theme-host .k-textarea:focus-within,
.yess-theme-host .k-numerictextbox:focus-within,
.yess-theme-host .k-picker:focus-within,
.yess-theme-host .k-input.k-focus,
.yess-theme-host .k-picker.k-focus {
    border-color: var(--yess-input-border-focus);
    outline: var(--yess-control-focus-width) solid color-mix(in srgb, var(--yess-color-focus) 42%, transparent);
    outline-offset: var(--yess-control-focus-offset);
    box-shadow: none;
}

.yess-theme-host .k-input-inner,
.yess-theme-host .k-textbox input,
.yess-theme-host .k-textarea textarea,
.yess-theme-host textarea.k-input-inner,
.yess-theme-host input.k-input-inner {
    min-height: calc(var(--yess-control-height-md) - (2 * var(--yess-control-border-width)));
    padding-inline: var(--yess-control-padding-inline);
    background: transparent;
    color: var(--yess-input-foreground);
    caret-color: var(--yess-color-primary);
}

.yess-theme-host .k-textarea,
.yess-theme-host .k-textarea textarea,
.yess-theme-host textarea.k-input-inner {
    min-height: 6rem;
    line-height: var(--yess-line-height-normal);
    resize: vertical;
}

.yess-theme-host .k-input-inner::placeholder,
.yess-theme-host .k-textbox input::placeholder,
.yess-theme-host .k-textarea textarea::placeholder,
.yess-theme-host input::placeholder,
.yess-theme-host textarea::placeholder {
    color: var(--yess-input-placeholder);
    opacity: 1;
}

.yess-theme-host .k-input.k-disabled,
.yess-theme-host .k-textbox.k-disabled,
.yess-theme-host .k-textarea.k-disabled,
.yess-theme-host .k-numerictextbox.k-disabled,
.yess-theme-host .k-picker.k-disabled,
.yess-theme-host .k-input[aria-disabled="true"],
.yess-theme-host .k-picker[aria-disabled="true"] {
    border-color: var(--yess-color-border);
    background: var(--yess-input-background-disabled);
    color: var(--yess-input-foreground-disabled);
    cursor: not-allowed;
    opacity: var(--yess-control-disabled-opacity);
}

.yess-theme-host .k-input[readonly],
.yess-theme-host .k-input-inner[readonly],
.yess-theme-host .k-textbox input[readonly],
.yess-theme-host .k-textarea textarea[readonly],
.yess-theme-host .k-readonly {
    border-color: var(--yess-color-border);
    background: var(--yess-input-background-readonly);
    color: var(--yess-color-text);
    opacity: var(--yess-control-readonly-opacity);
}

.yess-theme-host .k-input.k-invalid,
.yess-theme-host .k-textbox.k-invalid,
.yess-theme-host .k-textarea.k-invalid,
.yess-theme-host .k-numerictextbox.k-invalid,
.yess-theme-host .k-picker.k-invalid,
.yess-theme-host .k-input.ng-invalid,
.yess-theme-host .k-input[aria-invalid="true"],
.yess-theme-host .k-picker[aria-invalid="true"] {
    border-color: var(--yess-input-border-invalid);
    outline-color: color-mix(in srgb, var(--yess-color-danger) 45%, transparent);
}

.yess-theme-host .k-input.k-valid,
.yess-theme-host .k-textbox.k-valid,
.yess-theme-host .k-textarea.k-valid,
.yess-theme-host .k-numerictextbox.k-valid,
.yess-theme-host .k-picker.k-valid {
    border-color: var(--yess-input-border-valid);
}

.yess-theme-host .k-numerictextbox .k-spin-button,
.yess-theme-host .k-numerictextbox .k-input-spinner,
.yess-theme-host .k-input-spinner .k-button {
    min-width: var(--yess-target-size-minimum);
    border-color: var(--yess-color-border);
    background: var(--yess-color-surface-subtle);
    color: var(--yess-color-text);
}

.yess-theme-host .k-numerictextbox .k-spin-button:hover:not(.k-disabled),
.yess-theme-host .k-input-spinner .k-button:hover:not(.k-disabled) {
    background: var(--yess-navigation-item-hover);
    color: var(--yess-color-primary);
}

.yess-theme-host .k-input-prefix,
.yess-theme-host .k-input-suffix,
.yess-theme-host .k-input-button,
.yess-theme-host .k-clear-value {
    color: var(--yess-color-muted);
}

.yess-theme-host .k-input-button,
.yess-theme-host .k-clear-value {
    min-width: var(--yess-target-size-minimum);
    min-height: var(--yess-target-size-minimum);
}

.yess-theme-host .k-input-button:hover:not(.k-disabled),
.yess-theme-host .k-clear-value:hover:not(.k-disabled) {
    background: var(--yess-navigation-item-hover);
    color: var(--yess-color-primary);
}

.yess-theme-host .k-input-button:focus-visible,
.yess-theme-host .k-clear-value:focus-visible,
.yess-theme-host .k-input-spinner .k-button:focus-visible {
    outline: var(--yess-control-focus-width) solid var(--yess-color-focus);
    outline-offset: var(--yess-control-focus-offset);
    box-shadow: none;
}

.yess-theme-host input:-webkit-autofill,
.yess-theme-host textarea:-webkit-autofill,
.yess-theme-host select:-webkit-autofill {
    -webkit-text-fill-color: var(--yess-color-text);
    box-shadow: 0 0 0 1000px var(--yess-color-surface) inset;
    transition: background-color 9999s ease-out 0s;
}

@media (forced-colors: active) {
    .yess-theme-host .k-input,
    .yess-theme-host .k-textbox,
    .yess-theme-host .k-textarea,
    .yess-theme-host .k-numerictextbox,
    .yess-theme-host .k-picker {
        border-color: ButtonText;
        background: Field;
        color: FieldText;
        forced-color-adjust: auto;
    }

    .yess-theme-host .k-input:focus-within,
    .yess-theme-host .k-picker:focus-within {
        outline-color: Highlight;
    }
}
