/* ItnaOne V1.8.8 — Gmail-style mobile folder navigation fix.
   Purpose: make Inbox/Drafts/Sent/Spam/Trash clearly tappable and keep the
   hamburger/top bar above the folder rail on iOS Safari/PWA. */

@media (max-width:760px){
  body.mail-ui-page .itnaone-gmail-topbar{
    z-index:300!important;
    isolation:isolate!important;
  }

  body.mail-ui-page .itnaone-menu-button,
  body.mail-ui-page .itnaone-global-search,
  body.mail-ui-page .itnaone-top-actions,
  body.mail-ui-page .mail-avatar{
    position:relative!important;
    z-index:2!important;
    pointer-events:auto!important;
    touch-action:manipulation!important;
  }

  /* Folder rail: below the app bar, not above it. */
  body.mail-ui-page .gmail-mobile-folders{
    position:sticky!important;
    top:64px!important;
    z-index:220!important;
    display:flex!important;
    align-items:center!important;
    gap:8px!important;
    height:52px!important;
    min-height:52px!important;
    padding:8px 12px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    background:rgba(255,255,255,.98)!important;
    border:0!important;
    border-bottom:1px solid #e8eaed!important;
    box-shadow:none!important;
    -webkit-overflow-scrolling:touch!important;
    scrollbar-width:none!important;
    overscroll-behavior-x:contain!important;
    pointer-events:auto!important;
  }

  body.mail-ui-page .gmail-mobile-folders::-webkit-scrollbar{display:none!important}

  /* Gmail-like compact filter chips: no square/boxed tabs. */
  body.mail-ui-page .gmail-mobile-folders a{
    position:relative!important;
    z-index:1!important;
    flex:0 0 auto!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-width:0!important;
    min-height:36px!important;
    height:36px!important;
    padding:0 15px!important;
    margin:0!important;
    border:0!important;
    outline:0!important;
    border-radius:18px!important;
    background:#f1f3f4!important;
    box-shadow:none!important;
    color:#3c4043!important;
    font-size:13px!important;
    line-height:36px!important;
    font-weight:600!important;
    text-decoration:none!important;
    white-space:nowrap!important;
    cursor:pointer!important;
    pointer-events:auto!important;
    touch-action:manipulation!important;
    -webkit-tap-highlight-color:rgba(11,87,208,.12)!important;
    user-select:none!important;
    -webkit-user-select:none!important;
  }

  body.mail-ui-page .gmail-mobile-folders a::after{display:none!important;content:none!important}

  body.mail-ui-page .gmail-mobile-folders a.active,
  body.mail-ui-page .gmail-mobile-folders a[aria-current="page"]{
    background:#d3e3fd!important;
    color:#0b57d0!important;
    font-weight:700!important;
  }

  body.mail-ui-page .gmail-mobile-folders a:active{
    background:#c7dcfa!important;
    transform:scale(.97)!important;
  }

  body.mail-ui-page .gmail-mobile-folders a:focus-visible{
    box-shadow:0 0 0 2px #0b57d0 inset!important;
  }

  /* Keep the title/list clean under the chip rail. */
  body.mail-ui-page .section-title{
    position:relative!important;
    z-index:1!important;
    background:#fff!important;
  }
}

@media (max-width:390px){
  body.mail-ui-page .gmail-mobile-folders{gap:7px!important;padding-left:10px!important;padding-right:10px!important}
  body.mail-ui-page .gmail-mobile-folders a{height:34px!important;min-height:34px!important;line-height:34px!important;padding:0 13px!important;font-size:12px!important}
}
