.custom-field {
    position: relative;
    font-size: 15px;
    border-top: 20px solid transparent;
    margin-bottom: 5px;
    display: inline-block;
    --field-padding: 12px;
}

.custom-field input {
    border: none;
    -webkit-appearance: none;
    -ms-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: #f2f2f2;
    padding: var(--field-padding);
    border-radius: 3px;
    width: 250px;
    outline: none;
    font-size: 14px;
}

.custom-field .placeholder {
    position: absolute;
    left: var(--field-padding);
    width: calc(100% - (var(--field-padding) * 2));
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    top: 22px;
    line-height: 100%;
    transform: translateY(-50%);
    color: #000000;
    font-weight: 400;
    transition: top 0.3s ease, color 0.3s ease, font-size 0.3s ease;
}

.placeholder {
    display: inline-block;
    min-height: 1em;
    vertical-align: middle;
    cursor: wait;
    background-color: transparent;
    opacity: 1;
    font-style: normal;
    font-weight: 400;
    font-size: 15px;
    color: #000000;
}

.custom-field input.dirty + .placeholder,
.custom-field input:focus + .placeholder,
.custom-field input:not(:placeholder-shown) + .placeholder {
    top: -10px;
    font-size: 15px;
    color: #000000;
}

.custom-field.three {
    --draw-duration: 0.1s;
    --draw-color: #B3D600;
    --draw-line-width: 2px;
    --draw-easing: linear;
}

.custom-field.three .border {
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    transform: none;
    display: flex;
    align-items: center;
    padding-left: 12px;
    border-radius: 10px;
}

.custom-field.three .border::after,
.custom-field.three .border::before {
    content: "";
    width: 0;
    height: 0;
    display: inline-block;
    position: absolute;
    border-radius: 3px;
}

.custom-field.three .border::before {
    left: 0;
    bottom: 0;
    border-right: 0px solid var(--draw-color);
    border-bottom: 0px solid var(--draw-color);
    transition: border 0s linear calc(var(--draw-duration) * 4),
        height var(--draw-duration) var(--draw-easing)
            calc(var(--draw-duration) * 2),
        width var(--draw-duration) var(--draw-easing)
            calc(var(--draw-duration) * 3);
}

.custom-field.three .border::after {
    right: 0;
    top: 0;
    border-left: 0px solid var(--draw-color);
    border-top: 0px solid var(--draw-color);
    transition: border 0s linear calc(var(--draw-duration) * 2),
        height var(--draw-duration) var(--draw-easing),
        width var(--draw-duration) var(--draw-easing) var(--draw-duration);
}

.custom-field.three input:focus ~ .border::before,
.custom-field.three input:not(:placeholder-shown) ~ .border::before,
.custom-field.three input.dirty ~ .border::before,
.custom-field.three input:focus ~ .border::after,
.custom-field.three input:not(:placeholder-shown) ~ .border::after,
.custom-field.three input.dirty ~ .border::after {
    width: 100%;
    height: 100%;
    border-width: var(--draw-line-width);
}

.custom-field.three input:not(:placeholder-shown) ~ .border::before,
.custom-field.three input.dirty ~ .border::before,
.custom-field.three input:focus ~ .border::before {
    transition-delay: 0s, var(--draw-duration), 0s;
}

.custom-field.three input:not(:placeholder-shown) ~ .border::after,
.custom-field.three input.dirty ~ .border::after,
.custom-field.three input:focus ~ .border::after {
    transition-delay: calc(var(--draw-duration) * 2),
        calc(var(--draw-duration) * 3), calc(var(--draw-duration) * 2);
}
