/**
 * MB4 Category 3 — Mobile Bottom Navigation (5 icons)
 * Only visible @ ≤768px. Hides on scroll-down, reappears on scroll-up.
 */

@media (max-width: 768px) {
  #mobileBottomNav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: calc(64px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    z-index: 9999;
    background: rgba(11, 11, 11, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-around;
    transition: transform 240ms cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
  }

  #mobileBottomNav.hidden {
    transform: translateY(100%);
  }

  #mobileBottomNav .bn-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 8px 4px 6px;
    color: rgba(255, 255, 255, 0.55);
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 10px;
    font-weight: 500;
    text-decoration: none;
    min-height: 44px;
    min-width: 44px;
    transition: color 200ms ease, transform 180ms ease;
    position: relative;
  }

  #mobileBottomNav .bn-item:active {
    transform: scale(0.94);
  }

  #mobileBottomNav .bn-item.active {
    color: #D4AF37;
    font-weight: 700;
  }

  #mobileBottomNav .bn-item.active .bn-icon {
    filter: drop-shadow(0 0 4px rgba(212, 175, 55, 0.45));
  }

  #mobileBottomNav .bn-icon {
    width: 24px;
    height: 24px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  #mobileBottomNav .bn-icon i[data-lucide] {
    width: 22px; height: 22px; stroke-width: 1.75;
  }

  /* Center item (Calendar) — slightly raised with gold ring */
  #mobileBottomNav .bn-item.bn-center {
    margin-top: -10px;
  }
  #mobileBottomNav .bn-item.bn-center .bn-icon {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #F59E0B 0%, #D4AF37 100%);
    color: #0a0a0a;
    box-shadow: 0 6px 18px rgba(212, 175, 55, 0.45);
  }
  #mobileBottomNav .bn-item.bn-center .bn-icon i[data-lucide] {
    width: 24px; height: 24px; stroke-width: 2;
  }

  /* Badge (red dot with count) */
  #mobileBottomNav .bn-item .bn-badge {
    position: absolute;
    top: 4px;
    right: 18%;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #EF4444;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 0 0 2px #0a0a0a;
  }
  #mobileBottomNav .bn-item .bn-badge:empty,
  #mobileBottomNav .bn-item .bn-badge[data-count="0"] {
    display: none;
  }

  /* Push page content up to avoid hiding behind nav */
  body:has(#mobileBottomNav) .content-area,
  body:has(#mobileBottomNav) main,
  body:has(#mobileBottomNav) [data-page-root] {
    padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* Desktop — hidden */
@media (min-width: 769px) {
  #mobileBottomNav { display: none !important; }
}
