/* A section holding slides gives the full screen to the track. */
main > section:has(> ww-slides) {
  padding: 0;
  align-content: stretch;
  position: relative; /* anchors the nav so it doesn't scroll away */
}

/* Works without JS as a swipeable track; JS adds the nav. */
ww-slides {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  height: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;

  &::-webkit-scrollbar { display: none; }

  > article {
    scroll-snap-align: start;
    display: grid;
    align-content: center;
    padding: calc(var(--gutter) * 2) var(--gutter);
    padding-bottom: calc(var(--gutter) + 4rem); /* room for nav */
  }

  > nav {
    position: absolute;
    inset: auto var(--gutter) var(--gutter);
    display: flex;
    align-items: center;
    gap: 1rem;

    button {
      font: inherit;
      color: inherit;
      background: none;
      border: 2px solid currentColor;
      cursor: pointer;

      &:disabled { opacity: 0.25; cursor: default; }
      &:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
    }

    > button {
      width: 2.75rem;
      aspect-ratio: 1;
      line-height: 1;
    }

    > ol {
      display: flex;
      gap: 0.5rem;
      padding: 0;
      list-style: none;

      /* square "blocks", filled when current */
      button {
        display: block;
        width: 0.75rem;
        aspect-ratio: 1;
        padding: 0;
        transition: background 200ms;

        &[aria-current="true"] { background: var(--accent); border-color: var(--accent); }
      }
    }
  }
}
