/*
 * Focused site-wide Divi compatibility presentation.
 *
 * Keep these general Divi helpers separate from ERS component foundations so
 * ordinary front-end requests do not require the full public stylesheet.
 */

@media (max-width: 980px){
  body.ers-divi-mobile-menu-scroll-fix-enabled .et_mobile_menu{
    max-height:var(--ers-divi-mobile-menu-available-height, calc(100dvh - 120px));
    overflow-x:hidden;
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior:contain;
    touch-action:pan-y;
  }
}

/* Standard Divi Menu Module dropdown bullets.
   Scoped by ERS Settings body classes and excludes ERS Mega Menu output.
   Uses a hanging-indent inline bullet so wrapped submenu text aligns under the first text line. */
body.ers-divi-dropdown-bullets-desktop .et_pb_menu .et_pb_menu__menu .et-menu-nav ul.et-menu > li.menu-item-has-children:not(.ers-mega-menu-item) ul.sub-menu li > a,
body.ers-divi-dropdown-bullets-mobile .et_pb_menu .et_mobile_nav_menu .et_mobile_menu > li.menu-item-has-children:not(.ers-mega-menu-item) ul.sub-menu li > a{
  --ers-divi-dropdown-bullet-indent:1.35em;
  --ers-divi-dropdown-bullet-size:5px;
  display:block;
  padding-left:var(--ers-divi-dropdown-bullet-indent);
  text-indent:calc(var(--ers-divi-dropdown-bullet-indent) * -1);
}
body.ers-divi-dropdown-bullets-desktop .et_pb_menu .et_pb_menu__menu .et-menu-nav ul.et-menu > li.menu-item-has-children:not(.ers-mega-menu-item) ul.sub-menu li > a::before,
body.ers-divi-dropdown-bullets-mobile .et_pb_menu .et_mobile_nav_menu .et_mobile_menu > li.menu-item-has-children:not(.ers-mega-menu-item) ul.sub-menu li > a::before{
  background:var(--ers-accent-primary, #9ca3af);
  border-radius:999px;
  content:"";
  display:inline-block;
  height:var(--ers-divi-dropdown-bullet-size);
  margin-right:calc(var(--ers-divi-dropdown-bullet-indent) - var(--ers-divi-dropdown-bullet-size));
  vertical-align:middle;
  width:var(--ers-divi-dropdown-bullet-size);
}

/* ERS external-link icon helper for standard Divi Menu Module dropdown links.
   JS wraps only the final word/token and icon so long labels can wrap while
   the icon stays attached to the final line. Add the ers-external-link class
   to a non-parent WordPress menu item. */
.et_pb_menu .sub-menu li.ers-external-link:not(.menu-item-has-children) > a{
  box-sizing:border-box;
  max-width:100%;
  white-space:normal !important;
}
.et_pb_menu .sub-menu li.ers-external-link:not(.menu-item-has-children) > a::after{
  content:none !important;
  display:none !important;
}
.et_pb_menu .sub-menu li.ers-external-link:not(.menu-item-has-children) > a .ers-external-link-tail{
  white-space:nowrap !important;
}
.et_pb_menu .sub-menu li.ers-external-link:not(.menu-item-has-children) > a .ers-external-link-icon{
  background-image:url("data:image/svg+xml,%3Csvg%20width%3D%2218%22%20height%3D%2218%22%20viewBox%3D%220%200%2018%2018%22%20fill%3D%22none%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%3E%3Crect%20x%3D%223%22%20y%3D%223%22%20width%3D%2212%22%20height%3D%2212%22%20rx%3D%222%22%20fill%3D%22%23231F20%22/%3E%3Cpath%20d%3D%22M7%2011L11%207%22%20stroke%3D%22%23FFFFFF%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22/%3E%3Cpath%20d%3D%22M8%207H11V10%22%20stroke%3D%22%23FFFFFF%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22/%3E%3C/svg%3E") !important;
  background-position:center !important;
  background-repeat:no-repeat !important;
  background-size:18px 18px !important;
  display:inline-block !important;
  height:18px !important;
  margin-left:9px !important;
  vertical-align:-3.5px !important;
  width:18px !important;
}
