/* bottom-nav.css — Bottom navigation bar (mobile only, ≤767px)
   Colors come from the central palette in /styles.css (--vv-*). */
:root {
  --vv-bottom-nav-height: 64px;
}

.vv-bottom-nav {
  display: none; /* hidden on desktop */
}

@media (max-width: 767px) {
  .vv-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--vv-bottom-nav-height) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--vv-surface);
    border-top: 1px solid var(--vv-border);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
    z-index: 50;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  }

  /* Hide bottom nav when OD planner is open (planner is full-screen on mobile) */
  body.vv-od-open .vv-bottom-nav {
    display: none;
  }
}

.vv-bn-tab {
  flex: 1;
  min-width: 0; /* allow shrinking on very narrow screens (292px) */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 2px;
  border: none;
  background: none;
  color: var(--vv-text-2);
  cursor: pointer;
  min-height: 48px;
  transition: color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  box-sizing: border-box;
}

.vv-bn-tab svg {
  width: 27px;
  height: 27px;
  flex-shrink: 0;
  display: block;
}

.vv-bn-label {
  font-size: clamp(9px, 2.3vw, 11px);
  font-weight: 500;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.vv-bn-tab.active {
  color: var(--vv-accent);
}

.vv-bn-tab.active .vv-bn-label {
  font-weight: 700;
}

@media (hover: hover) and (pointer: fine) {
  .vv-bn-tab:hover {
    color: var(--vv-accent);
    background: rgba(37, 99, 235, 0.05);
  }
}

.vv-bn-tab:focus-visible {
  outline: 2px solid var(--vv-accent);
  outline-offset: -2px;
}

@media (prefers-color-scheme: dark) {
  .vv-bottom-nav {
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.4);
  }
}

/* Narrow screen adjustments — 292px target */
@media (max-width: 320px) {
  .vv-bn-tab svg {
    width: 24px;
    height: 24px;
  }
  .vv-bn-label {
    font-size: 9px;
  }
}
