/* Mobile bottom tab nav — Linear/Notion/Slack-style.
   Hidden on desktop, fixed to viewport bottom on ≤900px. */

#ic-bottom-nav {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1200;
  background: var(--surface, #18181B);
  border-top: 1px solid var(--border, #27272A);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  font-family: 'Inter', system-ui, sans-serif;
}
#ic-bottom-nav .ic-bn-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: 60px;
}
#ic-bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-d, #A1A1AA);
  text-decoration: none;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: -0.005em;
  -webkit-tap-highlight-color: transparent;
  border: none;
  background: transparent;
  cursor: pointer;
}
#ic-bottom-nav a:active { background: var(--surface2, #27272A); }
#ic-bottom-nav a.active { color: var(--cyan, #3B82F6); }
#ic-bottom-nav a .ic-bn-ico { font-size: 20px; line-height: 1; }
#ic-bottom-nav a .ic-bn-lbl { font-size: 10px; line-height: 1; }

/* Active pill: tiny accent dot under active icon */
#ic-bottom-nav a.active .ic-bn-ico::after {
  content: '';
  display: block;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--cyan, #3B82F6);
  margin: 2px auto 0;
}

/* "More" overflow sheet — slides up from bottom */
#ic-more-sheet {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1300;
  background: var(--surface, #18181B);
  border-top: 1px solid var(--border, #27272A);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom, 0px));
  max-height: 70vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.22s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: 0 -8px 32px rgba(0,0,0,0.5);
  font-family: 'Inter', system-ui, sans-serif;
}
#ic-more-sheet.open { transform: translateY(0); }
#ic-more-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1290;
  opacity: 0;
  transition: opacity 0.22s ease;
}
#ic-more-backdrop.open { display: block; opacity: 1; }
html[data-theme="day"] #ic-more-backdrop { background: rgba(0,0,0,0.32); }

#ic-more-sheet .ic-ms-handle {
  width: 32px; height: 4px;
  background: var(--border2, #3F3F46);
  border-radius: 2px;
  margin: 6px auto 12px;
}
#ic-more-sheet .ic-ms-title {
  font-size: 11px;
  color: var(--muted, #71717A);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 20px 4px;
}
#ic-more-sheet a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  color: var(--text, #FAFAFA);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  border-left: 3px solid transparent;
}
#ic-more-sheet a:active { background: var(--surface2, #27272A); }
#ic-more-sheet a.active { color: var(--cyan, #3B82F6); border-left-color: var(--cyan, #3B82F6); }
#ic-more-sheet a .ic-ms-ico { font-size: 18px; width: 22px; text-align: center; }

/* Show on mobile */
@media (max-width: 900px) {
  #ic-bottom-nav { display: block; }
  #ic-more-sheet { display: block; }
  /* Hide the hamburger / topbar nav on mobile pages that get bottom nav,
     since bottom nav supersedes them. */
  body.ic-has-bottom-nav #mobile-nav-toggle,
  body.ic-has-bottom-nav .topbar .nav { display: none !important; }
  body.ic-has-bottom-nav .topbar { justify-content: flex-start !important; gap: 12px; }
}
