/* https://codepen.io/menelaosly/pen/rZddyb */

form {
    position: relative;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 1s;
    width: 50px;
    height: 50px;
    background: white;
    box-sizing: border-box;
    border-radius: 25px;
    border: 4px solid white;
    padding: 5px;
}

input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 42.5px;
    line-height: 30px;
    outline: 0;
    border: 0;
    display: none;
    font-size: 1em;
    border-radius: 20px;
    padding: 0 20px;
}

.fa {
    box-sizing: border-box;
    padding: 10px;
    width: 42.5px;
    height: 42.5px;
    position: absolute;
    top: 0;
    right: 0;
    border-radius: 50%;
    color: #07051a;
    text-align: center;
    font-size: 1.2em;
    transition: all 1s;
}

form:hover, form:focus, form:active{
    width: 200px;
    cursor: pointer;
}

form:hover input, form:focus input, form:active input{
    display: block;
}

form:hover .fa, form:focus .fa, form:active .fa {
    background: #07051a;
    color: white;
}


@media (pointer:none), (pointer:coarse) {
    form{
        width: 200px;
        cursor: pointer;
    }
    
    form input{
        display: block;
    }
    
    form .fa {
        background: #07051a;
        color: white;
    }
}