@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

* {
    box-sizing: border-box;
}

body {
    background-image: linear-gradient(90deg, #6d8ad8, #3e7db8);
    font-family: 'Roboto', sans-serif;
    margin: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.search {
    position: relative;
    height: 50px;
}

.input {
    background-color: #fff;
    border: 0;
    font-size: 18px;
    padding: 15px;
    height: 50px;
    width: 50px;
    /* starting width which will then expand on click */
    transition: width .3s ease;
}

.btn {
    background-color: #fff;
    border: 0;
    cursor: pointer;
    font-size: 24px;
    height: 50px;
    width: 50px;
    position: absolute;
    top: 0;
    left: 0;
    /* starting position which will move to the right on click */
    transition: transform .3s ease;
}

.input:focus,
.btn:focus {
    outline: none;
}

.search.active input {
    width: 200px;
}

.search.active .btn {
    transform: translateX(198px);
}