/* ══════════════════════════════════════════════════════════════════════
   SHELL: bottom-nav.css
   Navegación mobile glassmorphism iOS-style — única navegación visible
   en mobile (no hay topbar).

   Elementos:
   - .bottom-nav (fixed bottom, glass blur background)
   - .bottom-nav-item (flex column, icon + label)
   - .bottom-nav-item.active (violet color + dot indicator ::after)
   - .bottom-nav-item:active (press feedback)
   - .bottom-nav-label
   - Dark mode for .bottom-nav-item img

   Usado por: js/utils/sidebar.js (renderBottomNav())

   Extraído de responsive.css (top-level + mobile @media) + dark mode de
   components.css en Round 10.3.
   ══════════════════════════════════════════════════════════════════════ */

/* ─── 1. Desktop: hidden (from responsive.css 25-36) ───────────────── */
/* ─── 1. Bottom Nav — Hidden on Desktop ─────────────────────────────── */
.bottom-nav {
  display: none;
}

/* ═══════════════════════════════════════════════════════════════════════
   PHASE 1: NAVIGATION SHELL
   
   Pattern: Duolingo mobile — NO top navbar, bottom nav is the ONLY
   fixed navigation element. Content starts immediately.
   ═══════════════════════════════════════════════════════════════════════ */


/* ─── 2. Mobile (from responsive.css 55-145) ───────────────────────── */
@media (max-width: 768px) {
  /* ── Bottom Navigation Bar — Glassmorphism, iOS-style ── */
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--m-bottomnav-h);
    /* Glass effect */
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    /* Hairline superior: separa la barra del contenido (sin ella se leía
       como un "cuadro" blanco flotante sobre el árbol en pantallas reales) */
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 -2px 14px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  /* ── Nav Items ── */
  .bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #9CA3AF;
    flex: 1;
    height: 100%;
    min-height: var(--m-touch-min);
    gap: 2px;
    transition: color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    position: relative;
  }

  /* Icon styling */
  .bottom-nav-item .material-symbols-outlined {
    font-size: 22px;
    font-variation-settings: 'wght' 300, 'FILL' 0;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    line-height: 1;
  }

  /* Label — hidden to only show icons */
  .bottom-nav-label {
    display: none;
  }

  .bottom-nav-item img {
    margin-bottom: 0 !important;
  }

  /* ── Active State ── */
  .bottom-nav-item.active {
    color: var(--violet, #6C2BFF);
  }

  .bottom-nav-item.active .material-symbols-outlined {
    font-variation-settings: 'wght' 500, 'FILL' 1;
    transform: translateY(-1px);
    font-size: 24px;
  }

  .bottom-nav-item.active .bottom-nav-label {
    font-weight: 700;
  }

  /* Active indicator dot */
  .bottom-nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 6px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--violet, #6C2BFF);
  }

  /* ── Tap Feedback ── */
  .bottom-nav-item:active {
    transform: scale(0.92);
    transition: transform 0.1s ease;
  }

  .bottom-nav-item:active .material-symbols-outlined {
    transition: transform 0.1s ease;
  }

}

/* ─── 3. Dark mode (from components.css 389-394) ──────────────────── */
[data-theme="dark"] .bottom-nav-item img {
  opacity: 0.6;
}
[data-theme="dark"] .bottom-nav-item.active img {
  opacity: 1;
}


/* ── Dark mode (extracted from learning.css in Round 11) ── */
/* ── Bottom Nav ── */
[data-theme="dark"] .bottom-nav {
  background: var(--bg-white);
  border-top-color: var(--border);
}
