/**
 * NormaCode — SPA /app footer minimalista (P1.6, Round C audit 2026-06-18)
 *
 * Fix: usuarios autenticados sin acceso a /normas /status /about /terminos.
 * Footer minimalista solo en desktop ≥769px.
 * Mobile usa F6 bottom tab bar (sin espacio adicional).
 *
 * Doc: _GOVERNANCE/docs/architecture/AUDITORIA_MOBILE_2026-06-17.md §10.10
 */

.nc-app-footer {
  background: #0f172a;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 12px 24px;
  color: #9ca3af;
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 12px;
  z-index: 100;
  /* Audit visual triad 2026-06-23 ROUND 2: el fix anterior (margin-top: auto +
     position: relative) NO funciona porque main-content tiene overflow-y: auto;
     cuando scrollHeight > clientHeight, el contenido llena el padre y
     margin-top: auto resuelve a 0. Resultado: el footer scrollea con el
     contenido y aparece atravesando cards a media página.
     Fix definitivo: position: fixed alineado al borde derecho del viewport
     y al borde izquierdo de main-content (sidebar width = 240/72/0). El
     footer queda SIEMPRE visible al bottom, fuera del scroll de main-content.
     Mobile (<769px) lo oculta vía media query existente. */
  position: fixed;
  bottom: 0;
  left: 240px; /* sidebar-expanded width default */
  right: 0;
}

/* Sidebar collapsed (icon-only) */
body.sidebar-collapsed .nc-app-footer {
  left: 72px;
}

/* Zen mode (sidebar hidden) */
body.zen-mode .nc-app-footer {
  left: 0;
}

/* Reserve space at bottom of main-content so content isn't covered by fixed footer */
.main-content {
  padding-bottom: 56px;
}

.nc-app-footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.nc-app-footer-brand {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
}

.nc-app-footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
}

.nc-app-footer-links a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color 0.15s ease-out;
  font-size: 12px;
}

.nc-app-footer-links a:hover,
.nc-app-footer-links a:focus-visible {
  color: var(--primary, #34d399);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Mobile: hide app footer (bottom tab bar F6 ocupa el espacio) */
@media (max-width: 768px) {
  .nc-app-footer {
    display: none !important;
  }
  /* Sin footer fijo no necesitamos reservar espacio (F6 bottom-tabs lo maneja) */
  .main-content {
    padding-bottom: 0;
  }
}

/* Prefers-reduced-transparency: backdrop sólido */
@media (prefers-reduced-transparency: reduce) {
  .nc-app-footer {
    background: #0f172a;
    border-top-color: rgba(255, 255, 255, 0.12);
  }
}
