/*
 BELLE'S TREASURES — R40.7.1

 Portrait mobile navigation:
 - Readable fixed-width tabs
 - Horizontal touch swiping
 - No scrollbar
 - No extra navigation arrows

 Catalog, owner portal and desktop are untouched.
*/

@media(max-width:700px) and (orientation:portrait) {

  html body:not(.owner-admin-body)
  >header.site-header.deco-shell
  .bt-r406-nav-rail {
    display:block!important;

    position:relative!important;

    width:100%!important;
    min-width:0!important;
    max-width:100%!important;

    height:46px!important;
    min-height:46px!important;
    max-height:46px!important;

    padding:0!important;
    margin:0!important;

    overflow:hidden!important;

    border-radius:10px!important;
    box-sizing:border-box!important;
  }

  /*
   Hide the previous navigation arrows.
  */

  html body:not(.owner-admin-body)
  >header.site-header.deco-shell
  .bt-r406-nav-rail
  >button.bt-r406-nav-arrow {
    display:none!important;
    visibility:hidden!important;
    opacity:0!important;
    pointer-events:none!important;
  }

  /*
   Make the existing navigation the only
   horizontal scrolling surface.
  */

  html body:not(.owner-admin-body)
  >header.site-header.deco-shell
  .bt-r406-nav-rail
  >nav.bt-r33-navigation.bt-r4071-swipe {
    display:flex!important;

    flex-direction:row!important;
    flex-wrap:nowrap!important;

    align-items:center!important;
    justify-content:flex-start!important;
    align-content:center!important;

    width:100%!important;
    min-width:0!important;
    max-width:100%!important;

    height:44px!important;
    min-height:44px!important;
    max-height:44px!important;

    padding:3px 8px!important;
    margin:0!important;

    gap:8px!important;

    overflow-x:auto!important;
    overflow-y:hidden!important;

    white-space:nowrap!important;

    scroll-snap-type:x proximity!important;
    scroll-padding-inline:8px!important;

    scrollbar-width:none!important;
    -ms-overflow-style:none!important;

    overscroll-behavior-x:contain!important;
    -webkit-overflow-scrolling:touch!important;

    touch-action:pan-x!important;

    box-sizing:border-box!important;
  }

  html body:not(.owner-admin-body)
  .bt-r406-nav-rail
  >nav.bt-r4071-swipe::-webkit-scrollbar {
    display:none!important;
    width:0!important;
    height:0!important;
  }

  /*
   Force readable navigation buttons.
   Older compressed widths cannot override this.
  */

  html body:not(.owner-admin-body)
  >header.site-header.deco-shell
  .bt-r406-nav-rail
  >nav.bt-r4071-swipe>a:not([href*="about.html"]) {
    display:inline-flex!important;

    flex:0 0 auto!important;
    flex-grow:0!important;
    flex-shrink:0!important;

    width:auto!important;
    min-width:96px!important;
    max-width:none!important;

    height:36px!important;
    min-height:36px!important;
    max-height:36px!important;

    margin:0!important;
    padding:7px 14px!important;

    align-items:center!important;
    justify-content:center!important;

    font-size:.82rem!important;
    font-weight:800!important;
    line-height:1.15!important;

    letter-spacing:0!important;
    white-space:nowrap!important;

    overflow:visible!important;
    text-overflow:clip!important;

    border-radius:999px!important;

    scroll-snap-align:start!important;

    box-sizing:border-box!important;
  }

  /*
   About is already available in the mobile footer.
  */

  html body:not(.owner-admin-body)
  .bt-r406-nav-rail
  >nav.bt-r4071-swipe>a[href*="about.html"] {
    display:none!important;
  }

  /*
   Existing Zoom retains comfortable width.
  */

  html body:not(.owner-admin-body)
  .bt-r406-nav-rail
  >nav.bt-r4071-swipe>#bt-r33-zoom {
    display:inline-flex!important;

    flex:0 0 108px!important;
    flex-grow:0!important;
    flex-shrink:0!important;

    width:108px!important;
    min-width:108px!important;
    max-width:108px!important;

    height:36px!important;
    min-height:36px!important;

    margin:0!important;
    padding:2px 4px!important;

    scroll-snap-align:start!important;
  }

  html body:not(.owner-admin-body)
  .bt-r406-nav-rail
  >nav.bt-r4071-swipe
  >.bt-zoom-control-v2 {
    flex:0 0 116px!important;

    width:116px!important;
    min-width:116px!important;
    max-width:116px!important;

    scroll-snap-align:start!important;
  }

  /*
   Search sits after Zoom in the swipe strip
   when it is part of the navigation.
  */

  html body:not(.owner-admin-body)
  .bt-r406-nav-rail
  >nav.bt-r4071-swipe>form.bt-r33-search {
    flex:0 0 160px!important;

    flex-grow:0!important;
    flex-shrink:0!important;

    width:160px!important;
    min-width:160px!important;
    max-width:160px!important;

    height:36px!important;
    min-height:36px!important;

    margin:0!important;

    scroll-snap-align:start!important;
  }

  /*
   Keep Belle's Treasures branding above the strip.
  */

  html body:not(.owner-admin-body)
  >header.site-header.deco-shell {
    overflow:visible!important;
  }

  html body:not(.owner-admin-body)
  >header.site-header.deco-shell
  .bt-r403-header-top {
    flex-shrink:0!important;
  }
}