/* Motion module "nav-pill": one sliding pill per dropdown. Static pills (hover tint, current tint, 4 px gap) stay without the module. */
.motion-nav-pill .nav-pill {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  z-index: var(--z-base);
  block-size: 0;
  border-radius: var(--radius-s);
  background-color: var(--color-nav-hover);
  opacity: 0;
  pointer-events: none;
  transition: transform 230ms cubic-bezier(0.3, 0.75, 0.25, 1), opacity 160ms ease-out;
}

.motion-nav-pill .nav__sublist > li {
  position: relative;
  z-index: var(--z-content);
}

/* The pill carries the tint; the current entry stays semibold (nav.css). */
.motion-nav-pill .nav__sublink:hover,
.motion-nav-pill .nav__sublink[aria-current] {
  background-color: transparent;
}

/* First navigation level: one pill behind the items of the main nav, sized by width (the radius stays a true pill). */
.motion-nav-pill .nav {
  position: relative;
}

.motion-nav-pill .nav-pill--top {
  inline-size: 0;
  border-radius: var(--radius-pill);
  transition: transform 230ms cubic-bezier(0.3, 0.75, 0.25, 1), inline-size 230ms cubic-bezier(0.3, 0.75, 0.25, 1), block-size 230ms cubic-bezier(0.3, 0.75, 0.25, 1), opacity 160ms ease-out;
}

.motion-nav-pill .nav__link:hover,
.motion-nav-pill .nav__toggle[aria-expanded='true'] {
  background-color: transparent;
}
