/* --- Mobile Sticky Icon Menus
-------------------------------------------------------- */
.wp-mobile-icon-menu {
  background-color: var(--wp--preset--color--secondary-bg-color);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  bottom: 0;
  left: 0;
  padding: 0;
  position: fixed;
  @include transition(0.5s ease-in-out);
  width: 100%;
  z-index: 99;

  .wp-block-columns {
    gap: 0;

    .wp-block-column {
      flex-basis: 25% !important;
      height: 55px;

      > * {
        height: 100%;
      }

      .stat-block {
        height: 100%;

        .wp-block-button {
          position: relative;

          &.wp-home-button::before {
            position: absolute;
            width: 20px;
            height: 20px;
            left: 50%;
            top: 50%;
            pointer-events: none;
            -webkit-transform: translate(-50%, -50%);
            -ms-transform: translate(-50%, -50%);
            transform: translate(-50%, -50%);
            transition: all 0.4s;
            background: url(./assets/images/home-icon.svg) no-repeat center
              center;
            background-size: 100%;
            content: "";
          }
        }

        .wp-element-button {
          border: 0;
          background-color: transparent;
          margin: 0;
          text-indent: -9999px;

          &:is(:focus, :hover) {
            background-color: transparent;
          }

          &::after {
            display: none;
          }
        }

        * {
          height: 100%;
          width: 100%;

          .wc-block-mini-cart__quantity-badge {
            justify-content: center;

            .wc-block-mini-cart__badge {
              background-color: var(--wp--preset--color--foreground);
              color: var(--wp--preset--color--color-light);
              height: 20px;
              min-width: 20px;
            }
          }

          .wc-block-mini-cart__badge {
            width: auto;
          }

          svg {
            width: 22px;
            height: 22px;
          }
        }
      }

      a,
      button:not([type="submit"]) {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100%;
      }
    }
  }
}

/** sticky search for mobile  **/

.wp-block-post-content .wp-mobile-icon-menu {
  position: relative !important;
  bottom: auto !important;
}

.wp-mobile-icon-menu .wp-block-search .wp-block-search__label {
  text-transform: none;
  font-weight: var(--wp--custom--typography--font-weight--medium);
  font-size: 16px;
}

.wp-mobile-icon-menu .dummy-icon .wp-block-search__button:after {
  height: 100%;
  left: auto;
  line-height: 1;
  position: relative;
  right: auto;
}

.wp-mobile-icon-menu .wp-block-search__inside-wrapper {
  height: 100%;
}

.show-search,
.open-search {
  overflow-y: hidden;
}

.wp-mobile-icon-menu .wp-block-rock-tune-header-search .search-container {
  padding-left: 20px;
  padding-right: 20px;
}

.wp-mobile-icon-menu .wp-block-search__input {
  background-color: var(--wp--preset--color--background);
  border: 1px solid var(--wp--preset--color--foreground);
  @include border(0);
}

.wp-mobile-icon-menu
  .wp-block-search
  button.wp-block-search__button:not([type="submit"]) {
  @include border(0);
  font-size: var(--wp--preset--font-size--small);
  font-weight: var(--wp--custom--typography--font-weight--bold);
  line-height: var(--wp--custom--typography--line-height--paragraph);
  text-transform: uppercase;
}

.wp-block-post-content .wp-mobile-icon-menu .search-container {
  position: relative;
  top: auto;
  height: auto;
  left: 0;
  padding-top: 0px;
  margin-top: 20px;
}

.wp-block-post-content
  .wp-mobile-icon-menu
  .search-container
  .wp-block-search__button {
  margin-left: 1px;
  width: 100%;
  text-align: center;
  @include border(0);
  background-color: var(--wp--preset--color--foreground);
}

.wp-mobile-icon-menu .wp-block-woocommerce-customer-account .label {
  display: none;
}

.wp-mobile-icon-menu
  .wp-block-columns
  .wp-block-column
  .stat-block
  .wp-block-woocommerce-customer-account
  a {
  padding: 0;
}

.wp-mobile-icon-menu
  .wp-block-columns
  .wp-block-column
  .stat-block
  .wp-block-woocommerce-customer-account
  svg {
  width: 28px;
  height: 38px;
}

.cart-block {
  display: flex;
  align-items: center;
  justify-content: center;
}

.wc-block-mini-cart__button .wc-block-mini-cart__icon {
  font-size: 19px;
}

.search-toggle .wp-mobile-icon-menu .dummy-icon .wp-block-search__button:after {
  color: var(--wp--preset--color--dark-color);
}

.wp-mobile-icon-menu {
  .wp-block-column {
    @include transition(0.5s ease-in-out);

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

      .wp-home-button {
        &:before {
          filter: invert(1);
        }
      }

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

  .wp-block-column:not(:last-child) {
    border-right: 1px solid var(--wp--preset--color--primary-border-color);
  }

  .wp-block-search {
    padding: 0;

    .wp-block-search__inside-wrapper
      .wp-block-search__button:not([type="submit"]) {
      background-color: transparent;
      color: var(--wp--preset--color--color-light);

      &:is(:hover, :focus) {
        background-color: transparent;
        color: var(--wp--preset--color--dark-color);
        fill: var(--wp--preset--color--dark-color);
      }
    }
  }
}

.wp-block-post-content .wp-mobile-icon-menu {
  z-index: 0;
  transform: none !important;
}
