.mobile,
.mob.getstarted,
#block-loyverse8-backsubmenu {
  display: none;
}

.topmenu.mobile .signin a {
  width: 280px;
  height: 53px;
}

#overlay {
  display: none;
  height: 100%;
  left: 0;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 2;
  background-color: black;
  touch-action: none;
  opacity: 0.2;
}


@media screen and (min-width: 992px) {
  .topmenu.mobile, #block-languageswitcher .links {
    display: none;
  }
}

@media screen and (max-width: 991px) {

  /* -------------------------- RESET VALUES --------------------------------- */
  #block-mobilemenu .menu .menu-item:nth-child(-n+22), .hide, #block-loyverse8-getstarted {
    display: none;
  }

  .menu-item.no-style {
    border-bottom: none;
  }

  #block-loyverse8-branding {
    margin-right: 0;
  }

  .region-topmenu {
    height: 100%;
    margin: 0;
  }

  #block-mobilemenu .menu,
  #block-mobilemenujp .menu {
    padding: 0;
    margin: 10px 0 0 0;
  }

  nav#block-mobilemenu {
    margin-bottom: 1.5rem;
  }

  .container.nav-container {
    margin-inline-start: 12px;
    padding: 12px;
  }

  .container.nav-container:has(.closeMobMenu) {
    padding: 0;
  }
  ul.menu {
    margin-left: 0;
  }
  /* -------------------------- END RESET VALUES --------------------------------- */



  .site-branding__logo img {
    content: url("/themes/loyverse8/images/logo-help-mob.svg");
  }

  .mob.getstarted, body.menu-open #overlay {
    display: block;
  }

  .hamburger-lines {
    content: "";
    width: 24px;
    height: 24px;
    cursor: pointer;
    background-image: url("/themes/loyverse8/images/ic-menu-hamburger.svg");
    background-repeat: no-repeat;
  }

  .language-switcher-language-url h4::before {
    margin-inline-end: 12px;
  }

  .menu-open .hamburger-lines.closeMobMenu {
    background-image: url("/themes/loyverse8/images/ic-close-mob-menu.svg");
    background-color: rgba(101, 85, 143, 0.08);
    background-position: center;
    padding: 11px;
    border-radius: 50%;
  }

  body.menu-open {
    overflow: hidden;

    /* iOS Safari fix */
    position: fixed;
    width: 100%;
  }

  .topmenu.mobile {
    display: block;
    position: fixed;
    overflow-y: auto;
    overflow-x: hidden;
    inset: 0;
    width: 100%;
    text-align: start;
    top: 56px;
    background: #fff;
    z-index: 99;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overscroll-behavior: contain;      /* ← stopping "scroll chaining" */
    -webkit-overflow-scrolling: touch; /* ← for old iOS (< 13) */
  }

  .topmenu.mobile a:link,
  .topmenu.mobile a:visited,
  .topmenu.mobile a:focus {
    color: rgba(0, 0, 0, 0.87);
  }
  .topmenu.mobile a.is-active {
    color: #f07f31;
  }

  [dir="rtl"] .topmenu.mobile {
    transform: translateX(-100%);
  }

  .topmenu.mobile.open {
    transform: translateX(0);
  }

  #block-mobilemenu .menu > li > a,
  #block-mobilemenujp .menu > li > a {
    display: flex;
    padding: 12px 0;
    font-size: 0.875rem;
  }



  /* -------------------------- LANGUAGE SWITCHER --------------------------------- */
  .topmenu .language-switcher-language-url h4 {
    font-size: 0.875rem;
  }
  .language-switcher-language-url h4::after {
    content: "";
    width: 24px;
    height: 24px;
    cursor: pointer;
    position: absolute;
    right: 0;
    /*margin-inline-end: 1rem;*/
    background-image: url("/themes/loyverse8/images/ic-arrow-shevron.svg");
    background-repeat: no-repeat;
  }
  /* -------------------------- END LANGUAGE SWITCHER --------------------------------- */

  /* -------------------------- COMMUNITY --------------------------------- */
  .topmenu #block-community-2 .menu-item a {
    display: flex;
    padding: 12px 0;
    font-size: 0.875rem;
  }
  .topmenu #block-loyversecommoby {
    padding: 12px 0;
    font-size: 0.875rem;
  }
  /* -------------------------- END COMMUNITY --------------------------------- */

  /* -------------------------- MOBILE SUBMENU --------------------------------- */
  /* -------------------------- default state --------------------------------- */
  .language-switcher-language-url .links.mobile-submenu {
    position: fixed;
    inset: 0;
    /*top: 0;*/
    /*left: 0;*/
    opacity: 0;
    padding-top: 20px;
    z-index: 999;
    background-color: #fff;
    width: 100%;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .topmenu .language-switcher-language-url .links > li > a {
    padding: 12px 24px;
    font-size: 0.875rem;
  }



  .topmenu.mobile .menu,
  .topmenu.mobile #block-community-2 .menu,
  .topmenu.mobile #block-loyversecommoby,
  .topmenu.mobile #block-signin-2,
  .topmenu.mobile #block-languageswitcher h4 {
    transform: translateX(0%);
    opacity: 1;
  }

  .topmenu .language-switcher-language-url .links > li > a.lang-disabled {
    color: black;
    cursor: not-allowed;
    opacity: 38%;
    text-decoration: none;
    pointer-events: none;
  }

  /* -------------------------- END default state --------------------------------- */

  #block-loyverse8-backsubmenu.active {
    display: flex;
  }
  .back-submenu {
    display: flex;
    color: rgba(0, 0, 0, 0.87);
  }
  .back-submenu::before {
    content: "";
    width: 24px;
    height: 24px;
    cursor: pointer;
    padding-inline-end: 5px;
    background-image: url("/themes/loyverse8/images/ic-back-submenu.svg");
    background-repeat: no-repeat;
  }
  #block-loyverse8-branding {
    margin-right: 0;
    margin-inline-start: 0;
  }




  /* -------------------------- active state --------------------------------- */
  .language-switcher-language-url .links.mobile-submenu.active {
    opacity: 1;
    transform: translateX(0%);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }



  /* push main menu out */
  /*.topmenu.mobile:has(.mobile-submenu.active),*/
  .topmenu.mobile:has(.mobile-submenu.active) .menu,
  .topmenu.mobile:has(.mobile-submenu.active) #block-community-2 .menu,
  .topmenu.mobile:has(.mobile-submenu.active) #block-loyversecommoby,
  .topmenu.mobile:has(.mobile-submenu.active) #block-signin-2,
  .topmenu.mobile:has(.mobile-submenu.active) #block-languageswitcher h4 {
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    /*transform: translateX(100%);*/
    /*opacity: 1;*/
    pointer-events: none;
  }

  /*.topmenu.mobile:has(.mobile-submenu.active) nav#block-mobilemenu {*/
  /*  margin-bottom: 0;*/
  /*}*/


  /* -------------------------- end active state --------------------------------- */



  /* -------------------------- rtl support --------------------------------- */
  [dir="rtl"] .mobile-submenu {
    transform: translateX(-100%);
  }

  [dir="rtl"] .language-switcher-language-url h4::after {
    left: 0;
    right: unset;
    background-image: url("/themes/loyverse8/images/ic-arrow-shevron-ar.svg");
  }

  [dir="rtl"] .back-submenu::before {
    background-image: url("/themes/loyverse8/images/ic-back-submenu-ar.svg");
  }

  [dir="rtl"] .mobile .menu.hidden {
    transform: translateX(100%);
  }
  /* -------------------------- end rtl support --------------------------------- */

  /* -------------------------- END MOBILE SUBMENU --------------------------------- */

  /* -------------------------- SIGN IN / SIGN UP BUTTONS --------------------------------- */
  #block-signin-2 .clearfix {
    display: flex;
  }

  #block-signin-2 .mob.signin,
  #block-signin-2 .mob.getstarted {
    display: flex;
    padding: 19px 70px;
    justify-content: center;
    align-items: center;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 8px;
    width: 120px;
  }

  #block-signin-2 .mob.signin {
    border: 1px solid #EE6002;
    background: #FFF;
    color: #EE6002;
    margin-inline-end: 1.5rem;
  }

  #block-signin-2 .mob.getstarted {
    background: #EE6002;
    color: #FFF;
  }


  [dir="rtl"] #block-signin-2 {
    display: flex;
  }


  #block-signin-2 p {
    margin: 0;
    padding: 0;
    font-weight: bold;
  }

  /* -------------------------- END SIGN IN / SIGN UP BUTTONS --------------------------------- */


}

@media screen and (max-width: 600px) {
  #block-signin-2 .mob.signin,
  #block-signin-2 .mob.getstarted {
    width: auto;
  }
  #block-signin-2 .clearfix {
    flex-direction: column;
    width: auto;
  }

  #block-signin-2 .mob.signin {
    margin-inline-end: 0;
  }
}
