:root {
  --bottom-nav-height: 3.5rem;
}

/* Keep the end of the page clear of the fixed bottom navigation on phones */
body {
  padding-bottom: calc(var(--bottom-nav-height) + 1rem);
}

@media (min-width: 768px) {
  body {
    padding-bottom: 0;
  }
}

.bottom-nav {
  height: var(--bottom-nav-height);
}

/* Tab bar: icon above a small label */
.bottom-nav .nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--bs-secondary-color);
  font-size: 0.75rem;
  line-height: 1.2;
}

.bottom-nav .nav-link.active {
  color: var(--bs-primary);
}

.bottom-nav .bi {
  font-size: 1.35rem;
}

/* Bootstrap's navbar only darkens the active link; blue matches the bottom navigation */
.top-nav {
  --bs-navbar-active-color: var(--bs-primary);
}

.top-nav .nav-link {
  display: flex;
  gap: 0.4rem;
}

/* The people icon is the toggle, so the browser's disclosure triangle is left out */
.portions summary {
  cursor: pointer;
  list-style: none;
}

.portions summary::-webkit-details-marker {
  display: none;
}

.category-heading {
  border-left: 0.3rem solid var(--category-color);
  padding-left: 0.5rem;
}

.week-grid {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 992px) {
  .week-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
}

/* A shadow, because the flush list group resets the left border */
.shopping-row {
  box-shadow: inset 0.2rem 0 0 var(--category-color, transparent);
}

.shopping-category {
  background-color: color-mix(in srgb, var(--category-color) 10%, var(--bs-body-bg));
}

.shopping-category::before {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.4rem;
  border-radius: 50%;
  background-color: var(--category-color);
  content: '';
}

/* Styled from the checkbox itself, so a tap strikes the row through before the page refreshes */
.shopping-row:has(.form-check-input:checked) {
  opacity: 0.5;
}

.shopping-row:has(.form-check-input:checked) .shopping-row-text {
  text-decoration: line-through;
}
