.ppro-y26-c-text-input {
    width: 100%;
}

.ppro-y26-c-text-input__wrapper {
    position: relative;
}

.ppro-y26-c-text-input__control {
    width: 100%;
    height: 3.5rem;
    padding: 1.375rem 1rem 0.375rem;
    background: var(--ppro-color-white);
    border: 1px solid var(--ppro-foreground);
    border-radius: 0.125rem;
    color: var(--ppro-foreground);
    font-family: var(--ppro-font-body);
    font-weight: var(--ppro-font-weight-body);
    font-size: 1rem;
    line-height: 1.5rem;
    letter-spacing: var(--ppro-tracking-tight);
    appearance: none;
    outline: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.ppro-y26-c-text-input__control:focus {
    box-shadow: inset 0 0 0 1px var(--ppro-foreground);
}

.ppro-y26-c-text-input__control::placeholder {
    color: var(--ppro-foreground);
    opacity: 0.4;
}

.ppro-y26-c-text-input--with-icon .ppro-y26-c-text-input__control {
    padding-left: 3.25rem;
}

.ppro-y26-c-text-input--with-button .ppro-y26-c-text-input__control {
    padding-right: 3.5rem;
}

.ppro-y26-c-text-input__label {
    position: absolute;
    top: 50%;
    left: 1rem;
    color: var(--ppro-foreground);
    opacity: 0.5;
    font-size: 1rem;
    line-height: 1.5rem;
    transform: translateY(-50%);
    transform-origin: left center;
    transition:
        top 0.2s ease,
        opacity 0.2s ease,
        transform 0.2s ease;
}

.ppro-y26-c-text-input--with-icon .ppro-y26-c-text-input__label {
    left: 3.25rem;
}

.ppro-y26-c-text-input__control:focus + .ppro-y26-c-text-input__label,
.ppro-y26-c-text-input__control:not([value=""]) + .ppro-y26-c-text-input__label {
    top: 0.5625rem;
    opacity: 0.7;
    transform: translateY(0) scale(0.75);
    transform-origin: left top;
}

.ppro-y26-c-text-input__icon {
    position: absolute;
    top: 50%;
    left: 1.125rem;
    display: inline-flex;
    color: var(--ppro-foreground);
    opacity: 0.6;
    transform: translateY(-50%);
    pointer-events: none;
}

.ppro-y26-c-text-input__icon-svg {
    width: 1.125rem;
    height: 1.125rem;
}

.ppro-y26-c-text-input__button {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    background: none;
    border: none;
    color: var(--ppro-foreground);
    transform: translateY(-50%);
    transition: opacity 0.2s ease;
}

.ppro-y26-c-text-input__button:hover {
    opacity: 0.6;
}

.ppro-y26-c-text-input__button-svg {
    width: 1.25rem;
    height: 1.25rem;
}

.ppro-y26-c-text-input__error {
    display: none;
    align-items: center;
    gap: 0.625rem;
    margin-top: 0.5rem;
    color: var(--ppro-color-signal-red);
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.1rem;
    letter-spacing: 0;
}

.ppro-y26-c-text-input__error::before {
    content: "";
    flex-shrink: 0;
    width: 0.5rem;
    height: 0.5rem;
    border: 2px solid var(--ppro-color-signal-red);
    border-radius: 50%;
}

.has-errors .ppro-y26-c-text-input__control {
    border-color: var(--ppro-color-signal-red);
}

.has-errors .ppro-y26-c-text-input__label {
    color: var(--ppro-color-signal-red);
    opacity: 1;
}

.has-errors .ppro-y26-c-text-input__error {
    display: flex;
}
