/* =====================================================
   BOTTOM NAVIGATION — COMPONENT STYLES
   Loaded alongside css/style.css, so it reuses WebLympus's
   existing design tokens (--bg, --accent, --font-mono,
   --border-strong, --ease, etc. from css/style.css :root)
   rather than redefining them. A FLOATING PILL, centered
   horizontally, auto-sized to its 5 items — not a
   full-width bar. Selectors are scoped under .bottom-nav /
   .bottom-nav__* only, so nothing here can collide with
   the rest of the site's CSS.
   ===================================================== */

.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 90; /* below .mobile-menu (99) and .navbar (100) */

  /* Auto-size to content but cap at viewport width minus safe margin */
  width: max-content;
  max-width: calc(100vw - 24px);

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;

  padding: 6px;
  background: rgba(18, 18, 18, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(245, 245, 240, 0.14);
  border-radius: 22px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.45),
    0 1px 0 rgba(245, 245, 240, 0.06) inset;
}

/* ── Each nav button ── */
.bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;

  /* Tap-friendly minimum touch area (48 × 48 recommended by WCAG) */
  min-width: 60px;
  padding: 9px 10px 8px;
  border-radius: 16px;

  color: rgba(245, 245, 240, 0.45);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;

  transition:
    color 0.22s var(--ease),
    background-color 0.22s var(--ease),
    transform 0.18s var(--ease);
}

/* Icon */
.bottom-nav__icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  transition: transform 0.22s var(--ease), opacity 0.22s var(--ease);
  opacity: 0.55;
}

/* Label */
.bottom-nav__label {
  display: block;
  line-height: 1;
}

/* ── States ── */
.bottom-nav__item:hover {
  color: rgba(245, 245, 240, 0.85);
}
.bottom-nav__item:hover .bottom-nav__icon {
  opacity: 0.85;
  transform: translateY(-1px);
}

.bottom-nav__item:active {
  transform: scale(0.91);
}

/* Active page highlight */
.bottom-nav__item.is-active {
  color: #2BEE34;
  background-color: rgba(43, 238, 52, 0.11);
}
.bottom-nav__item.is-active .bottom-nav__icon {
  opacity: 1;
  transform: translateY(-1px);
}

/* ── Visibility breakpoints ── */

/* Only show on mobile / tablet (below desktop breakpoint) */
@media (min-width: 1025px) {
  .bottom-nav { display: none; }
}

/* Reserve bottom space so the pill never overlaps footer content */
@media (max-width: 1024px) {
  body.has-bottom-nav {
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  }
}

/* ── Very small screens (≤ 380 px) — compact everything slightly ── */
@media (max-width: 380px) {
  .bottom-nav {
    gap: 1px;
    padding: 5px;
    border-radius: 20px;
    max-width: calc(100vw - 16px);
  }
  .bottom-nav__item {
    min-width: 52px;
    padding: 8px 7px 7px;
    font-size: 8.5px;
    border-radius: 14px;
  }
  .bottom-nav__icon {
    width: 20px;
    height: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bottom-nav__item,
  .bottom-nav__icon { transition: none; }
}
