/* EF Divi 5 Mobile Menu PRO v3.1.2 - submenu compatibility fix */

@media (max-width: 980px) {
  html.ef-d5mm-open,
  body.ef-d5mm-open {
    overflow: hidden;
    height: 100%;
  }

  .ef-d5mm-overlay {
    position: fixed;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .24s ease, visibility .24s ease;
  }

  body.ef-d5mm-open .ef-d5mm-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .ef-d5mm-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    max-width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    transform: translateX(100%);
    transition: transform .28s ease;
    box-shadow: -8px 0 28px rgba(0,0,0,.18);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  body.ef-d5mm-open.ef-d5mm-type-right .ef-d5mm-panel { transform: translateX(0); }
  body.ef-d5mm-open.ef-d5mm-type-left .ef-d5mm-panel { transform: translateX(0); }
  body.ef-d5mm-open.ef-d5mm-type-fullscreen .ef-d5mm-panel { transform: translateX(0); }

  body.ef-d5mm-type-left .ef-d5mm-panel {
    left: 0;
    right: auto;
    transform: translateX(-100%);
    box-shadow: 8px 0 28px rgba(0,0,0,.18);
  }

  body.ef-d5mm-type-fullscreen .ef-d5mm-panel {
    left: 0;
    right: 0;
    width: 100vw !important;
    transform: translateY(-100%);
    box-shadow: none;
  }

  body.ef-d5mm-open.ef-d5mm-type-fullscreen .ef-d5mm-panel {
    transform: translateY(0);
  }

  .ef-d5mm-head {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 62px;
    padding: 10px 16px;
  }

  .ef-d5mm-logo-wrap {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-height: 40px;
  }

  .ef-d5mm-logo {
    max-height: 42px;
    width: auto;
    max-width: 100%;
    display: block;
  }

  .ef-d5mm-close {
    appearance: none;
    border: 0;
    background: transparent;
    font-size: 32px;
    line-height: 1;
    padding: 4px 8px;
    cursor: pointer;
    flex: 0 0 auto;
  }

  .ef-d5mm-cta-wrap {
    padding: 14px 18px 8px;
  }

  .ef-d5mm-cta {
    display: block;
    width: 100%;
    text-align: center;
    padding: 13px 16px;
    border-radius: 10px;
    text-decoration: none !important;
    font-weight: 700;
    line-height: 1.2;
    transition: opacity .2s ease;
  }

  .ef-d5mm-nav,
  .ef-d5mm-nav ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .ef-d5mm-nav { padding: 0 0 40px !important; }

  .ef-d5mm-nav > li,
  .ef-d5mm-nav .menu-item,
  .ef-d5mm-nav .page_item {
    position: relative;
    margin: 0 !important;
    padding: 0 !important;
  }

  .ef-d5mm-nav a {
    display: block;
    width: 100%;
    text-decoration: none !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: anywhere;
    line-height: 1.35;
    box-sizing: border-box;
    transition: color .18s ease, background-color .18s ease;
  }

  .ef-d5mm-nav a .ef-d5mm-link-inner {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: 100%;
  }

  .ef-d5mm-nav a .ef-d5mm-menu-icon {
    width: 18px;
    min-width: 18px;
    text-align: center;
    opacity: .88;
  }

  .ef-d5mm-toggle {
    position: absolute;
    top: 0;
    right: 0;
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    z-index: 1;
  }

  .ef-d5mm-plus,
  .ef-d5mm-minus { display: inline-block; }

  .ef-d5mm-minus { display: none; }

  .ef-d5mm-open-item > .ef-d5mm-toggle .ef-d5mm-plus { display: none; }
  .ef-d5mm-open-item > .ef-d5mm-toggle .ef-d5mm-minus { display: inline-block; }

  .ef-d5mm-nav .sub-menu,
  .ef-d5mm-nav .children,
  .ef-d5mm-nav li > ul {
    display: none;
  }

  .ef-d5mm-nav .ef-d5mm-open-item > .sub-menu,
  .ef-d5mm-nav .ef-d5mm-open-item > .children,
  .ef-d5mm-nav .ef-d5mm-open-item > ul {
    display: block;
  }

  .ef-d5mm-empty {
    padding: 18px;
    color: #333;
    font-size: 15px;
  }

  body.ef-d5mm-open .et_mobile_menu,
  body.ef-d5mm-open #mobile_menu {
    display: none !important;
  }

  /* Compatibility fix: while menu is open, prevent floating contact bars / multi-buttons from covering submenu toggles */
  body.ef-d5mm-open .ef-contact-bar,
  body.ef-d5mm-open .ef-contact-bar-wrap,
  body.ef-d5mm-open .ef-contact-bar-container,
  body.ef-d5mm-open .ef-smart-bar,
  body.ef-d5mm-open .ef-smartbar,
  body.ef-d5mm-open .ef-multi-button,
  body.ef-d5mm-open .ef-multibutton,
  body.ef-d5mm-open .ef-floating-cta,
  body.ef-d5mm-open .whatsapp-bar,
  body.ef-d5mm-open .ef-wa-bar {
    display: none !important;
    pointer-events: none !important;
  }

  .ef-d5mm-panel {
    pointer-events: auto !important;
  }

  .ef-d5mm-toggle {
    pointer-events: auto !important;
    touch-action: manipulation;
  }

}
