/*
 * site-map-nav.css — Previous / Next strip (site map order from links.html / All links hub).
 * Depends on stables.css (.btn) loaded first.
 */

.site-map-nav {
  width: 100%;
  max-width: 680px;
  margin: 0 auto 3rem;
  padding: 1.75rem clamp(12px, 4vw, 28px) 0;
}

/* When the page has a fixed minimal footer, keep the nav above it */
body:has(.site-chrome-footer--minimal) .site-map-nav {
  margin-bottom: calc(var(--site-footer-minimal-h, 96px) + 28px);
}

.site-map-nav .buttons.site-map-nav__buttons {
  justify-content: space-between;
  width: 100%;
  gap: 12px;
}

.site-map-nav .btn {
  /* Row layout: share horizontal space. In column layout, override flex (see mobile) or flex-basis becomes height and flex-grow stretches buttons. */
  flex: 1 1 160px;
  max-width: 260px;
  min-height: 64px;
  height: auto;
  padding: 10px 12px;
  text-align: center;
}

.site-map-nav__dir {
  display: block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.site-map-nav__target {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.25;
}

.site-map-nav__disabled {
  opacity: 0.4;
  pointer-events: none;
  cursor: default;
}

@media (max-width: 768px) {
  .site-map-nav {
    margin-bottom: 1.75rem;
    padding-top: 1.25rem;
  }

  .site-map-nav .buttons.site-map-nav__buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .site-map-nav .btn {
    /* Prevent vertical flex-grow when column is inside a tall flex parent (Android). */
    flex: 0 0 auto;
    max-width: none;
    width: 100%;
    min-height: 52px;
    padding: 8px 12px;
    justify-content: center;
  }

  .site-map-nav__dir {
    margin-bottom: 0.25rem;
  }

  .site-map-nav__target {
    font-size: 0.875rem;
    line-height: 1.2;
  }
}
