/* Tab bar. Phones: on every page, always on screen; scrolling down tucks it in a little
   (labels fold away), scrolling up opens it again. Desktop: hidden, except on the homepage,
   where it pops up once the visitor starts scrolling (body.is-focus, set by home.js). */
.tabs {
  position: fixed; z-index: 70; left: 0.6rem; right: 0.6rem; bottom: calc(0.6rem + env(safe-area-inset-bottom));
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  padding: 0.45rem 0.25rem; border-radius: 26px;
  background: rgb(255 255 255 / 0.62);
  -webkit-backdrop-filter: blur(18px) saturate(180%); backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgb(255 255 255 / 0.7);
  box-shadow: 0 10px 30px -12px rgb(20 19 17 / 0.3), inset 0 1px 0 rgb(255 255 255 / 0.6);
  font-family: "Geist", system-ui, sans-serif;
  transition: left 320ms cubic-bezier(0.23, 1, 0.32, 1), right 320ms cubic-bezier(0.23, 1, 0.32, 1), padding 320ms cubic-bezier(0.23, 1, 0.32, 1), border-radius 320ms cubic-bezier(0.23, 1, 0.32, 1);
}
.tabs a { display: grid; justify-items: center; align-content: center; min-height: 2.75rem; color: #5a5853; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.tabs a[aria-current] { color: #141311; }
.tabs a[aria-current] .tabs__i { color: #F95D2D; }
.tabs__i { width: 1.45rem; height: 1.45rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: width 320ms cubic-bezier(0.23, 1, 0.32, 1), height 320ms cubic-bezier(0.23, 1, 0.32, 1); }
.tabs__label { display: block; max-height: 1.1rem; margin-top: 0.1rem; overflow: hidden; font-size: 0.7rem; font-weight: 500; line-height: 1.1rem; transition: max-height 320ms cubic-bezier(0.23, 1, 0.32, 1), opacity 200ms ease, margin 320ms cubic-bezier(0.23, 1, 0.32, 1); }
.tabs__plus { width: 3.2rem; height: 3.2rem; margin: 0 auto; place-content: center; border-radius: 50%; background: #F95D2D; color: #fff !important; box-shadow: 0 6px 16px -6px rgb(249 93 45 / 0.7); transition: width 320ms cubic-bezier(0.23, 1, 0.32, 1), height 320ms cubic-bezier(0.23, 1, 0.32, 1); }
.tabs__plus .tabs__i { stroke: #fff; }

/* tucked in, while scrolling down */
.tabs--min { left: 1.4rem; right: 1.4rem; padding: 0.2rem 0.25rem; border-radius: 22px; }
.tabs--min .tabs__label { max-height: 0; margin-top: 0; opacity: 0; }
.tabs--min .tabs__i { width: 1.3rem; height: 1.3rem; }
.tabs--min .tabs__plus { width: 2.7rem; height: 2.7rem; }

/* desktop: a centred bar, out of sight until the homepage asks for it */
@media (min-width: 801px) {
  .tabs, .tabs--min { left: 50%; right: auto; width: 25rem; bottom: 1.25rem; padding: 0.4rem 0.5rem; border-radius: 26px;
    transform: translate(-50%, calc(100% + 2rem)); opacity: 0; visibility: hidden; pointer-events: none;
    transition: transform 460ms cubic-bezier(0.23, 1, 0.32, 1), opacity 260ms ease, visibility 0s linear 460ms; }
  .tabs--min .tabs__label { max-height: 1.1rem; margin-top: 0.1rem; opacity: 1; }
  .tabs--min .tabs__i { width: 1.45rem; height: 1.45rem; }
  .tabs--min .tabs__plus { width: 3.2rem; height: 3.2rem; }
  .is-focus .tabs { transform: translate(-50%, 0); opacity: 1; visibility: visible; pointer-events: auto;
    transition: transform 460ms cubic-bezier(0.23, 1, 0.32, 1), opacity 260ms ease, visibility 0s; }
  @media (hover: hover) { .tabs a:not(.tabs__plus):hover { color: #141311; } }
}
@media (prefers-reduced-motion: reduce) { .tabs, .tabs * { transition: none !important; } }
