/* One street, three zooms (src/app/zoom/zoom.ts): the one quiet row under the top bar on a car and on a pair, the
   shell's `trail` (app.css, `.trail`: the bar's second line on a phone, a row that scrolls away with room). After
   app.css; it never redefines a token. */

/* ‹, then where one is; at its end the two neighbours. One line, always: a long trail scrolls sideways, its end in view. */
.zoom-row { display: flex; align-items: center; min-width: 0; height: 44px; padding-right: var(--pad); }
.zw-where { flex: 0 1 auto; display: flex; align-items: center; min-width: 0; height: 100%; }
/* Its chevron's ink stands on the gutter, under the wordmark. */
.zw-out { position: relative; flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin-left: calc(var(--pad) - 14px); border-radius: var(--r-pill); color: var(--ink); text-decoration: none; }
.zw-out .ic { width: 20px; height: 20px; }
/* Its end in view without a script: a row laid out from the right starts scrolled to its end. */
.zw-scroll { flex: 0 1 auto; display: flex; flex-direction: row-reverse; min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
  /* What runs off its start fades out; the trail's own first step stands clear of the fade. */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 10px); mask-image: linear-gradient(to right, transparent, #000 10px); }
.zw-scroll::-webkit-scrollbar { display: none; }
.zw-trail { flex: none; display: flex; align-items: center; margin: 0; padding: 0 2px 0 10px; list-style: none; white-space: nowrap; font: 600 0.8125rem/1 var(--body); }
.zw-trail li { flex: none; display: flex; align-items: center; }
.zw-trail a, .zw-trail [aria-current] { display: inline-flex; align-items: center; min-height: 44px; padding: 0 3px; }
.zw-trail a { color: var(--soft); text-decoration: none; }
.zw-trail [aria-current] { color: var(--ink); }
.zw-sep { padding: 0 3px; color: var(--soft); font-weight: 400; opacity: 0.55; }

/* The neighbours: two quiet steps; with room, their names. */
/* Grouped by a hairline, so that they never read as the way out at the start of the row. */
.zw-nears { position: relative; flex: none; display: flex; align-items: center; margin-left: auto; }
.zw-nears::before { content: ""; position: absolute; inset: 6px 0; border: 1px solid var(--line); border-radius: var(--r-pill); pointer-events: none; }
.zw-near { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 1px; min-width: 44px; height: 44px; padding: 0 4px; border-radius: var(--r-pill); color: var(--ink); font: 600 0.8125rem/1 var(--body); text-decoration: none; white-space: nowrap; }
.zw-near .ic { flex: none; width: 20px; height: 20px; }
.zw-near.is-end { color: var(--soft); opacity: 0.35; }
.zw-near-name, .zw-dot { display: none; }
.zw-near-name { max-width: 14ch; overflow: hidden; text-overflow: ellipsis; color: var(--soft); }
.zw-dot { color: var(--soft); opacity: 0.55; }
@media (min-width: 600px) {
  .zw-near-name, .zw-dot { display: inline; }
  .zw-near.is-prev { padding-right: 8px; }
  .zw-near.is-next { padding-left: 8px; }
  .zw-near.is-end { min-width: 32px; }
}
/* What is scrolled to, or sticks under the bar, keeps clear of the row on a phone by itself: `--bar-h` counts it there
   (app.css). */

.zw-out:active, .zw-near:not(.is-end):active { background: var(--line); }
@media (hover: hover) {
  .zw-trail a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
  .zw-out:hover, .zw-near:not(.is-end):hover { background: color-mix(in srgb, var(--ink) 7%, transparent); }
  .zw-near:not(.is-end):hover .zw-near-name { color: var(--ink); }
}
