/* =========================================================
   FIXWALA — Mobile Bottom Navigation (Premium Glass style)
   Fixed bottom tab bar, phones only (hidden on tablet/desktop).
   Loaded after style.css/responsive.css so it can safely use
   the same design-system variables (--color-primary, --shadow, etc).
   Does not modify or override the existing desktop .nav / .nav-links.
   ========================================================= */

.fx-bottom-nav{
  display: none; /* shown only under the mobile media query below */
}

@media (max-width: 768px){
  /* Pushes real page content up so the last section/footer is never
     hidden behind the fixed glass bar. */
  body.fx-has-bottom-nav{
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }

  .fx-bottom-nav{
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 950; /* above content/floating buttons, below header (1000) and modals */

    /* ---- Glass surface ---- */
    background: linear-gradient(180deg, rgba(255,255,255,0.72), rgba(255,255,255,0.58));
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);

    /* Soft translucent edge all around the glass panel */
    border: 1px solid rgba(255,255,255,0.55);
    border-bottom: none;
    border-radius: 22px 22px 0 0;

    /* Upward glow + a hairline inner highlight for a "glass" edge */
    box-shadow:
      0 -10px 32px rgba(15,76,129,0.14),
      0 -2px 10px rgba(15,23,42,0.06),
      inset 0 1px 0 rgba(255,255,255,0.6);

    padding: 8px 6px calc(8px + env(safe-area-inset-bottom, 0px));
    justify-content: space-between;
    align-items: stretch;
    gap: 4px;
  }

  /* Fallback for browsers with no backdrop-filter support: a solid
     near-opaque panel so the bar is still fully legible. */
  @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))){
    .fx-bottom-nav{ background: rgba(255,255,255,0.96); }
  }

  .fx-bn-item{
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 4px 7px;
    border-radius: 16px;
    color: var(--color-text-muted, #64748B);
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    background: none;
    border: none;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
    min-height: 48px; /* touch-friendly target */
    position: relative;
    transition: color .2s ease, background-color .2s ease, transform .15s ease;
  }

  .fx-bn-item i{
    font-size: 1.2rem;
    line-height: 1;
    transition: transform .2s ease;
  }

  .fx-bn-item:active{
    transform: scale(0.94);
    background: rgba(15,76,129,0.08);
  }

  /* Active tab: soft blue-tinted glass pill behind icon+label — subtle,
     on-brand, not a bright/flashy fill. */
  .fx-bn-item.active{
    color: var(--color-primary, #0F4C81);
    background: rgba(15,76,129,0.10);
    box-shadow: inset 0 0 0 1px rgba(15,76,129,0.12);
  }

  .fx-bn-item.active i{
    transform: translateY(-1px);
  }

  .fx-bn-label{ max-width: 100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
}

/* Never show the bar above the mobile breakpoint, even if JS runs early */
@media (min-width: 769px){
  .fx-bottom-nav{ display:none !important; }
}

@media print{
  .fx-bottom-nav{ display:none !important; }
}
