@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

* {
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    overflow: hidden;
    margin: 0;
}

h1 {
    margin-bottom: 40px;
}

.user-edit-form {
    width: 300px;
}

.form-group {
    position: relative;
    margin-bottom: 40px;
}

.form-input {
    font-size: 16px;
    line-height: 20px;
    padding: 8px 0;
    max-width: 100%;
    min-width: 0;
    width: 100%;
    background-color: transparent;
    border-style: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.87);
}
.form-input:focus {
    outline: none;
}
.form-input-label {
    position: absolute;
    top: 6px;
    left: 0;
    height: 20px;
    font-size: 16px;
    line-height: 20px;
    color: rgba(0, 0, 0, 0.6);
    pointer-events: none;
    transform-origin: top left;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.5, 1);
}

.form-input:focus + .form-input-label,
.form-group.focused .form-input-label {
    transform: translateY(-18px) scale(0.75);
}

.form-group::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 30%;
    right: 70%;
    background: blue;
    height: 2px;
    opacity: 0;
    transition: left 0.3s cubic-bezier(0.25, 0.8, 0.5, 1),
        right 0.4s cubic-bezier(0.25, 0.8, 0.5, 1), opacity 0.2s cubic-bezier(0.25, 0.8, 0.5, 1);
}

.form-group.focused::after {
    left: 0;
    right: 0;
    opacity: 1;
}

.form-group.has-error .form-input-label {
    color: #ff5252;
}

.form-group.has-error::after {
    background: #ff5252;
}
.form-group.has-error .form-input {
    color: #ff5252;
    border-bottom: 1px solid #ff5252;
}

.form-group--error-container {
    position: absolute;
    color: #ff5252;
    bottom: 0;
    left: 0;
    right: 0;
    transform: translateY(100%);
    font-size: 14px;
    line-height: 20px;
    height: 20px;
    overflow: hidden;
}

.error-message {
    position: absolute;
    transform: translateX(-100%);
    opacity: 0;
    transition: transform 0.4s ease-in-out, opacity 0.4s ease-in-out;
}

.form-group.has-error .error-message {
    transform: translateX(0);
}

.error--requiered .error-message--requiered,
.error--min-length .error-message--min-length,
.error--max-length .error-message--max-length,
.error--email .error-message--email,
.error--point .error-message--point,
.error--check-password .error-message--check-password {
    opacity: 1;
}

.btn {
    align-items: center;
    border-radius: 4px;
    display: inline-flex;
    flex: 0 0 auto;
    font-weight: 500;
    letter-spacing: 0.0892857143em;
    justify-content: center;
    outline: 0;
    position: relative;
    text-decoration: none;
    text-indent: 0.0892857143em;
    text-transform: uppercase;

    vertical-align: middle;
    white-space: nowrap;
    height: 36px;
    min-width: 64px;
    padding: 0 16px;
    color: #fff;
    background-color: #2196f3;
    border-color: #2196f3;
    will-change: box-shadow;
    box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14),
        0 1px 5px 0 rgba(0, 0, 0, 0.12);
    border: none;
    cursor: pointer;
    overflow: hidden;
    transition-duration: 0.28s;
    transition-property: box-shadow, transform, opacity;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:active {
    box-shadow: 0 5px 5px -3px rgb(0 0 0 / 20%), 0 8px 10px 1px rgb(0 0 0 / 14%),
        0 3px 14px 2px rgb(0 0 0 / 12%);
}
.btn::before {
    background-color: #fff;
    bottom: 0;
    content: '';
    left: 0;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    right: 0;
    top: 0;
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.6, 1);
}

.btn:hover::before {
    opacity: 0.1;
}

.ripple {
    position: absolute;
    width: 100px;
    height: 100px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    animation: rippleScale 0.5s ease-in-out;
    pointer-events: none;
}

@keyframes rippleScale {
    to {
        transform: translate(-50%, -50%) scale(3);
        opacity: 0;
    }
}
@keyframes pendulum {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(10deg);
    }
}
