/*
  Floating glass navigation — the bar sits above the bottom edge like the
  new iOS tab bar, with a frosted pill and a soft highlight on the active tab.
*/

.navbar {
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 20;

  display: flex;
  align-items: stretch;
  gap: 4px;

  width: min(340px, calc(100% - 32px));
  height: 64px;
  padding: 6px;

  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.62);
  box-shadow:
    0 12px 34px rgba(60, 95, 120, 0.20),
    0 2px 6px rgba(60, 95, 120, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);

  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);

  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-item {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;

  border-radius: 20px;
  text-decoration: none;
  color: #8a7a66;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.2px;

  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.nav-item svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
  opacity: 0.6;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-item span {
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

/* the frosted chip behind the tab you are on */
.nav-item.active {
  background: rgba(255, 255, 255, 0.92);
  color: #a97539;
  box-shadow:
    0 2px 10px rgba(150, 105, 55, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.nav-item.active svg { opacity: 1; transform: translateY(-1px); }
.nav-item.active span { opacity: 1; }

.nav-item:active { transform: scale(0.96); }

/* keep page content clear of the floating bar */
.has-navbar { padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px)); }
