/* Shared mobile-app navigation. Page styles supply the theme variables. */
:root {
  --bottom-nav-height: 68px;
  --bottom-nav-line: var(--line, #deded7);
  --bottom-nav-surface: var(--surface, #fff);
  --bottom-nav-ink: var(--ink, #252620);
  --bottom-nav-muted: var(--muted, #777970);
  --bottom-nav-active: var(--lime-deep, #66862b);
}

.bottom-nav {
  position: fixed;
  z-index: 8;
  right: 20px;
  bottom: 18px;
  left: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: 116px;
  height: 52px;
  margin: auto;
  padding: 7px 12px;
  border: 1px solid var(--bottom-nav-line);
  border-radius: 999px;
  background: var(--bottom-nav-surface);
  box-shadow: 0 8px 24px #2526201b;
}

.bottom-nav a { display: none; }
.bottom-nav .bottom-search-link { display: block; }
.bottom-nav a,
.bottom-nav button {
  min-width: 64px;
  padding: 1px 9px 0;
  color: var(--bottom-nav-muted);
  font-size: .63rem;
  line-height: 1;
  text-align: center;
  text-decoration: none;
}

.bottom-nav span {
  display: block;
  margin-bottom: 2px;
  font-size: 1.3rem;
  line-height: 1.3;
}

.bottom-nav svg {
  display: block;
  width: 1em;
  height: 1em;
  margin-inline: auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bottom-nav button {
  border: 0;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
}

.bottom-nav a:hover,
.bottom-nav a:focus-visible,
.bottom-nav button:hover,
.bottom-nav button:focus-visible { color: var(--bottom-nav-ink); }
.bottom-nav a.selected,
.bottom-nav a[aria-current='page'] {
  color: var(--bottom-nav-active);
  font-weight: 600;
}

.bottom-nav a.selected span,
.bottom-nav a[aria-current='page'] span { color: var(--bottom-nav-ink); }

@media (max-width: 760px) {
  .app-page,
  .my-events-page,
  .auth-page {
    padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 18px);
  }

  .bottom-nav {
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    left: 16px;
    align-items: center;
    justify-content: space-between;
    width: auto;
    min-width: 0;
    max-width: 420px;
    min-height: 52px;
    height: 52px;
    margin: 0 auto;
    padding: 7px 8px;
    border-width: 1px;
    border-radius: 999px;
    box-shadow: 0 8px 24px #2526201b;
  }

  .bottom-nav a,
  .bottom-nav button,
  .bottom-nav .bottom-search-link {
    display: block;
    min-width: 48px;
    padding: 1px 2px 0;
    color: #979a91;
    font-size: .63rem;
    line-height: 1;
    text-align: center;
    text-decoration: none;
  }

  .bottom-nav span { margin-bottom: 2px; font-size: 1.18rem; line-height: 1.2; }
  .bottom-nav a.selected,
  .bottom-nav a[aria-current='page'] { color: var(--bottom-nav-active); font-weight: 600; }
  .bottom-nav a.selected span,
  .bottom-nav a[aria-current='page'] span { color: var(--bottom-nav-ink); }
}

@media (prefers-reduced-motion: reduce) {
  .bottom-nav { scroll-behavior: auto; transition: none; }
}

/* Keep the mobile app chrome compact and floating on every page. */
@media (max-width: 760px) {
  .bottom-nav {
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    left: 16px;
    align-items: center;
    justify-content: space-between;
    width: auto;
    min-width: 0;
    max-width: 420px;
    height: 52px;
    min-height: 52px;
    margin: 0 auto;
    padding: 7px 8px;
    border-width: 1px;
    border-radius: 999px;
    box-shadow: 0 8px 24px #2526201b;
  }

  .bottom-nav a,
  .bottom-nav button,
  .bottom-nav .bottom-search-link {
    min-width: 48px;
    padding: 1px 2px 0;
    font-size: .62rem;
    line-height: 1;
  }

  .bottom-nav span {
    margin-bottom: 2px;
    font-size: 1.18rem;
    line-height: 1.2;
  }
}
