/* ─────────────────────────────────────────
   MOBILE FLOATING BOTTOM NAV
   Add this to the bottom of header.css
   Only visible on screens ≤ 840px
───────────────────────────────────────── */

.mobile-bottom-nav {
  display: none; /* shown only on mobile via media query */
}

@media (max-width: 840px) {

  /* Push page content up so it isn't hidden behind the bar */
  body {
    padding-bottom: 0px;
  }

  .mobile-bottom-nav {
    display: flex;
    align-items: center;
    justify-content: space-around;

    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%) translateY(0);

    width: calc(100% - 32px);
    max-width: 400px;
    height: 58px;

    background: rgba(250, 249, 247, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow:
      0 4px 24px rgba(0, 0, 0, 0.10),
      0 1px 0 rgba(255,255,255, 0.6) inset;

    z-index: 200;

    /* Smooth hide/show on scroll */
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1),
                opacity   0.32s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
  }

  /* Hidden state — slides down and fades out */
  .mobile-bottom-nav.nav-hidden {
    transform: translateX(-50%) translateY(calc(100% + 24px));
    opacity: 0;
    pointer-events: none;
  }

  /* ── Each button / link ── */
  .mob-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;

    flex: 1;
    height: 100%;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
    color: var(--muted);
    border-radius: 14px;
    transition: color 0.18s, background 0.18s;
    position: relative;
  }

  .mob-nav-btn:hover,
  .mob-nav-btn:active {
    color: var(--accent);
    background: var(--accent-dim);
  }

  .mob-nav-btn.active {
    color: var(--accent);
  }

  /* Icon wrapper */
  .mob-nav-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mob-nav-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 1.75;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke 0.18s;
  }

  /* Label under icon */
  .mob-nav-label {
    font-family: var(--sans);
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1;
    opacity: 0.75;
  }

  .mob-nav-btn.active .mob-nav-label,
  .mob-nav-btn:hover  .mob-nav-label {
    opacity: 1;
  }

  /* Active dot indicator */
  /* .mob-nav-btn.active::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
  } */

  /* Notification badge on bell */
  .mob-nav-badge {
    position: absolute;
    top: 7px;
    right: calc(50% - 18px);
    min-width: 15px;
    height: 15px;
    background: var(--accent);
    border-radius: 8px;
    border: 1.5px solid rgba(250, 249, 247, 0.96);
    font-size: 0.55rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    pointer-events: none;
    line-height: 1;
  }

  /* ── Theme toggle pill inside bottom nav ── */
  .mob-nav-theme-icon {
    width: 36px;
    height: 22px;
    border-radius: 11px;
    background: var(--surface2);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s;
    position: relative;
    overflow: hidden;
  }

  .mob-nav-theme-icon svg {
    width: 14px;
    height: 14px;
  }

  /* Sun/moon visibility controlled by theme */
  .mob-theme-sun { display: none; }
  .mob-theme-moon { display: block; }

  [data-theme="dark"] .mob-theme-sun  { display: block; }
  [data-theme="dark"] .mob-theme-moon { display: none; }

}

/* ── Dark mode for the bar itself ── */
[data-theme="dark"] .mobile-bottom-nav {
  background: rgba(15, 14, 23, 0.95);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.45),
    0 1px 0 rgba(255,255,255,0.04) inset;
}

[data-theme="dark"] .mob-nav-badge {
  border-color: rgba(15, 14, 23, 0.95);
}

[data-theme="dark"] .mob-nav-theme-icon {
  background: rgba(255,255,255,0.06);
}