/* RepublicaPass V58 — mobile public drawer compact + bottom dock safe */
@media (max-width:820px){
  body.public-body .mobile-public-nav{
    top:8px!important;
    right:8px!important;
    bottom:calc(72px + env(safe-area-inset-bottom))!important;
    left:auto!important;
    width:min(76vw,270px)!important;
    height:auto!important;
    min-height:0!important;
    max-height:calc(100dvh - 88px - env(safe-area-inset-bottom))!important;
    padding:11px 10px 12px!important;
    gap:0!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch!important;
    border:1px solid rgba(255,255,255,.075)!important;
    border-right-color:rgba(255,255,255,.035)!important;
    border-radius:20px!important;
    background:linear-gradient(180deg,rgba(8,17,14,.985) 0%,rgba(3,9,7,.99) 100%)!important;
    box-shadow:-16px 12px 44px rgba(0,0,0,.46)!important;
    scrollbar-width:none!important;
  }
  body.public-body .mobile-public-nav::-webkit-scrollbar{display:none!important}

  body.public-body .mobile-drawer-head{
    min-height:39px!important;
    padding:0 2px 10px!important;
    border-bottom:1px solid rgba(255,255,255,.06)!important;
  }
  body.public-body .mobile-drawer-brand{
    gap:7px!important;
    font-size:15.5px!important;
    letter-spacing:-.045em!important;
  }
  body.public-body .mobile-drawer-brand img{
    display:block!important;
    width:27px!important;
    height:27px!important;
    object-fit:contain!important;
  }
  body.public-body .mobile-drawer-close{
    width:31px!important;
    height:31px!important;
    border-radius:10px!important;
    border:1px solid rgba(255,255,255,.07)!important;
    background:rgba(255,255,255,.025)!important;
    color:#dce6e1!important;
    font-size:21px!important;
    line-height:1!important;
  }

  body.public-body .mobile-drawer-kicker{
    padding:12px 5px 7px!important;
    font-size:7.5px!important;
    letter-spacing:.17em!important;
    color:#68766f!important;
  }
  body.public-body .mobile-drawer-links{
    display:grid!important;
    gap:6px!important;
  }
  body.public-body.rp-premium-v15 .mobile-drawer-links>a{
    min-height:41px!important;
    padding:0 10px!important;
    border:1px solid rgba(255,255,255,.055)!important;
    border-radius:14px!important;
    background:rgba(255,255,255,.022)!important;
    color:#dce5e0!important;
    font:600 12px/1.15 Inter,sans-serif!important;
    letter-spacing:-.01em!important;
  }
  body.public-body.rp-premium-v15 .mobile-drawer-links>a:first-child{
    background:linear-gradient(90deg,rgba(13,242,138,.085),rgba(13,242,138,.025))!important;
    border-color:rgba(13,242,138,.13)!important;
    color:#dff8e9!important;
  }
  body.public-body.rp-premium-v15 .mobile-drawer-links>a i{
    width:24px!important;
    height:24px!important;
    display:grid!important;
    place-items:center!important;
    border-radius:8px!important;
    background:rgba(255,255,255,.035)!important;
    color:#89a096!important;
    font-size:13px!important;
  }
  body.public-body.rp-premium-v15 .mobile-drawer-links>a:first-child i{
    background:rgba(13,242,138,.075)!important;
    color:#0df28a!important;
  }

  body.public-body .mobile-drawer-footer{
    margin-top:12px!important;
    padding:11px 2px 0!important;
    gap:7px!important;
    border-top:1px solid rgba(255,255,255,.055)!important;
  }
  body.public-body .mobile-drawer-footer .language-trigger{
    min-height:37px!important;
    height:37px!important;
    border-radius:11px!important;
    font-size:10px!important;
  }
  body.public-body .mobile-login-link{
    min-height:39px!important;
    height:39px!important;
    border-radius:11px!important;
    font-size:10.5px!important;
  }
  body.public-body .mobile-drawer-footer>small{
    padding-top:1px!important;
    font-size:8px!important;
    line-height:1.25!important;
  }

  /* Keep the drawer entirely above the persistent mobile dock. */
  body.public-body.public-menu-open .rp-mobile-bottom-nav{
    z-index:30!important;
  }
  body.public-body .mobile-nav-backdrop{
    bottom:calc(64px + env(safe-area-inset-bottom))!important;
  }
}

@media (max-width:420px){
  body.public-body .mobile-public-nav{
    top:6px!important;
    right:6px!important;
    bottom:calc(70px + env(safe-area-inset-bottom))!important;
    width:min(78vw,248px)!important;
    max-height:calc(100dvh - 82px - env(safe-area-inset-bottom))!important;
    padding:9px 8px 10px!important;
    border-radius:18px!important;
  }
  body.public-body .mobile-drawer-head{padding-bottom:8px!important}
  body.public-body .mobile-drawer-brand{font-size:14.5px!important}
  body.public-body .mobile-drawer-brand img{width:25px!important;height:25px!important}
  body.public-body .mobile-drawer-kicker{padding:10px 4px 6px!important}
  body.public-body .mobile-drawer-links{gap:5px!important}
  body.public-body.rp-premium-v15 .mobile-drawer-links>a{
    min-height:38px!important;
    border-radius:12px!important;
    font-size:11.5px!important;
  }
  body.public-body .mobile-drawer-footer{margin-top:9px!important;padding-top:9px!important}
  body.public-body .mobile-drawer-footer>small{display:none!important}
}

@media (max-height:640px) and (max-width:820px){
  body.public-body .mobile-public-nav{
    top:5px!important;
    bottom:calc(68px + env(safe-area-inset-bottom))!important;
    padding-top:8px!important;
    padding-bottom:8px!important;
  }
  body.public-body .mobile-drawer-kicker{padding-top:8px!important}
  body.public-body.rp-premium-v15 .mobile-drawer-links>a{min-height:36px!important}
  body.public-body .mobile-drawer-footer{margin-top:8px!important;padding-top:8px!important;gap:5px!important}
  body.public-body .mobile-drawer-footer .language-trigger,
  body.public-body .mobile-login-link{height:35px!important;min-height:35px!important}
  body.public-body .mobile-drawer-footer>small{display:none!important}
}
