
/* ============================================================
   v44 PWA bottom gap fix
   Убирает визуальный разрыв снизу у нижнего меню в iOS/PWA.
   ============================================================ */

@media (max-width: 860px){
  :root{
    --mobile-bottom-h: 82px;
  }

  /* Главное: меню должно быть прижато к самому низу, без bottom: env(...) */
  .mobile-bottom,
  .mobile-bottom.is-pwa-fixed{
    position:fixed!important;
    left:0!important;
    right:0!important;
    bottom:0!important;
    width:100vw!important;
    max-width:100vw!important;
    min-height:0!important;
    height:auto!important;
    padding:6px 8px 7px!important;
    margin:0!important;
    transform:translate3d(0,0,0)!important;
    -webkit-transform:translate3d(0,0,0)!important;
    z-index:2147483000!important;
    align-items:center!important;
    background:rgba(255,255,255,.98)!important;
    border-top:1px solid rgba(219,229,242,.95)!important;
    box-shadow:0 -10px 28px rgba(15,23,42,.08)!important;
    -webkit-backdrop-filter:saturate(160%) blur(18px)!important;
    backdrop-filter:saturate(160%) blur(18px)!important;
  }

  .mobile-bottom a{
    min-height:62px!important;
    height:62px!important;
    padding:7px 4px!important;
    justify-content:center!important;
    border-radius:16px!important;
  }

  .mobile-bottom a.active{
    min-height:62px!important;
    height:62px!important;
  }

  .main{
    padding-bottom:calc(92px + env(safe-area-inset-bottom, 0px))!important;
  }

  body{
    padding-bottom:0!important;
  }
}

/* iPhone/PWA: safe-area не должен создавать пустую белую полосу под меню */
@supports (-webkit-touch-callout: none){
  @media (max-width: 860px){
    .mobile-bottom,
    .mobile-bottom.is-pwa-fixed{
      bottom:0!important;
      padding-bottom:7px!important;
    }

    .main{
      padding-bottom:104px!important;
    }
  }
}

/* Standalone PWA: не увеличиваем меню снизу, только даём контенту запас */
@media (display-mode: standalone){
  @media (max-width: 860px){
    :root{
      --mobile-bottom-h: 82px;
    }

    .mobile-bottom,
    .mobile-bottom.is-pwa-fixed{
      bottom:0!important;
      min-height:0!important;
      height:auto!important;
      padding:6px 8px 7px!important;
    }

    .mobile-bottom a,
    .mobile-bottom a.active{
      min-height:62px!important;
      height:62px!important;
    }

    .main{
      padding-bottom:104px!important;
    }
  }
}
