/* goto.css — the Go to section of the 4D Chicago drawer. Owned by js/goto.js; walk.css
   stays the base and its older .jump-* rules are overridden here at equal or higher
   specificity (walk.css loads first). Both themes through the tokens in walk.css :root /
   [data-theme="light"]; interactive surfaces are color-mixed from --ink so a hover reads
   as a step up on the dark panel and the light one alike. */

/* ---- head: search, pills, toggle ------------------------------------------------ */
.jump-head { margin-bottom: 6px; }
.jump-field { margin-bottom: 10px; }
.jump-search-wrap { position: relative; display: block; color: var(--ink-dim); }
.jump-search-wrap > svg {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  pointer-events: none;
}
.jump-field .jump-search-wrap input[type="search"] {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px 8px 32px;
  border: 1px solid var(--edge);
  border-radius: 10px;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color .12s, background .12s;
}
.jump-field .jump-search-wrap input[type="search"]:hover { background: color-mix(in srgb, var(--ink) 9%, transparent); }
.jump-field .jump-search-wrap input[type="search"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.jump-field .jump-search-wrap input[type="search"]::placeholder { color: var(--ink-dim); opacity: .8; }
.jump-touch .jump-field .jump-search-wrap input[type="search"] { min-height: 44px; font-size: 15px; }

.jump-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}
.jump-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 3px 9px;
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 5%, transparent);
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
.jump-pill:hover { background: color-mix(in srgb, var(--ink) 11%, transparent); }
.jump-pill:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.jump-pill[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #1d1a14;
  font-weight: 600;
}
/* The light theme's accent is a dark amber, so the pressed pill's text flips light. */
[data-theme="light"] .jump-pill[aria-pressed="true"] { color: #faf8f3; }
.jump-pill:disabled { opacity: .45; cursor: default; }
.jump-pill-n {
  font-size: 10px;
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
}
.jump-pill[aria-pressed="true"] .jump-pill-n { color: inherit; opacity: .75; }
.jump-pill-n:empty { display: none; }
.jump-touch .jump-pill { min-height: 38px; padding: 6px 13px; font-size: 12.5px; }

.jump-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 30px;
  margin: 0 0 6px;
  padding: 2px 0;
  color: var(--ink-dim);
  font-size: 11.5px;
  cursor: pointer;
  user-select: none;
}
.jump-toggle input[type="checkbox"] { width: 16px; height: 16px; margin: 0; flex: none; accent-color: var(--accent); }
.jump-toggle b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.jump-toggle:hover { color: var(--ink); }
.jump-touch .jump-toggle { min-height: 44px; font-size: 12.5px; }
.jump-touch .jump-toggle input[type="checkbox"] { width: 20px; height: 20px; }

/* ---- the list: fills the pane, the drawer's own column scrolls -------------------- */
.jump-results {
  min-height: 160px;
  max-height: none;
  margin: 0 -15px;
  overflow: visible;
  border: 0;
  border-radius: 0;
}
.jump-group {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0;
  padding: 9px 15px 5px;
  background: var(--panel-solid);
  color: var(--ink-dim);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .1em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--edge);
}
.jump-group-n { font-weight: 500; letter-spacing: 0; font-variant-numeric: tabular-nums; opacity: .8; }

.jump-result {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 6px 15px;
  border: 0;
  border-top: 1px solid color-mix(in srgb, var(--edge) 55%, transparent);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
  transition: background .12s;
}
.jump-group + .jump-result { border-top: 0; }
.jump-result:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.jump-result:focus-visible,
.jump-result.is-active {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.jump-result.is-active { z-index: 0; }
.jump-touch .jump-result { min-height: 48px; padding: 8px 15px; }
@media (pointer: coarse) { .jump-result { min-height: 44px; } }

.jump-main { display: grid; min-width: 0; gap: 1px; }
.jump-result .jump-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.3;
}
.jump-result small.jump-sub {
  flex: none;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-dim);
  font-size: 11px;
  line-height: 1.3;
}
.jump-side { display: grid; justify-items: end; gap: 3px; }
.jump-result small.jump-dist {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 1em;
  color: var(--ink-dim);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: right;
}
.jump-arrow {
  display: inline-block;
  width: 11px;
  height: 11px;
  color: var(--accent);
  transform: rotate(var(--turn, 0deg));
  transition: transform .22s cubic-bezier(.4, 0, .2, 1);
}
.jump-arrow svg { display: block; width: 100%; height: 100%; }
.jump-result small.conf { flex: none; margin-left: 0; font-size: 9px; padding: 0 6px; line-height: 15px; }

.jump-empty {
  margin: 0;
  padding: 22px 15px;
  color: var(--ink-dim);
  font-size: 12.5px;
  line-height: 1.5;
}

/* ---- notes ---------------------------------------------------------------------- */
#jump-note { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--edge); }
.jump-legend .conf { margin: 0 1px; font-size: 9px; vertical-align: 0; }

/* ---- phone: pills scroll in one row, snapping ------------------------------------ */
@media (max-width: 560px) {
  .jump-pills {
    flex-wrap: nowrap;
    margin: 0 -15px 10px;
    padding: 0 15px 4px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .jump-pills::-webkit-scrollbar { display: none; }
  .jump-pill { flex: none; scroll-snap-align: start; }
}

@media (prefers-reduced-motion: reduce) {
  .jump-pill, .jump-result, .jump-arrow, .jump-field .jump-search-wrap input[type="search"] { transition: none; }
}
