/* ============================================================
   AMRIT Mobile Menu Fix — v1.0 (styles)
   Pairs with mobile-menu-fix.js. Only activates below 992px.
   ============================================================ */

.amfix-burger,
.amfix-drawer,
.amfix-backdrop { display: none; }

@media (max-width: 991.98px) {

  /* ---- floating hamburger button ---- */
  .amfix-burger {
    display: flex;
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 99998;
    width: 48px;
    height: 48px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: #1e3a8a;              /* deep blue — adjust to brand color */
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0,0,0,.28);
  }
  .amfix-burger span {
    display: block;
    width: 22px;
    height: 2.5px;
    border-radius: 2px;
    background: #fff;
    transition: transform .25s ease, opacity .2s ease;
  }
  .amfix-burger.active span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .amfix-burger.active span:nth-child(2) { opacity: 0; }
  .amfix-burger.active span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

  /* ---- backdrop ---- */
  .amfix-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 99996;
    background: rgba(10, 12, 24, .55);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
  }
  .amfix-backdrop.show { opacity: 1; pointer-events: auto; }

  /* ---- slide-in drawer ---- */
  .amfix-drawer {
    display: block;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 99997;
    width: min(86vw, 360px);
    background: #ffffff;
    box-shadow: -12px 0 40px rgba(0,0,0,.25);
    transform: translateX(100%);
    transition: transform .3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .amfix-drawer.open { transform: translateX(0); }

  .amfix-drawer-inner { padding: 18px 18px 40px; }

  .amfix-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-right: auto;              /* left edge — floating burger owns the right */
    font-size: 26px;
    line-height: 1;
    color: #1e293b;
    background: #f1f5f9;
    border: none;
    border-radius: 10px;
    cursor: pointer;
  }

  /* ---- menu list ---- */
  .amfix-list {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
  }
  .amfix-item { border-bottom: 1px solid #eef0f4; }
  .amfix-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  .amfix-row a {
    flex: 1;
    display: block;
    padding: 14px 4px;
    font-family: inherit;
    font-size: 15.5px;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
  }
  .amfix-row a:active { color: #1e3a8a; }

  .amfix-subtoggle {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    transition: transform .25s ease;
  }
  .amfix-item.open > .amfix-row .amfix-subtoggle { transform: rotate(180deg); }

  /* ---- nested submenus (accordion) ---- */
  .amfix-sub {
    list-style: none;
    margin: 0;
    padding: 0 0 6px 14px;
    display: none;
  }
  .amfix-item.open > .amfix-sub { display: block; }
  .amfix-sub .amfix-row a {
    font-weight: 500;
    font-size: 14.5px;
    color: #475569;
    padding: 11px 4px;
  }
  .amfix-sub .amfix-item { border-bottom: 1px dashed #eef0f4; }
  .amfix-sub .amfix-item:last-child { border-bottom: none; }

  /* ---- quick links strip ---- */
  .amfix-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
  }
  .amfix-quick a {
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: #1e3a8a;
    border-radius: 999px;
    text-decoration: none;
  }

  /* ---- safety: if the theme's own broken mobile menu leaves artifacts,
          hide typical leftover toggles so users see ONE working button ---- */
  .th-menu-toggle,
  .menu-toggle:not(.amfix-burger),
  .th-menu-wrapper { display: none !important; }
}
