/* Mobile navigation | AUKTRA */
@media (max-width: 740px) {
  .mobile-tabbar {
    --dock-surface: rgba(255,255,255,.94);
    --dock-edge: rgba(30,46,60,.13);
    --dock-text: #52606c;
    --dock-strong: #192934;
    --dock-selected: rgba(24,42,55,.08);
    --dock-action: #24313c;
    --dock-action-ink: #ffffff;

    position: fixed !important;
    inset-inline: 10px !important;
    left: 10px !important;
    right: 10px !important;
    bottom: calc(9px + env(safe-area-inset-bottom,0px)) !important;
    width: auto !important;
    max-width: 560px !important;
    height: 68px !important;
    margin-inline: auto !important;
    display: grid !important;
    grid-template-columns: repeat(5,minmax(0,1fr)) !important;
    align-items: center !important;
    gap: 2px !important;
    padding: 6px !important;
    border: 1px solid var(--dock-edge) !important;
    border-radius: 30px !important;
    background: var(--dock-surface) !important;
    color: var(--dock-text) !important;
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    backdrop-filter: blur(20px) saturate(1.2);
    box-shadow: 0 15px 40px rgba(17,30,42,.12), 0 2px 7px rgba(17,30,42,.05) !important;
    z-index: 150;
    box-sizing: border-box;
  }

  .mobile-tabbar > a {
    position: relative;
    display: flex !important;
    flex: initial !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    height: 54px !important;
    min-height: 54px !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 3px 1px !important;
    border: 0 !important;
    border-radius: 19px !important;
    background: transparent !important;
    text-decoration: none !important;
    color: var(--dock-text) !important;
    -webkit-tap-highlight-color: transparent;
    transition: background-color .2s ease, color .2s ease, transform .2s ease;
    box-sizing: border-box;
  }

  .mobile-tabbar > a > .icon {
    width: 24px !important;
    height: 24px !important;
    flex: 0 0 24px;
    stroke-width: 1.8;
    color: currentColor !important;
  }

  .mobile-tabbar > a > small {
    display: block;
    max-width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    font: 650 clamp(11px,3vw,13px)/1.12 system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif !important;
    letter-spacing: -.02em !important;
    color: inherit !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-tabbar > a.selected,
  body[data-page="watchlist"] .mobile-tabbar > a:nth-child(4),
  body[data-page="account"] .mobile-tabbar > a:nth-child(5),
  body[data-page="profile"] .mobile-tabbar > a:nth-child(5),
  body[data-page="security"] .mobile-tabbar > a:nth-child(5),
  body[data-page="orders"] .mobile-tabbar > a:nth-child(5),
  body[data-page="notifications"] .mobile-tabbar > a:nth-child(5),
  body[data-page="my-auctions"] .mobile-tabbar > a:nth-child(5),
  body[data-page="my-bids"] .mobile-tabbar > a:nth-child(5) {
    background: var(--dock-selected) !important;
    color: var(--dock-strong) !important;
  }

  .mobile-tabbar > a:active { transform: scale(.96); }
  .mobile-tabbar > a:focus-visible { outline: 2px solid var(--dock-strong); outline-offset: -3px; }

  .mobile-tabbar > a.tab-create {
    height: 54px !important;
    min-height: 54px !important;
    padding: 3px 0 !important;
    background: transparent !important;
    color: var(--dock-strong) !important;
    border-radius: 50% !important;
  }
  .mobile-tabbar > a.tab-create > span {
    display: grid !important;
    place-items: center !important;
    width: 49px !important;
    height: 49px !important;
    border: 1px solid rgba(255,255,255,.13) !important;
    border-radius: 50% !important;
    background: var(--dock-action) !important;
    color: var(--dock-action-ink) !important;
    box-shadow: 0 5px 12px rgba(9,26,39,.15) !important;
    flex: 0 0 auto;
  }
  .mobile-tabbar > a.tab-create > span .icon {
    width: 28px !important;
    height: 28px !important;
    stroke-width: 1.75;
    color: var(--dock-action-ink) !important;
  }
  .mobile-tabbar > a.tab-create > small {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  /* Place sticky auction controls above the floating navigation. */
  .mobile-bid-dock { bottom: calc(84px + env(safe-area-inset-bottom,0px)) !important; }
  .settings-save { bottom: calc(84px + env(safe-area-inset-bottom,0px)) !important; }
}

@media (max-width:740px) {
  html[data-theme="dark"] .mobile-tabbar {
    --dock-surface: rgba(13,26,36,.92);
    --dock-edge: rgba(171,196,208,.2);
    --dock-text: #ced8e0;
    --dock-strong: #ffffff;
    --dock-selected: rgba(183,205,218,.16);
    --dock-action: #253845;
    --dock-action-ink: #ffffff;
    background: var(--dock-surface) !important;
    border-color: var(--dock-edge) !important;
    color: var(--dock-text) !important;
    box-shadow: 0 12px 32px rgba(0,0,0,.3), 0 2px 6px rgba(0,0,0,.2) !important;
  }
  html[data-theme="dark"] .mobile-tabbar > a.selected,
  html[data-theme="dark"] body[data-page="watchlist"] .mobile-tabbar > a:nth-child(4),
  html[data-theme="dark"] body[data-page="account"] .mobile-tabbar > a:nth-child(5),
  html[data-theme="dark"] body[data-page="profile"] .mobile-tabbar > a:nth-child(5),
  html[data-theme="dark"] body[data-page="security"] .mobile-tabbar > a:nth-child(5),
  html[data-theme="dark"] body[data-page="orders"] .mobile-tabbar > a:nth-child(5),
  html[data-theme="dark"] body[data-page="notifications"] .mobile-tabbar > a:nth-child(5),
  html[data-theme="dark"] body[data-page="my-auctions"] .mobile-tabbar > a:nth-child(5),
  html[data-theme="dark"] body[data-page="my-bids"] .mobile-tabbar > a:nth-child(5) {
    background: var(--dock-selected) !important;
    color: var(--dock-strong) !important;
  }
  html[data-theme="dark"] .mobile-tabbar > a.tab-create > span {
    background: var(--dock-action) !important;
    color: var(--dock-action-ink) !important;
    box-shadow: 0 8px 18px rgba(0,0,0,.2) !important;
  }
}

@media (max-width:359px) {
  .mobile-tabbar { inset-inline: 6px !important; left: 6px !important; right: 6px !important; padding: 6px 4px !important; }
  .mobile-tabbar > a { border-radius: 18px !important; }
  .mobile-tabbar > a.tab-create > span { width: 47px !important; height: 47px !important; }
  .mobile-tabbar > a > .icon { width: 22px !important; height: 22px !important; }
}

@media (prefers-reduced-motion:reduce) {
  .mobile-tabbar > a { transition: none !important; }
}
