/* ============================================================================
   Navegação global do LMNew — MESMO componente vira:
   • celular: barra fixa EMBAIXO (bottom-bar, 5 abas)
   • desktop: barra fixa no TOPO (top-nav com logo + abas + toggle)
   Injetada por nav.js em toda página. Usa as variáveis de theme.css.
   ========================================================================== */
.lmnav {
  position: fixed; z-index: 1000; left: 0; right: 0;
  background: var(--nav-bg);
  display: flex; align-items: stretch;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

/* ── MOBILE: embaixo ── */
.lmnav { bottom: 0; border-top: 1px solid var(--border); }
.lmnav-logo { display: none; }            /* logo só no desktop (no mobile vai no topo da própria página) */
.lmnav-right { display: none; }           /* conta/login só no desktop (no app o login vem da Play Store) */
.lmnav-items { display: flex; flex: 1; }
.lmnav-item {
  flex: 1; position: relative; text-decoration: none; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 0 9px; transition: color .15s ease;
}
.lmnav-item:hover { color: var(--text); }
.lmnav-ic { width: 23px; height: 23px; display: block; }
.lmnav-lb { font-size: 10.5px; font-weight: 700; }
.lmnav-item.active { color: var(--primary); }
.lmnav-item.active .lmnav-lb { font-weight: 800; }
.lmnav-item.active::before {                /* tracinho da aba ativa (em cima no mobile) */
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 24px; height: 3px; border-radius: 999px; background: var(--primary);
}

/* offset pro conteúdo não ficar escondido atrás da barra */
body { padding-bottom: 58px; }
/* páginas que removeram a barra própria do topo (só a nav global) — não reservar topo no mobile */
body.lmnav-flush { padding-top: 0; }

/* toggle de tema — FLUTUANTE no mobile (acima da barra, canto) */
.lmnav-theme {
  position: fixed; z-index: 1001; right: 12px; bottom: 68px;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  font-size: 18px; line-height: 1; cursor: pointer; box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center;
}

/* ── DESKTOP: no topo ── */
@media (min-width: 900px) {
  .lmnav {
    top: 0; bottom: auto; border-top: none; border-bottom: 1px solid var(--border);
    align-items: center; height: 58px; padding: 0 22px; gap: 12px;
  }
  .lmnav-logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
  .lmnav-logo-img { height: 26px; display: block; }
  .lmnav-logo-tx { font-weight: 900; font-size: 18px; color: var(--text); }
  .lmnav-logo-tx em { font-style: normal; color: var(--primary); }
  /* botões CENTRALIZADOS na barra (independente da largura dos lados) */
  .lmnav-items { position: absolute; left: 50%; transform: translateX(-50%); gap: 4px; }
  .lmnav-item { flex: 0 0 auto; flex-direction: row; gap: 8px; padding: 0 13px; height: 58px; justify-content: center; }
  .lmnav-ic { width: 20px; height: 20px; }
  .lmnav-lb { font-size: 14px; font-weight: 700; }
  .lmnav-item.active::before { top: auto; bottom: 0; left: 0; transform: none; width: 100%; }
  /* lado direito: conta (avatar/Entrar) + toggle de tema */
  .lmnav-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
  .lmnav-avatar { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
    border-radius: 50%; overflow: hidden; border: 1px solid var(--border); background: var(--surface); text-decoration: none; }
  .lmnav-avatar img { width: 100%; height: 100%; object-fit: cover; }
  .lmnav-avatar span { font-weight: 800; font-size: 14px; color: var(--text); }
  .lmnav-enter { text-decoration: none; font-weight: 800; font-size: 13px; color: #062018;
    background: var(--primary); padding: 8px 16px; border-radius: 999px; white-space: nowrap; }
  .lmnav-theme { position: static; box-shadow: none; width: 38px; height: 38px; font-size: 17px; }
  body { padding-bottom: 0; padding-top: 58px; }
  body.lmnav-flush { padding-top: 58px; }
}
