/* ==========================================================================
   ed — Shared Navigation
   Bottom tab bar (mobile) + header links (desktop)
   ========================================================================== */

/* === BOTTOM TAB BAR (mobile) === */
.ed-tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  background: #0d0d10;
  border-top: 1px solid #1e1e22;
  padding-bottom: env(safe-area-inset-bottom, 0);
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.ed-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 0 6px;
  text-decoration: none;
  color: #6b6560;
  transition: color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  min-height: 48px;
}

.ed-tab:hover { color: #a8a29e; }

.ed-tab.active {
  color: #c9a84c;
}

.ed-tab-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ed-tab-icon svg {
  width: 20px;
  height: 20px;
}

.ed-tab-label {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.ed-tab.active .ed-tab-label {
  font-weight: 600;
}

/* Active indicator dot */
.ed-tab.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 2px;
  background: #c9a84c;
  border-radius: 0 0 2px 2px;
}

.ed-tab {
  position: relative;
}

/* === HEADER NAV (desktop — hidden on mobile) === */
.ed-header-nav {
  display: none;
  align-items: center;
  gap: 4px;
}

.ed-header-link {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #6b6560;
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 6px;
  transition: all 0.15s ease;
  letter-spacing: 0.01em;
}

.ed-header-link:hover {
  color: #a8a29e;
  background: rgba(255, 255, 255, 0.03);
}

.ed-header-link.active {
  color: #c9a84c;
  background: rgba(201, 168, 76, 0.08);
}

/* === RESPONSIVE === */

/* Desktop: show header nav, hide tab bar */
@media (min-width: 768px) {
  .ed-tab-bar { display: none; }
  .ed-header-nav { display: flex; }
}

/* Mobile: show tab bar, hide header nav */
@media (max-width: 767px) {
  .ed-tab-bar { display: flex; }
  .ed-header-nav { display: none; }

  /* Adjust page content so it doesn't get hidden behind tab bar */
  #app {
    padding-bottom: calc(56px + env(safe-area-inset-bottom, 0));
  }
  /* For non-#app pages (drafts, logs) */
  .page-container {
    padding-bottom: calc(56px + env(safe-area-inset-bottom, 0));
  }
}
