/* ==========================================================================
   The floating bottom navigation ("dock") shared by the public site and the docs.
   Uses only the shared design tokens (tokens.css), so it follows the theme and accent everywhere.
   ========================================================================== */

/* room for the dock under the last line of every page */
body.has-dock {
  padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
}

.dock-wrap {
  position: fixed;
  inset: auto 0 max(14px, env(safe-area-inset-bottom, 0px)) 0;
  z-index: 70;
  display: flex;
  justify-content: center;
  padding: 0 12px;
  pointer-events: none; /* only the pill itself takes clicks */
}

.dock {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 3px;
  max-width: 100%;
  padding: 6px;
  border-radius: 22px;
  background: color-mix(in oklab, var(--surface) 84%, transparent);
  border: 1px solid color-mix(in oklab, var(--border-strong) 75%, transparent);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  backdrop-filter: blur(20px) saturate(1.5);
  box-shadow:
    0 22px 54px -14px rgb(0 0 0 / 0.55),
    0 2px 10px -2px rgb(0 0 0 / 0.25),
    inset 0 1px 0 rgb(255 255 255 / 0.06);
  animation: dock-in 0.55s var(--ease, cubic-bezier(0.2, 0, 0, 1)) both;
}
@keyframes dock-in {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }
}

.dock-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 13px;
  border-radius: 16px;
  color: var(--text-2);
  font: 600 13.5px/1 var(--font, system-ui, sans-serif);
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.16s, color 0.16s, transform 0.16s var(--ease, ease);
}
.dock-item:hover {
  color: var(--text);
  background: var(--surface-hover);
  text-decoration: none;
  transform: translateY(-2px);
}
.dock-item:active {
  transform: translateY(0) scale(0.97);
}
.dock-item[aria-current='page'] {
  color: var(--accent);
  background: var(--accent-soft);
}
.dock-item[aria-current='page']::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: translateX(-50%);
}
.dock-ic {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dock-sep {
  width: 1px;
  height: 24px;
  margin: 0 4px;
  background: var(--border);
}

.dock-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 16px;
  color: var(--on-accent);
  background: linear-gradient(135deg, var(--accent), var(--accent-2, var(--accent)));
  font: 700 13.5px/1 var(--font, system-ui, sans-serif);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 8px 22px -8px color-mix(in oklab, var(--accent) 70%, transparent);
  transition: transform 0.16s var(--ease, ease), filter 0.16s, box-shadow 0.16s;
}
.dock-cta:hover {
  color: var(--on-accent);
  text-decoration: none;
  filter: brightness(1.06);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -8px color-mix(in oklab, var(--accent) 80%, transparent);
}
.dock-cta:active {
  transform: translateY(0) scale(0.98);
}
/* signed-in state: the rocket icon is swapped for a small initials chip (JS toggles which one is hidden) */
.dock-cta .avatar {
  width: 22px;
  height: 22px;
  font-size: 10.5px;
  background: rgb(255 255 255 / 0.22);
  color: var(--on-accent);
}

:where(.dock-item, .dock-cta):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* phones: icons only (the current page keeps its label), so seven targets still fit and stay thumb-sized */
@media (max-width: 720px) {
  .dock {
    gap: 1px;
    padding: 5px;
    border-radius: 20px;
  }
  .dock-item {
    padding: 11px 12px;
  }
  .dock-item span {
    display: none;
  }
  .dock-item[aria-current='page'] span {
    display: inline;
  }
  .dock-sep {
    margin: 0 2px;
  }
  .dock-cta {
    padding: 11px 13px;
  }
  /* the label collapses like every other item's does, but the signed-in avatar stays - it's the icon-equivalent
     the rocket SVG plays for a signed-out visitor, and hiding it would leave an empty pill on a phone */
  .dock-cta span:not(.avatar) {
    display: none;
  }
}
@media (max-width: 400px) {
  .dock-item {
    padding: 11px 9px;
  }
  .dock-item[aria-current='page'] span {
    display: none;
  }
  .dock-item[aria-current='page']::after {
    bottom: 3px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dock {
    animation: none;
  }
  .dock-item,
  .dock-cta {
    transition: none;
  }
}
@media print {
  .dock-wrap {
    display: none;
  }
  body.has-dock {
    padding-bottom: 0;
  }
}

/* ---------- signed-in profile chip in the top bar (replaces "Sign in / Start free"; see dock.js) ---------- */
.account-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 38px;
  padding: 0 12px 0 4px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: color-mix(in oklab, var(--surface) 80%, transparent);
  color: var(--text);
  font: 600 13.5px/1 var(--font, system-ui, sans-serif);
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.16s, background 0.16s, transform 0.16s var(--ease, ease);
}
.account-chip:hover {
  text-decoration: none;
  border-color: color-mix(in oklab, var(--accent) 55%, var(--border-strong));
  background: var(--surface-hover);
  transform: translateY(-1px);
}
.account-chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.account-chip .avatar {
  width: 30px;
  height: 30px;
  font-size: 11.5px;
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--accent) 55%, transparent);
}
.account-chip .icon {
  color: var(--text-3);
  transition: transform 0.16s var(--ease, ease);
}
.account-chip:hover .icon {
  transform: translateX(2px);
  color: var(--accent-strong);
}
.dock-cta .avatar > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
@media (max-width: 640px) {
  .account-chip {
    padding: 0 4px;
  }
  .account-chip-label,
  .account-chip .icon {
    display: none;
  }
}
