/* Calory — Bottom Tab Navigation
 * 4 tabs: Diary, Week, Add, Profile. Logout in top bar.
 */

/* Top bar */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px 4px;
}

.top-bar-user {
  font-family: 'Ubuntu Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-sub);
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.top-bar-actions button {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color var(--transition-fast) ease, background var(--transition-fast) ease;
}

.top-bar-actions button:hover {
  color: var(--text-sub);
  background: var(--hover-bg);
}

.top-bar-actions button:active {
  transform: scale(0.92);
}

.top-bar-actions button svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
}

/* Bottom tab bar */
nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  display: flex;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom, 0);
  padding-top: 6px;
  padding-left: 8px;
  padding-right: 8px;
  padding-bottom: 6px;
}

nav button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.6875rem;
  font-weight: 500;
  font-family: 'Ubuntu Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color var(--transition-fast) ease;
  min-height: 44px;
}

nav button svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke var(--transition-fast) ease;
}

nav button span {
  line-height: 1;
}

nav button:hover:not(.active) {
  color: var(--text-sub);
}

nav button:active {
  transform: scale(0.92);
}

nav button.active {
  color: var(--accent);
}

/* Add button — prominent */
nav button.nav-add {
  margin-top: -16px;
}

nav button.nav-add svg {
  width: 26px;
  height: 26px;
  stroke-width: 2;
}

/* Active indicator line */
nav button.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

nav button {
  position: relative;
}

/* Remove active indicator from Add button (it has its own) */
nav button.nav-add.active::after {
  display: none;
}

/* Splash screen */
#splash {
  position: fixed;
  inset: 0;
  z-index: var(--z-splash);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  transition: opacity 400ms ease, visibility 400ms ease;
}

#splash.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-title {
  font-family: 'Aakar', Georgia, 'Times New Roman', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.splash-line {
  width: 0;
  height: 2px;
  background: var(--accent);
  margin-top: 12px;
  animation: splashLine 600ms var(--ease-out) 200ms forwards;
}

@keyframes splashLine {
  to {
    width: 48px;
  }
}
