/**
 * Bottom Navigation – Mobile Tab Bar
 * WCAG 2.1: min 44×44px touch targets, safe-area for notches
 */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: white;
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06);
  padding-bottom: env(safe-area-inset-bottom, 0);
  padding-top: 0.5rem;
}

.bottom-nav {
  padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
}

/* Hidden by default */
.bottom-nav {
  display: none;
}

/* Show on phones + tablets */
@media (max-width: 1024px) {
  .bottom-nav {
    display: flex;
  }
}

@media (min-width: 1025px) {
  .bottom-nav {
    display: none !important;
  }
}

.bottom-nav__link {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.5rem;
  min-height: 44px;
  min-width: 44px;
  font-size: 0.65rem;
  font-weight: 500;
  color: #6b7280;
  text-decoration: none;
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav__link:hover,
.bottom-nav__link:focus {
  color: #4a90e2;
}

.bottom-nav__link.active {
  color: #4a90e2;
}

.bottom-nav__link svg {
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
}

@media (min-width: 768px) and (max-width: 1024px) {
  .bottom-nav {
    min-height: 4.75rem;
    padding-top: 0.65rem;
  }

  .bottom-nav__link {
    font-size: 0.72rem;
    gap: 0.35rem;
    padding: 0.65rem 0.5rem;
  }

  .bottom-nav__link svg {
    width: 1.35rem;
    height: 1.35rem;
  }
}

/* FAB-style center button (optional, for "Neue Rechnung") */
.bottom-nav__link--primary {
  color: #4a90e2;
}

.bottom-nav__link--primary svg {
  width: 1.75rem;
  height: 1.75rem;
}

/* Main content padding so nothing is hidden behind bottom nav */
.pb-bottom-nav {
  padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0)) !important;
}

@media (min-width: 768px) {
  .pb-bottom-nav {
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0)) !important;
  }
}

@media (min-width: 1025px) {
  .pb-bottom-nav {
    padding-bottom: inherit !important;
  }
}
