/* ============================================================
   BM Forex Hub — Shared mobile app styles
   Bottom tab bar, touch targets, safe-area handling.
   Loaded only on app-zone pages that include the tab bar.
   Desktop unaffected (all rules gated behind max-width).
   ============================================================ */

.mobile-tabbar {
  display: none;
}

@media (max-width: 900px) {
  header.topbar,
  .topbar,
  .topbar--premium,
  #mobileHeader,
  .mo-top,
  .sp-top,
  .dash-sidebar,
  .sidebar,
  #dashSidebar {
    display: none !important;
  }

  body.has-sidebar .dash-main-wrap {
    margin-left: 0 !important;
  }

  .mobile-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9500;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    height: calc(58px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(10, 14, 20, 0.95);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--hairline, #283548);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.35);
  }
  .mobile-tabbar__item {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--ink-muted, #8fa3b8);
    text-decoration: none;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: none;
    border: none;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s;
  }
  .mobile-tabbar__item svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
  }
  .mobile-tabbar__item:active,
  .mobile-tabbar__item.active {
    color: var(--gold, #1677FF);
  }
  .mobile-tabbar__item.active svg {
    filter: drop-shadow(0 0 6px rgba(22, 119, 255, 0.45));
  }

  body.has-mobile-tabbar {
    padding-bottom: calc(68px + env(safe-area-inset-bottom));
  }

  /* Prevent iOS Safari auto-zoom layout shifts on mobile input focus */
  input:not([type="checkbox"]):not([type="radio"]), select, textarea {
    font-size: 16px;
  }
}

[data-theme="light"] .mobile-tabbar {
  background: rgba(255, 255, 255, 0.95);
  border-top-color: #E2E8F0;
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
}
[data-theme="light"] .mobile-tabbar__item { color: #64748B; }
[data-theme="light"] .mobile-tabbar__item:active,
[data-theme="light"] .mobile-tabbar__item.active { color: #1677FF; }
