/*
 * Site dock: the "Canvas toolbar" design from /dock-ideas, replacing Framer's
 * dock component (.framer-xceoZ). Built by custom/dock.js.
 */

/* Hide Framer's dock and its fixed wrapper. */
.framer-xceoZ,
div:has(> .framer-xceoZ) {
  display: none !important;
}

.av-dock {
  --av-blue: #008ff0;
  --av-ink: #000;
  --av-ink-2: #5c5c5c;
  --av-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --av-open: 0.45s;
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 10;
  translate: -50% 0;
  display: flex;
  gap: 2px;
  padding: 6px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 10px 30px rgba(0, 0, 0, 0.08);
  font-family: Inter, "Inter Placeholder", system-ui, -apple-system, sans-serif;
  letter-spacing: -0.01em;
}
.av-dock a {
  position: relative;
  height: 40px;
  min-width: 40px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--av-ink-2);
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  text-decoration: none;
  transition: color 0.25s var(--av-ease), background 0.35s var(--av-ease);
}
.av-dock a.av-hover,
.av-dock a[aria-current] {
  color: var(--av-ink);
}
.av-dock a[aria-current] {
  background: #f4f1ec;
}
.av-dock a span {
  max-width: 0;
  margin-left: -8px; /* cancel the gap while closed so icons stay centred */
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  transition: max-width var(--av-open) var(--av-ease), margin-left var(--av-open) var(--av-ease),
    opacity 0.2s ease;
}
/* The current page shows its label; hovering another item previews its label
   instead, the way it will look once clicked. Hover is tracked in dock.js
   (.av-hover) rather than :hover, so labels resizing the items can't flip it. */
.av-dock a[aria-current] span,
.av-dock a.av-hover span {
  max-width: 90px;
  margin-left: 0;
  opacity: 1;
  transition: max-width var(--av-open) var(--av-ease), margin-left var(--av-open) var(--av-ease),
    opacity 0.3s ease 0.08s;
}
.av-dock.av-hovering a[aria-current]:not(.av-hover) span {
  max-width: 0;
  margin-left: -8px;
  opacity: 0;
  transition: max-width var(--av-open) var(--av-ease), margin-left var(--av-open) var(--av-ease),
    opacity 0.15s ease;
}
.av-dock a:focus-visible {
  outline: none;
  background: #e8eef5;
}
.av-dock a:focus-visible span { max-width: 90px; margin-left: 0; opacity: 1; }
.av-dock svg {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Selection frame: rests on the current page and follows the hovered item, like selecting a layer. */
.av-dock-sel {
  position: absolute;
  top: 6px;
  left: 0;
  height: 40px;
  width: 40px;
  border: 1.3px solid var(--av-blue);
  box-sizing: border-box;
  z-index: 2;
  pointer-events: none;
  will-change: transform, width; /* moved by a spring in dock.js */
}
.av-dock-sel i {
  position: absolute;
  width: 7px;
  height: 7px;
  background: #fff;
  border: 1.3px solid var(--av-blue);
}
.av-dock-sel i:nth-child(1) { top: -4px; left: -4px; }
.av-dock-sel i:nth-child(2) { top: -4px; right: -4px; }
.av-dock-sel i:nth-child(3) { bottom: -4px; left: -4px; }
.av-dock-sel i:nth-child(4) { bottom: -4px; right: -4px; }

@media (max-width: 520px) {
  .av-dock a[aria-current] span,
  .av-dock a.av-hover span {
    max-width: 0;
    margin-left: -8px;
    opacity: 0;
  }
}
@media (max-width: 520px), (hover: none) {
  .av-dock { width: min(360px, calc(100vw - 24px)); bottom: 16px; }
  .av-dock a { flex: 1; min-width: 0; height: 52px; padding: 4px; flex-direction: column; gap: 4px; font-size: 11px; }
  .av-dock a span, .av-dock a[aria-current] span, .av-dock a.av-hover span, .av-dock.av-hovering a[aria-current]:not(.av-hover) span { max-width: 90px; margin-left: 0; opacity: 1; }
  .av-dock-sel { height: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  .av-dock *,
  .av-dock-sel {
    transition-duration: 0s !important;
  }
}

/* The shared frame supplies the keyboard focus outline without a second overlapping box. */
.av-dock:has(a:focus-visible) .av-dock-sel { border-width: 2px; }

/* Option 29: playful tilt, with the item and selection frame staying aligned. */
.av-dock a svg {
  transition: transform 0.35s var(--av-ease), color 0.25s;
}
.av-dock a span,
.av-dock a[aria-current] span,
.av-dock a.av-hover span,
.av-dock.av-hovering a[aria-current]:not(.av-hover) span {
  transition: transform 0.35s var(--av-ease), max-width var(--av-open) var(--av-ease),
    margin-left var(--av-open) var(--av-ease), opacity 0.2s ease;
}
.av-dock a.av-hover svg,
.av-dock a:focus-visible svg {
  transform: translateY(-3px) rotate(-12deg);
  color: var(--av-blue);
}
.av-dock a.av-hover span,
.av-dock a:focus-visible span {
  transform: translateY(-1px);
}
@media (prefers-reduced-motion: reduce) {
  .av-dock a.av-hover svg,
  .av-dock a:focus-visible svg,
  .av-dock a.av-hover span,
  .av-dock a:focus-visible span { transform: none; }
}
