/* Shared sticky in-page navigation used by Event pages and Member Workspace. */

.section-navigation {
  position: sticky;
  top: var(--section-navigation-sticky-offset, 0);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 auto;
  padding: 0.55rem clamp(0.8rem, 2vw, 1.25rem);
  overflow-x: auto;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: 0 8px 25px rgb(7 26 54 / 7%);
  isolation: isolate;
  scrollbar-width: thin;
}

.section-navigation::before,
.section-navigation::after {
  position: sticky;
  z-index: 2;
  flex: 0 0 2.4rem;
  align-self: stretch;
  margin-block: -0.55rem;
  content: "";
  pointer-events: none;
  transition: opacity 160ms ease;
}

.section-navigation::before {
  left: -0.8rem;
  margin-right: -3.4rem;
  background: linear-gradient(90deg, var(--color-surface) 28%, transparent);
}

.section-navigation::after {
  right: -0.8rem;
  background: linear-gradient(90deg, transparent, var(--color-surface) 72%);
}

.section-navigation.is-scroll-start::before,
.section-navigation.is-scroll-end::after {
  opacity: 0;
}

.section-navigation__label {
  flex: 0 0 auto;
  color: var(--color-text-muted);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-navigation ul {
  display: flex;
  gap: 0.15rem;
  align-items: center;
  min-width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
}

.section-navigation a {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  padding: 0.45rem 0.72rem;
  border-bottom: 2px solid transparent;
  color: var(--color-navy);
  font-size: 0.9rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.section-navigation a:hover,
.section-navigation a[aria-current="location"] {
  border-bottom-color: var(--color-accent);
  color: var(--color-accent);
}

.section-navigation a:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: -3px;
}

@media (max-width: 47.5rem) {
  .section-navigation {
    gap: 0.4rem;
  }

  .section-navigation:not(.section-navigation--keep-label)
    .section-navigation__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .section-navigation,
  .section-navigation::before,
  .section-navigation::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

@media print {
  .section-navigation {
    display: none !important;
  }
}
