/* React Bits GooeyNav layout, adapted for the shared city guide.
   https://reactbits.dev/c/components/gooey-nav
   Copyright (c) 2026 David Haz; /city-gooey-nav.LICENSE.txt. */
/* Section links jump past the itinerary stack without playing its scroll sequence. */
html:has([data-city-gooey-nav]) { scroll-behavior: auto; }

.city-guide-nav {
  --city-guide-reading-gap: 18px;
  position: relative;
  z-index: 5;
  margin-top: -28px;
  overflow-x: clip;
  pointer-events: none;
}

.city-guide-nav > .wrap {
  display: flex;
  justify-content: center;
  padding-inline: 20px;
}

.gooey-nav {
  --gn-pad: 6px;
  --gn-gap: 4px;
  --gn-font: 14px;
  --gn-x: 20px;
  --gn-y: 13px;
  --gn-frame: #fff;
  --gn-frame-shadow: 0 3px 8px rgb(0 0 0 / 12%);
  --gn-ink: #262626;
  --gn-muted: #626262;
  --gn-pill: #ab372f;
  --gn-active-ink: #fff;
  position: relative;
  display: inline-flex;
  max-width: 100%;
  font-size: var(--gn-font);
  line-height: 1.2;
  isolation: isolate;
  pointer-events: auto;
}

.gooey-nav--framed {
  padding: var(--gn-pad);
  border-radius: 999px;
  background: var(--gn-frame);
  box-shadow: var(--gn-frame-shadow);
}

.gooey-nav__viewport {
  max-width: 100%;
  min-width: 0;
}

.gooey-nav__stage {
  position: relative;
  width: max-content;
  min-width: 100%;
}

.gooey-nav__canvas,
.gooey-nav__fallback {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}

.gooey-nav__fallback {
  display: none;
  border-radius: 999px;
  background: var(--gn-pill);
}

.gooey-nav__list {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  gap: var(--gn-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.gooey-nav__list--active {
  position: absolute;
  inset: 0;
  color: var(--gn-active-ink);
  visibility: hidden;
  clip-path: inset(100%);
  pointer-events: none;
  user-select: none;
}

.gooey-nav__item { display: flex; }

.gooey-nav__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: var(--gn-y) var(--gn-x);
  border: none;
  border-radius: 999px;
  background: none;
  color: var(--gn-muted);
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color .2s ease;
  -webkit-tap-highlight-color: transparent;
}

.gooey-nav__list--active .gooey-nav__link { color: inherit; }
.gooey-nav__item[data-active] .gooey-nav__link { color: var(--gn-ink); }
.gooey-nav:not([data-gooey-ready]) .gooey-nav__item[data-active] .gooey-nav__link {
  color: var(--gn-active-ink);
  background: var(--gn-pill);
}

.gooey-nav__link:focus-visible {
  outline: 2px solid var(--gn-pill);
  outline-offset: 3px;
}

@media (hover: hover) {
  .gooey-nav__link:hover { color: var(--gn-ink); }
  .gooey-nav__list--active .gooey-nav__link:hover { color: inherit; }
}

/* This fixed directory occupies the existing page margin, never a layout column. */
.city-directory {
  --directory-accent: #ab372f;
  position: fixed;
  z-index: 40;
  top: 50%;
  right: var(--directory-right, 20px);
  transform: translateY(-50%);
  color: #444;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
}

.city-directory[hidden],
.city-directory__panel[hidden],
.city-directory__preview[hidden] { display: none; }

.city-directory__desktop {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 5.5px;
  width: 44px;
  min-height: 102px;
  padding: 5px 3px;
  color: #727272;
  font-size: 11px;
  line-height: 1.3;
}

.city-directory__rail { display: flex; flex-direction: column; width: 38px; }
.city-directory__tick {
  display: flex;
  align-items: center;
  box-sizing: border-box;
  width: calc(100% + 22px);
  height: 14px;
  margin-inline-start: -22px;
  padding-inline-start: 22px;
  border-radius: 3px;
}
.city-directory__mark {
  --directory-mark-color: #d8d8d8;
  --directory-hover-color: #514842;
  --directory-rise: 0;
  display: block;
  width: 20px;
  height: 3px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--directory-mark-color), var(--directory-hover-color) calc(var(--directory-rise) * 100%));
  transform-origin: right center;
  transform: scale(calc(1 + .44 * var(--directory-rise)), calc(1 + .24 * var(--directory-rise)));
}
.city-directory__tick:nth-child(2) .city-directory__mark { width: 24px; }
.city-directory__tick:nth-child(3) .city-directory__mark { width: 22px; }
.city-directory__tick:nth-child(4) .city-directory__mark { width: 27px; }
.city-directory__mark[data-current] {
  --directory-mark-color: var(--directory-accent);
  --directory-hover-color: var(--directory-accent);
  width: 30px;
}

.city-directory__preview {
  position: absolute;
  top: var(--directory-preview-top, 50%);
  right: calc(100% + 14px);
  width: max-content;
  max-width: 210px;
  padding: 10px 14px;
  border: 1px solid #eee9e4;
  border-radius: 10px;
  background: #fff;
  color: #302925;
  box-shadow: 0 3px 8px rgb(45 30 20 / 8%), 0 12px 24px -10px rgb(45 30 20 / 22%);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  opacity: var(--directory-preview-opacity, 0);
  transform: translateX(var(--directory-preview-x, 6px)) translateY(-50%) scale(var(--directory-preview-scale, .97));
  transform-origin: right center;
  pointer-events: none;
}

.city-directory__panel {
  position: absolute;
  top: 50%;
  right: calc(100% + 10px);
  width: 220px;
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - var(--directory-header-height, 64px) - 48px);
  padding: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateY(-50%);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 8px rgb(0 0 0 / 14%);
}

.city-directory__heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-left: 9px; margin-bottom: 4px; color: #666; font-size: 12px; }
.city-directory__close { display: grid; place-items: center; flex: none; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #666; font: inherit; font-size: 23px; line-height: 1; cursor: pointer; }
.city-directory__links { display: flex; flex-direction: column; }
.city-directory__link { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 9px; border-radius: 6px; color: #444; text-decoration: none; font-size: 14px; font-weight: 400; line-height: 1.45; }
.city-directory__link::before { flex: none; width: 12px; height: 2px; border-radius: 1px; background: #ddd; content: ""; }
.city-directory__link[aria-current] { color: var(--directory-accent); font-weight: 600; }
.city-directory__link[aria-current]::before { background: var(--directory-accent); }
.city-directory__link:hover, .city-directory__close:hover { background: #f4f4f4; }
.city-directory :is(button, a):focus-visible { outline: 2px solid var(--directory-accent); outline-offset: 3px; }
.city-directory__tick:focus-visible { outline-offset: 0; }
.city-directory__trigger, .city-directory[data-layout="corner"] .city-directory__desktop { display: none; }

.city-directory[data-layout="corner"] {
  top: auto;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  transform: none;
}
.city-directory[data-layout="corner"] .city-directory__trigger { display: flex; align-items: center; justify-content: center; gap: 9px; min-width: 91px; min-height: 44px; padding: 10px 15px; border: 1px solid #ddd; border-radius: 999px; background: #fff; color: #555; font: inherit; font-size: 12px; cursor: pointer; }
.city-directory__icon { display: flex; flex-direction: column; width: 14px; gap: 3px; }
.city-directory__icon .city-directory__mark { width: 12px; height: 2px; }
.city-directory[data-layout="corner"] .city-directory__panel { top: auto; right: 0; bottom: calc(100% + 12px); width: 240px; transform: none; }

@media (pointer: coarse) {
  .city-directory__close { width: 44px; height: 44px; }
}

@media (max-width: 620px) {
  .city-guide-nav > .wrap { padding-inline: 16px; }
  .gooey-nav { --gn-x: 12px; --gn-font: 13px; }
  .gooey-nav__viewport {
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 999px;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .gooey-nav__viewport::-webkit-scrollbar { display: none; }
  /* The liquid canvas must not add empty space to the horizontal scroll range. */
  .gooey-nav__stage { overflow: clip; }
}

@media (prefers-reduced-motion: reduce) {
  .gooey-nav__link { transition: none; }
}

@media print {
  .city-guide-nav, .city-directory { display: none; }
}
