.custom-header {
  width: 100%;
  height: 56px;
  position: fixed;
  left: 0;
  display: flex;
  align-items: center;
  z-index: 9;
  box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12);
}

.custom-header::before {
  content: '';
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-color: #000000;
}

.custom-header-placeholder {
  height: 56px;
}

.custom-header__logo,
.custom-header__logo img {
  display: block;
  height: var(--logo-height);
}

.custom-header__logo {
  padding: 0 24px;
}

.custom-header__buttons {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
}

[dir] .custom-header__buttons .btn {
  align-self: center;
  margin-right: 8px;
}

@media (max-width: 580px) {
  [dir] .custom-header__buttons .btn {
    display: none;
  }
}

.js-menu-item {
  display: block;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.custom-header__search-button {
  padding: 8px;
  transition: all .3s ease-in-out;
}

.custom-header__search-button svg {
  width: 28px;
  height: 40px;
  fill: #fff;
  transition: all .3s ease-in-out;
}

[data-toggle="search"] .custom-header__search-button {
  background-color: #fff;
}

[data-toggle="search"] .custom-header__search-button svg {
  fill: #000;
}

.custom-header__burger-button {
  width: 52px;
  transition: all .3s ease-in-out;
}

.custom-header__burger-button div {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  position: absolute;
  left: calc(50% - 10px);
  transition: all .3s ease-in-out;
  background-color: #fff;
  border-radius: 2px;
}

.custom-header__burger-button div:nth-child(1) {
  top: 18px;
}

.custom-header__burger-button div:nth-child(2) {
  top: calc(50% - 1px);
}

.custom-header__burger-button div:nth-child(3) {
  bottom: 18px;
}

[data-toggle="menu"] .custom-header__burger-button {
  background-color: #fff;
}

[data-toggle="menu"] .custom-header__burger-button div:nth-child(2) {
  opacity: 0;
}

[data-toggle="menu"] .custom-header__burger-button div:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
  background-color: #000;
}

[data-toggle="menu"] .custom-header__burger-button div:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
  background-color: #000;
}

.custom-header .js-menu-item span {
  content: '';
  display: block;
  width: 300%;
  padding-bottom: 300%;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, .25);
  position: absolute;
  z-index: -1;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  transition: transform 0s ease-out .3s, opacity .5s ease-in-out;
}

.custom-header .js-menu-item.is-mouse-down span {
  transition: transform .7s ease-out, opacity .3s ease-in-out;
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.custom-header__search {
  position: absolute;
  z-index: -2;
  top: 0;
  left: 0;
  width: 100%;
  height: 132px;
  padding: 72px 68px 16px;
  transition: all .3s ease-in-out;
  transform: translateY(-100%);
}

.custom-header__search::before {
  content: '';
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-color: #fff;
  box-shadow: rgba(0, 0, 0, 0.2) 0px 8px 10px -5px, rgba(0, 0, 0, 0.14) 0px 16px 24px 2px, rgba(0, 0, 0, 0.12) 0px 6px 30px 5px;
}

html[dir] .custom-header__search form {
  display: block;
  max-width: 1044px;
  margin: 0 auto;
  position: relative;
}

html[dir] .custom-header__search input[type="search"] {
  display: block;
  height: 44px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 50px;
  font-size: 16px;
}

input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
}

html[dir] .custom-header__search input[type="submit"] {
  display: block;
  width: 24px;
  height: 24px;
  padding: 0;
  overflow: hidden;
  font-size: 0;
  color: transparent;
  border: none;
  background: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M15.5 14H14.71L14.43 13.73C15.41 12.59 16 11.11 16 9.5C16 5.91 13.09 3 9.5 3C5.91 3 3 5.91 3 9.5C3 13.09 5.91 16 9.5 16C11.11 16 12.59 15.41 13.73 14.43L14 14.71V15.5L19 20.49L20.49 19L15.5 14ZM9.5 14C7.01 14 5 11.99 5 9.5C5 7.01 7.01 5 9.5 5C11.99 5 14 7.01 14 9.5C14 11.99 11.99 14 9.5 14Z' fill='%236e6e6e'/%3E%3C/svg%3E%0A") no-repeat center;
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  border-radius: 50%;
}

html[dir] .custom-header__search input[type="submit"]:hover,
html[dir] .custom-header__search input[type="submit"]:focus,
html[dir] .custom-header__search input[type="submit"]:active {
  background-color: rgba(0, 0, 0, 0.04);
}

.custom-header__hc-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -3;
  background-color: rgba(0, 0, 0, 0.5);
  transition: all .3s ease-in-out;
  opacity: 0;
  visibility: hidden;
}

[data-toggle="search"] .custom-header__hc-bg,
[data-toggle="menu"] .custom-header__hc-bg {
  opacity: 1;
  visibility: visible;
}

[data-toggle="search"] .custom-header__search {
  transform: translateY(0);
}

@media (min-width: 900px) {
  .custom-header__menu ul {
    display: flex;
    margin: 0;
    padding: 0;
  }

  .custom-header__menu ul li {
    list-style: none;
    display: block;
    margin: 0;
    padding: 0;
    overflow: hidden;
  }

  .custom-header__menu ul li a {
    display: block;
    height: 56px;
    line-height: var(--logo-height);
    font-weight: 700;
    color: #fff;
    padding: 8px 16px;
    position: relative;
    z-index: 2;
    overflow: hidden;
  }

  .custom-header__burger-button {
    display: none;
  }
}

@media (max-width: 899px) {
  .custom-header__menu nav {
    display: block;
    width: 320px;
    height: calc(100vh - 56px);
    box-shadow: 0 0 0 0;
    position: absolute;
    top: 56px;
    right: 0;
    background-color: #fff;
    z-index: 2;
    transition: all .3s ease-in-out;
    transform: translateX(100%);
  }

  [data-toggle="menu"] .custom-header__menu nav {
    transform: translateX(0);
    box-shadow: rgba(0, 0, 0, 0.2) 0px 8px 10px -5px, rgba(0, 0, 0, 0.14) 0px 16px 24px 2px, rgba(0, 0, 0, 0.12) 0px 6px 30px 5px;
  }

  .custom-header__menu ul {
    display: block;
    margin: 0;
    padding: 16px 0;
  }

  .custom-header__menu ul li {
    display: block;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .custom-header__menu ul li a {
    display: block;
    padding: 16px;
    line-height: 24px;
    font-weight: bold;
    color: var(--primary-text-color);
    position: relative;
  }

  .custom-header__menu ul li a:hover {
    background-color: rgba(0, 0, 0, 0.04);
  }

  .custom-header__menu ul li a.js-menu-item span {
    background-color: rgba(0, 0, 0, 0.2);
  }

  .custom-header__search {
    padding-right: 24px;
    padding-left: 24px;
  }
}

@media (max-width: 767px) {
  .custom-header__search {
    padding-right: 16px;
    padding-left: 16px;
  }
}
