/* --- WP Block Header
-------------------------------------------------------- */

.search-controller svg {
  width: 25px;
  height: 25px;
}

.without-transparent:after {
  display: none;
}

.header {
  margin-inline: 10px;
  position: relative;
  padding-bottom: 10px;
  padding-top: 10px;

  &:after {
    content: "";
    position: absolute;
    bottom: 0;
    height: 1px;
    background: var(--wp--preset--color--foreground);
    width: 100%;
    opacity: 0.2;
  }

  >.wp-block-group {
    padding-inline: 0;
  }
}

header.block-editor-block-list__block:has(.transparent-header) {
  position: absolute !important;
  width: 100%;
  z-index: 999;
  min-height: 120px;
}

.wp-block-navigation-item__content {
  font-size: var(--wp--preset--font-size--upper-heading);
}

.transparent-header {
  left: 0;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: 2;
}

.search-toggle,
.show-search,
.open-search {
  .header-with-banner.transparent-header {
    z-index: auto;
  }
}

.wp-block-rock-tune-header-social .social-container {
  border-radius: 45px;
  -webkit-border-radius: 45px;
  -moz-border-radius: 45px;
}

.wp-block-rock-tune-header-social .social-container {
  position: absolute;
  right: 0;
  top: auto;
}

.header .right-section .wp-block-rock-tune-header-search {
  display: none;
}

.wp-mobile-icon-menu .wp-block-rock-tune-header-search {
  display: block;
}

.wp-block-rock-tune-header-social {
  button {
    transition: 0.3s ease-in-out;
  }

  .social-container {
    background-color: transparent;
    left: 50%;
    padding: 0;
    transform: translateX(-50%);
    -moz-transform: translateX(-50%);
    -webkit-transform: translateX(-50%);
    width: 100%;
  }
}

.wp-block-rock-tune-header-social {
  .social-container {
    border: 1px solid;
    display: block;
    padding: 10px;

    .wp-block-social-links {
      border-radius: 45px;
      padding: 15px;
    }
  }
}

.wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
  display: none;
}

html.has-modal-open {
  overflow: auto;
}

.nav-row>.wp-block-group {
  gap: 0;
}

.wp-block-group.nav-row {
  gap: 0;
}

.wp-block-rock-tune-header-social .wp-block-group.social-container {
  margin-top: 20px;
}

.wp-block-group.site-title-section {
  gap: 0;
  align-items: center;
  text-align: center;
}

.wp-block-navigation__container>.wp-block-navigation-item,
.wp-block-page-list>.wp-block-navigation-item {
  a {
    position: relative;
  }
}

.nav-row .wp-block-social-links:not(.is-style-logos-only):not(.is-style-pill-shape):not(.is-style-circle-only) .wp-block-social-link .wp-block-social-link-anchor {

  &:hover,
  &:focus {
    svg {
      fill: var(--wp--preset--color--foreground);
    }
  }
}

.wp-block-social-links.is-style-circle-shape,
.wp-block-social-links.is-style-pill-shape {
  svg {
    fill: var(--wp--preset--color--foreground);
  }
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container li .wp-block-navigation-item__content {
  padding: 7px 13px;
  font-size: var(--wp--preset--font-size--medium);

  a {
    font-size: var(--wp--preset--font-size--medium);
  }
}

.wp-block-rock-tune-header-search .search-controller {
  height: 42px;
  width: 42px;
}

.wp-block-navigation__responsive-container-open:not(.always-shown) {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
}

.wp-block-navigation__responsive-container-open:not(.always-shown) {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  position: relative;
  box-sizing: border-box;
  padding: 9px;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-container {
  padding-bottom: 10px;
}

[class*="wp-container-"].site-section {
  gap: 10px;
  @include flex;
}

.header .wp-block-social-links .wp-social-link a,
.header .wp-block-social-links .wp-social-link .wp-block-social-link-anchor {
  padding: 9px;
}

.wp-block-navigation .wp-block-navigation__submenu-icon svg {
  margin: 0;
}

.is-menu-open.has-modal-open::-webkit-scrollbar {
  display: none;
}

.admin-bar .search-container {
  margin-top: 46px;
}

.admin-bar .transparent-header {
  top: 46px;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .has-child .wp-block-navigation__submenu-container {
  padding-right: 0;
  padding-left: 10px;
  padding-top: 0;
}

.header .wp-block-navigation .wp-block-navigation__container>li>.wp-block-navigation-item__content,
.header .wp-block-navigation .wp-block-page-list>li>.wp-block-navigation-item__content,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation-item__content {
  padding: 10px 5px;
}

.header ul.wp-block-navigation__container {
  justify-content: flex-start;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__container {
  gap: 0.5rem;
}

.header>.wp-block-group {
  @include flex;

  .nav-row {
    width: 25%;
  }

  .site-section {
    width: 50%;
  }

  .right-section {
    gap: 0;
    width: 25%;
  }
}

.wp-block-group:not(.transparent-header) .header {
  .wp-block-navigation__responsive-container-open {

    &:hover,
    &:focus {
      svg {
        fill: var(--wp--preset--color--hover-color);
      }
    }

    svg {
      fill: var(--wp--preset--color--color-light);
    }
  }
}

.without-transparent {
  .default-header.wp-block-group {
    @include flex;

    .site-section,
    .nav-row {
      width: auto;
    }
  }
}

.header {
  .site-title-section .wp-block-site-tagline {
    margin-block-start: 0;
  }

  .search-product {
    .wp-block-search__label {
      display: none;
    }
  }
}

.header .search-product {
  .wp-block-search__label {
    color: var(--wp--preset--color--color-light);
  }
}

.wp-block-group .cart-row {
  .cart-text {
    color: var(--wp--preset--color--color-light);
  }
}

.wp-block-group .cart-row {

  &:hover,
  &:focus {

    .cart-text,
    svg {
      color: var(--wp--preset--color--hover-color);
      fill: var(--wp--preset--color--hover-color);
    }
  }
}

.transparent-header .wp-block-group .cart-row {

  &:hover,
  &:focus {

    .cart-text,
    svg {
      color: var(--wp--preset--color--hover-color);
      fill: var(--wp--preset--color--hover-color);
    }
  }
}

.wp-block-group .cart-row {
  gap: 0;

  .cart-text {
    @include transition(0.5s ease-in-out);
    display: none;
    pointer-events: none;
  }
}

.wp-block-group .cart-row,
.wp-block-search__label,
.cart-text {
  @include transition(0.5s ease-in-out);
}

.without-transparent {
  .wp-block-button .wp-block-button__link {
    color: var(--wp--preset--color--dark-color);
  }
}

.header .dummy-icon {

  &:hover,
  &:focus {

    .wp-block-search__button svg,
    .wp-block-search__label {
      color: var(--wp--preset--color--hover-color);
    }
  }
}

.wp-block-woocommerce-customer-account a .icon+.label:empty {
  margin: 0;
}

.wp-block-woocommerce-customer-account {
  padding: 0;

  a,
  span {
    font-weight: var(--wp--custom--typography--font-weight--medium);
    font-size: var(--wp--preset--font-size--extra-small);
    @include transition(0.5s ease-in-out);

    &:hover,
    &:focus {
      text-decoration: none !important;
    }
  }

  &:hover,
  &:focus {

    a,
    span,
    svg {
      color: var(--wp--preset--color--hover-color);
    }
  }
}

.woocommerce-account {
  .wp-block-woocommerce-customer-account {

    a,
    span,
    svg {
      color: var(--wp--preset--color--hover-color);
    }
  }
}

.woocommerce-cart {
  .wp-block-group .cart-row .cart-text {
    display: none;
  }
}

.wp-block-navigation .has-child:not(.open-on-click):hover>.wp-block-navigation__submenu-container {
  min-width: 250px;
}

.wp-block-woocommerce-customer-account a {
  padding: 6px;
}

.header .dummy-icon .wp-block-search__inside-wrapper .wp-block-search__button {
  padding: 6px;
}

.wp-block-woocommerce-customer-account a .icon {
  width: 30px;
}

.header {

  .dummy-icon .wp-block-search__inside-wrapper .wp-block-search__button,
  .wp-block-woocommerce-customer-account {
    display: none;
  }
}

.dummy-icon .wp-block-search__inside-wrapper .wp-block-search__button {
  &:is(:hover, :focus) {
    border-color: transparent;
  }
}

.wp-block-navigation__responsive-container .wp-block-navigation__responsive-container-content {
  row-gap: 0;
}

body.error404 .transparent-header {
  position: relative;
  top: auto;

  .header {
    margin: 0;
  }
}

.wp-block-navigation__responsive-container-close {
  right: auto;
  left: 0;
}

.wp-block-navigation .wp-block-navigation-item.has-child .wp-block-navigation__submenu-container,
.wp-block-navigation .wp-block-navigation__container .wp-block-navigation-item.has-child .wp-block-navigation__submenu-container,
.wp-block-navigation ul .wp-block-navigation-item.has-child .wp-block-navigation__submenu-container .wp-block-navigation .wp-block-navigation__container .wp-block-navigation-item.has-child .wp-block-navigation__submenu-container {
  border-top: 2px solid var(--wp--preset--color--hover-color);
  min-width: 250px;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container.wp-block-navigation__submenu-container.wp-block-navigation__submenu-container.wp-block-navigation__submenu-container {
  border-top: 0;
}

.modern-header {

  .wp-block-navigation .wp-block-navigation-item.has-child .wp-block-navigation__submenu-container,
  .wp-block-navigation .wp-block-navigation__container .wp-block-navigation-item.has-child .wp-block-navigation__submenu-container,
  .wp-block-navigation ul .wp-block-navigation-item.has-child .wp-block-navigation__submenu-container .wp-block-navigation .wp-block-navigation__container .wp-block-navigation-item.has-child .wp-block-navigation__submenu-container {
    opacity: 1;
    visibility: visible;
    @include transform(none);
  }

  .wp-block-navigation .wp-block-navigation-item.has-child .wp-block-navigation__submenu-container li,
  .wp-block-navigation .wp-block-navigation__container .wp-block-navigation-item.has-child .wp-block-navigation__submenu-container li,
  .wp-block-navigation ul .wp-block-navigation-item.has-child .wp-block-navigation__submenu-container .wp-block-navigation .wp-block-navigation__container .wp-block-navigation-item.has-child .wp-block-navigation__submenu-container li,
  .wp-block-navigation ul li.wp-block-navigation-item.has-child:hover ul.wp-block-navigation__submenu-container li,
  .wp-block-navigation ul li.wp-block-navigation-item.has-child:focus ul.wp-block-navigation__submenu-container li {
    opacity: 1;
    @include transform(none);
    visibility: visible;
  }
}

.wp-block-navigation ul li.wp-block-navigation-item.has-child,
.wp-block-navigation ul li.wp-block-navigation-item.has-child {

  &:hover,
  &:focus {
    ul.wp-block-navigation__submenu-container {
      @include transform(translateY(0));
      opacity: 1;

      li {
        @include transform(translateY(0px));
        opacity: 1;
      }
    }
  }
}

.wp-block-footer .wp-block-navigation .has-child :where(.wp-block-navigation__submenu-container) {
  bottom: 100%;
  top: unset;
}

.header .wp-primary-search {
  display: none;
}

.wp-mobile-icon-menu .wp-primary-search {
  .wp-search-toggle-container {
    height: 100%;
    @include flex;
    justify-content: center;
    align-items: center;

    &:is(:hover, :focus) {
      .wp-search-toggle {
        background-color: var(--wp--preset--color--dark-color);
      }
    }
  }

  &.toggled-on {
    .wp-search-toggle {
      background-color: var(--wp--preset--color--dark-color);
    }
  }
}

/* Primary Search */
.wp-primary-search {
  .wp-search-toggle-container {
    padding: 10px 8.5px;
    display: inline-block;
    cursor: pointer;
    line-height: 1;
    position: relative;
    z-index: 2;

    .wp-search-toggle {
      width: 25px;
      height: 22px;
      display: inline-block;
      -webkit-mask: url(assets/images/search.svg) no-repeat 50% 50%;
      mask-size: auto;
      mask: url(assets/images/search.svg) no-repeat 50% 50%;
      mask-size: auto;
      -webkit-mask-size: cover;
      mask-size: cover;
      background-color: var(--wp--preset--color--color-light);
      text-indent: -9999px;
      @include transition(0.2s ease-in-out);
    }

    &:is(:hover, :focus) {
      .wp-search-toggle {
        background-color: var(--wp--preset--color--hover-color);
      }
    }
  }

  &.toggled-on {
    .wp-search-toggle {
      -webkit-mask: url(assets/images/close.svg) no-repeat 50% 50%;
      mask-size: auto;
      mask: url(assets/images/close.svg) no-repeat 50% 50%;
      mask-size: auto;
      -webkit-mask-size: cover;
      mask-size: cover;
    }
  }
}

@media screen and (min-width: 640px) {
  .wp-primary-search {
    position: relative;
  }
}

.wc-block-mini-cart__button {
  &:is(:hover, :focus) {
    svg.wc-block-mini-cart__icon {
      color: var(--wp--preset--color--hover-color);
    }
  }
}