.text-control {
    position: relative;
    display: block;
    margin-bottom: 1rem;
}

.text-control__control {
    font-size: 1rem;
    line-height: 1.25;
    flex: 1;
    width: 100%;
    display: block;
    position: relative;
    background-color: #FFFFFF;
    appearance: none;
    padding: 1.5625rem 1rem 0.6875rem;
    border-radius: var(--borderRadius);
    color: var(--greyColor10);
    border: 1px solid var(--greyColor30);
    height: 3.5rem;
}

.text-control__control:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.text-control__control:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.text-control__control:has(~ .text-control__toggle-password) {
    border-right: 0;
}

.text-control__control::-webkit-date-and-time-value {
    text-align: left;
}

.text-control__control::placeholder {
    color: var(--greyColor30);
}

.text-control__errors {
    margin-top: .25rem;
}

.text-control__errors ul {
    margin: 0;
    padding: 0;
}

.text-control__errors li {
    font-size: .75rem;
    line-height: 1.5;
    list-style: none;
    color: var(--redColor);
    margin-bottom: .25rem;
}

.text-control__label {
    display: inline-block;
    margin-bottom: .25rem;
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: calc(100% - 6rem);
    font-weight: normal;
    color: var(--greyColor30);
    z-index: 1;
    transition: all 250ms cubic-bezier(.645, .045, .355, 1);
    transform-origin: top left;
    white-space: nowrap;
}

.text-control__label.text-control__label--disabled {
    color: var(--greyColor40);
}

.text-control__hint {
    font-size: .75rem;
    line-height: 1.5;
    color: var(--greyColor30);
}

.text-control__control-wrapper {
    display: flex;
    border-radius: var(--borderRadius);
}

.text-control__control-wrapper :is(span, button) {
    flex: 0 0 3.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--greyColor60);
    border: 1px solid var(--greyColor30);
    border-radius: var(--borderRadius);
}

.text-control__control-wrapper :is(span, button):first-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: 0;
}

.text-control__control-wrapper :is(span, button):last-child {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left: 0;
}

.text-control__control-wrapper button {
    background-color: #FFFFFF;
    height: 0;
    padding: 3.375rem 0 0 0;
    align-items: normal;
    overflow: hidden;
    cursor: pointer;
}

.text-control__toggle-password {
    background-image: url("/frontend/assets/Shared/Component/TextControl/Images/ShowPassword-b53ba982f1.svg");
    background-size: 1.5rem;
    background-repeat: no-repeat;
    background-position: center;
}

.text-control__toggle-password.text-control__toggle-password--shown {
    background-image: url("/frontend/assets/Shared/Component/TextControl/Images/HidePassword-0617e11881.svg");
}

.text-control__reset-password {
    font-size: .875rem;
    line-height: calc(20 / 14);
    margin-top: .5rem;
    text-align: right;
}

.text-control__reset-password a:is(:link, :visited) {
    color: var(--greyColor20);
    text-decoration: underline;
}

.text-control__reset-password a:hover {
    text-decoration: none;
}

.text-control.text-control--agent-office::before {
    background-image: url("/frontend/assets/Shared/Component/TextControl/Images/AgentOffice-7cc10d2cb0.svg");
}

.text-control--disabled .text-control__label {
    color: var(--greyColor30);
}

.text-control--disabled .text-control__control {
    opacity: 1;
    background-color: var(--greyColor50);
    background-size: 1.5rem;
    background-position: right 1rem center;
    outline: none;
    border: 1px solid var(--greyColor40);
    color: var(--greyColor30);
}

.text-control--disabled .text-control__errors {
    display: none;
}

.text-control.text-control--envelope::before {
    background-image: url("/frontend/assets/Shared/Component/TextControl/Images/Envelope-79aba7f0cd.svg");
}

.text-control--error :is(.text-control__label, .text-control__hint) {
    color: var(--redColor);
}

.text-control--error .text-control__control {
    border-color: var(--redColor);
    background-image: url("/frontend/assets/Shared/Component/TextControl/Images/Error-15e667c75b.svg");
    background-repeat: no-repeat;
    background-size: 1.5rem;
    background-position: right 1rem top 1rem;
}

.text-control--error .text-control__control-wrapper :is(span, button) {
    border-color: var(--redColor);
}

.text-control.text-control--icon::before {
    left: 1rem;
    top: 1rem;
    width: 1.5rem;
    height: 1.5rem;
    content: '';
    display: block;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    z-index: 1;
    position: absolute;
}

.text-control--icon .text-control__control {
    padding-left: 3.5rem;
}

.text-control--icon .text-control__label {
    left: 3.5rem;
    width: calc(100% - 3.5rem);
}

.text-control--icon.text-control--readonly::before {
    left: 0;
}

.text-control--icon.text-control--readonly .text-control__control {
    padding-left: 2.5rem;
}

.text-control--icon.text-control--readonly .text-control__label {
    left: 2.5rem;
}

.text-control--has-focus .text-control__label {
    transform: scale(.75) translateY(-50%);
}

.text-control--has-prefix .text-control__label {
    left: 4.5rem;
    width: calc(100% - 4.5rem);
}

.text-control--multiline .text-control__control {
    height: 12.5rem;
}

.text-control--multiline .text-control__control:not(:first-child) {
    border-bottom-left-radius: var(--borderRadius);
    border-top-left-radius: var(--borderRadius);
}

.text-control--multiline.text-control--narrow .text-control__control {
    height: 8rem;
}

.text-control--readonly .text-control__control-wrapper {
    box-shadow: none;
    border-bottom: 1px solid var(--greyColor40);
}

.text-control--readonly .text-control__control {
    border: 0;
    cursor: not-allowed;
    padding-left: 0;
}

.text-control--readonly .text-control__label {
    left: 0;
}

.text-control--valid .text-control__control {
    background-image: url("/frontend/assets/Shared/Component/TextControl/Images/Valid-301bf46af7.svg");
    background-repeat: no-repeat;
    background-size: 1.5rem;
    background-position: right 1rem top 1rem;
}

.text-control--valid .text-control__errors {
    display: none;
}

.text-control--phone-number-control {
    margin-bottom: 0;
}

.text-control--phone-number-control .text-control__control {
    padding: 1.125rem 3.5rem 1.125rem 1rem;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.text-control__reset-password a:is(:link, :visited) {
    color: var(--primaryColorDark);
}
