<button type="button"></button>
var searchBtn = document.querySelector('.main-header__button'),
searchInput = searchBtn.querySelector('.main-header__input'),
menu = document.querySelector('.main-header__menu');
searchBtn.onclick = function(event) {
searchInput.classList.add('main-header__input_active')
searchInput.focus()
this.classList.add('main-header__button_active')
menu.classList.add('hidden')
}
searchInput.onblur = function(event) {
this.classList.remove('main-header__input_active')
this.parentNode.classList.remove('main-header__button_active')
menu.classList.remove('hidden')
}