/* Left-hand icon sidebar on the Pi's touchscreen / a laptop; becomes a
   fixed bottom tab bar on phone widths, since a hidden hamburger menu is
   worse to reach one-handed than a row of large tap targets. */

.app-shell {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  width: 88px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--spacing-unit) * 2) 0;
  background-color: var(--color-surface);
  border-right: 1px solid var(--color-border);
}

.app-sidebar__list {
  display: flex;
  flex-direction: column;
  gap: calc(var(--spacing-unit) / 2);
}

.app-sidebar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--spacing-unit) / 2);
  min-height: var(--touch-target-min);
  padding: calc(var(--spacing-unit)) calc(var(--spacing-unit) / 2);
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.7rem;
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

.app-sidebar__item--active {
  color: var(--color-primary);
}

.app-sidebar__icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-sidebar__signout {
  margin-top: auto;
}

.app-content {
  flex: 1;
  min-width: 0;
}

@media (max-width: 720px) {
  .app-shell {
    flex-direction: column;
  }

  .app-sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    flex-direction: row;
    padding: calc(var(--spacing-unit) / 2) 0;
    border-right: none;
    border-top: 1px solid var(--color-border);
    z-index: 10;
  }

  .app-sidebar__list {
    flex-direction: row;
    flex: 1;
    justify-content: space-around;
  }

  .app-sidebar__signout {
    margin-top: 0;
  }

  .app-content {
    padding-bottom: 72px;
  }
}
