/* =========================================================
   MONTEIO WORKSPACE v4.5.1
   Fixed phone status spacing + attached rounded bottom navigation
   ========================================================= */

@media (max-width:800px){

  html.mw-mobile-shell-enabled{
    --mw-status-safe:max(30px, env(safe-area-inset-top));
    --mw-header-height:48px;
    min-height:100%;
    background:#0d0f14;
    scroll-padding-top:calc(var(--mw-status-safe) + var(--mw-header-height));
  }

  html.mw-mobile-shell-enabled body.workspace-body{
    min-height:100dvh;
    margin:0!important;
    background:#0d0f14!important;
  }

  /* Solid background directly behind the phone clock, Wi-Fi and battery icons. */
  html.mw-mobile-shell-enabled body.workspace-body::before{
    content:"";
    position:fixed;
    top:0;
    left:0;
    right:0;
    height:var(--mw-status-safe);
    background:#0d1117;
    z-index:1500;
    pointer-events:none;
  }

  html.mw-mobile-shell-enabled .workspace-body .app{
    min-height:100dvh;
    padding:0!important;
    background:var(--bg,#f6f7f9);
  }

  html.mw-mobile-shell-enabled .workspace-body .main-shell{
    width:100%!important;
    min-width:0!important;
    min-height:100dvh!important;
    margin:0!important;
    padding-top:calc(var(--mw-status-safe) + var(--mw-header-height))!important;
    border:0!important;
    border-radius:0!important;
    overflow:visible!important;
    background:var(--bg,#f6f7f9);
    box-shadow:none!important;
  }

  /* Header now begins below the Android notification/status area. */
  html.mw-mobile-shell-enabled .workspace-body .topbar{
    display:flex!important;
    position:fixed!important;
    top:var(--mw-status-safe)!important;
    left:0!important;
    right:0!important;
    width:100%!important;
    min-width:0!important;
    height:var(--mw-header-height)!important;
    margin:0!important;
    padding:0 8px!important;
    gap:6px!important;
    box-sizing:border-box!important;
    border:0!important;
    border-radius:0!important;
    background:linear-gradient(105deg,#12161d,#080b10)!important;
    box-shadow:0 7px 18px rgba(0,0,0,.18)!important;
    z-index:1450!important;
  }

  html.mw-mobile-shell-enabled .workspace-body .search-wrap{
    flex:1 1 auto!important;
    min-width:0!important;
    height:31px!important;
    min-height:31px!important;
    margin-left:0!important;
    padding:0 9px!important;
    border-radius:11px!important;
  }

  html.mw-mobile-shell-enabled .workspace-body .search-wrap input{
    height:30px!important;
    min-height:30px!important;
    padding:0!important;
  }

  html.mw-mobile-shell-enabled .workspace-body .theme-toggle,
  html.mw-mobile-shell-enabled .workspace-body .mw-mobile-notification-btn,
  html.mw-mobile-shell-enabled .workspace-body .top-actions>.avatar{
    width:30px!important;
    min-width:30px!important;
    height:30px!important;
    min-height:30px!important;
    border-radius:10px!important;
  }

  html.mw-mobile-shell-enabled .workspace-body .view-container{
    min-height:calc(100dvh - var(--mw-status-safe) - var(--mw-header-height))!important;
    padding:
      10px
      8px
      calc(74px + env(safe-area-inset-bottom))!important;
  }

  /* Attached to the bottom, with stronger curved top edges. */
  html.mw-mobile-shell-enabled .workspace-body .mw-mobile-nav{
    position:fixed!important;
    left:6px!important;
    right:6px!important;
    bottom:0!important;
    width:auto!important;
    height:calc(62px + env(safe-area-inset-bottom))!important;
    margin:0!important;
    padding:
      6px
      7px
      calc(6px + env(safe-area-inset-bottom))!important;
    box-sizing:border-box!important;
    border:1px solid rgba(255,255,255,.10)!important;
    border-bottom:0!important;
    border-radius:30px 30px 0 0!important;
    background:#0b0d12!important;
    box-shadow:0 -10px 30px rgba(0,0,0,.30)!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
    z-index:1600!important;
  }

  html.mw-mobile-shell-enabled .workspace-body .mw-mobile-nav-btn{
    min-height:45px!important;
    border-radius:16px!important;
  }

  html.mw-mobile-shell-enabled .workspace-body .view-container> :last-child{
    margin-bottom:12px!important;
  }

  html.mw-mobile-shell-enabled .workspace-body .mw-mobile-sheet,
  html.mw-mobile-shell-enabled .workspace-body .mw-notification-sheet{
    left:0!important;
    right:0!important;
    bottom:0!important;
    margin:0!important;
    border-radius:28px 28px 0 0!important;
    padding-bottom:calc(16px + env(safe-area-inset-bottom))!important;
  }
}

@media (max-width:360px){
  html.mw-mobile-shell-enabled{
    --mw-status-safe:max(28px, env(safe-area-inset-top));
  }

  html.mw-mobile-shell-enabled .workspace-body .topbar{
    padding-left:6px!important;
    padding-right:6px!important;
  }

  html.mw-mobile-shell-enabled .workspace-body .mw-mobile-nav{
    left:4px!important;
    right:4px!important;
    border-radius:27px 27px 0 0!important;
  }
}
