/* The suggestion list of the address search (address-search.js), on the "Pin & Route"
   tokens of the page it sits on; the fallbacks are for the admin, which has none. The
   input itself is the page's own field. The list opens with a short drop from the field;
   closing and moving between options are instant (typed, arrowed through, seen many
   times a visit). A page widens the list by giving `.address-search` `position: static`
   inside its own positioned box. */
.address-search { position: relative; }
.address-search__panel {
  position: absolute; z-index: 30; left: -1px; right: -1px; top: calc(100% + .4rem); padding: .35rem;
  background: var(--surface, #fff); color: var(--ink, #1c1c1c);
  border: 1px solid var(--line, #e5e5e5); border-radius: var(--radius, 16px);
  box-shadow: var(--shadow-lg, 0 28px 60px -24px rgba(28,28,28,.32), 0 10px 20px -10px rgba(28,28,28,.16));
  transform-origin: top center;
  transition: opacity .15s cubic-bezier(.23,1,.32,1), transform .15s cubic-bezier(.23,1,.32,1);
}
@starting-style { .address-search__panel { opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  @starting-style { .address-search__panel { transform: translateY(-4px) scale(.98); } }
}
.address-search__panel[hidden] { display: none; }
.address-search__panel ul { list-style: none; margin: 0; padding: 0; }
.address-search__panel li {
  display: grid; grid-template-columns: 2.1rem minmax(0, 1fr); column-gap: .7rem; align-items: center;
  padding: .5rem .55rem; border-radius: calc(var(--radius, 16px) - .35rem); cursor: pointer; text-align: left;
}
.address-search__panel li[aria-selected="true"] { background: var(--tint, #fcf3f0); }
.address-search__panel li svg {
  grid-row: span 2; width: 2.1rem; height: 2.1rem; padding: .55rem; border-radius: 999px;
  background: var(--surface-2, #f3f3f3); color: var(--muted, #666);
}
.address-search__panel li[aria-selected="true"] svg { background: var(--tint-2, #fae3db); color: var(--orange-text, #cc4115); }
.address-search__main, .address-search__sub { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.address-search__main { font-weight: 500; line-height: 1.35; }
.address-search__main b { font-weight: 700; }
.address-search__sub { font-size: .82rem; line-height: 1.35; color: var(--muted, #666); }
.address-search__sub:empty { display: none; }
.address-search__panel li:has(.address-search__sub:empty) svg { grid-row: auto; }
.address-search__by {
  margin: .3rem .55rem .15rem; font: 500 .7rem/1.2 Roboto, 'Inter', system-ui, sans-serif;
  color: var(--muted, #666); text-align: right;
}
/* The admin's dark mode (Unfold sets `html.dark`); its pages carry none of our tokens. */
html.dark .address-search {
  --surface: #111827; --ink: #e5e7eb; --line: #374151; --muted: #9ca3af;
  --tint: #2a1a13; --tint-2: #3a241a; --surface-2: #1f2937; --orange-text: #ee7953;
}
