/* Any address (#39): live lookup sheet. Tokens and components come from app.css (web/DESIGN.md). */

.suggest .aa-opt, #cmdk-list .aa-opt { border-top: 1px solid var(--sep-2); border-radius: 0 0 8px 8px; margin-top: 4px; }
.suggest .aa-opt:first-child, #cmdk-list .aa-opt:first-child { border-top: 0; border-radius: 8px; margin-top: 0; }
.aa-opt .addr { color: var(--accent); }

html.aa-lock { overflow: hidden; }
.aa-scrim { position: fixed; inset: 0; z-index: 120; display: flex; justify-content: flex-end; background: rgb(0 0 0 / .32); animation: fade .2s ease-out both; }
.aa-scrim[hidden] { display: none; }
.aa-scrim.closing { opacity: 0; transition: opacity .2s ease; }
.aa-sheet { position: relative; width: min(720px, 100%); height: 100%; background: var(--bg); display: flex; flex-direction: column; box-shadow: 0 24px 64px rgb(0 0 0 / .2); animation: aa-in .25s ease-out both; overflow: hidden; }
@keyframes aa-in { from { transform: translateX(24px); opacity: 0; } }

.aa-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 16px 8px 24px; padding-top: max(16px, env(safe-area-inset-top)); }
.aa-head h2 { font-size: var(--fs-m); font-weight: 600; }
.aa-x { border: 0; background: var(--fill); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; flex: none; color: var(--label-2); }
.aa-x .ico { width: 16px; height: 16px; }
.aa-search { display: flex; align-items: center; gap: 8px; margin: 8px 24px; padding: 0 4px 0 14px; height: 52px; border: 1px solid var(--sep); border-radius: var(--radius); }
.aa-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.aa-search input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font-size: 17px; color: var(--label); }
.aa-search .btn { min-height: 42px; }

.aa-body { flex: 1; overflow: auto; padding: 16px 24px 32px; overscroll-behavior: contain; }
.aa-nla { padding: 12px 24px calc(12px + env(safe-area-inset-bottom)); font-size: 13px; color: var(--label-2); background: var(--fill); border-top: 1px solid var(--sep-2); }
.aa-nla b { color: var(--label); font-weight: 600; }

.aa-loading { display: flex; align-items: center; gap: 10px; font-size: var(--fs-s); color: var(--label-2); }
.aa-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--sep-2); border-top-color: var(--label-2); animation: aa-spin .8s linear infinite; }
@keyframes aa-spin { to { transform: rotate(1turn); } }
.aa-msg { margin-top: 16px; font-size: var(--fs-s); color: var(--label-2); }
.aa-msg.warn { color: var(--unknown); }
.aa-msg .ico { display: none; }
.aa-msg b { font-weight: 600; }
.aa-ask { margin-top: 14px; }
.aa-covered { display: grid; gap: 12px; margin-top: 16px; font-size: var(--fs-s); }
.aa-covered b { font-weight: 600; }
.aa-cities { display: flex; flex-wrap: wrap; gap: 0 12px; color: var(--label-2); }

.aa-place h3 { font-size: 22px; font-weight: 600; letter-spacing: -.015em; }
.aa-place .addr-meta { margin-top: 4px; }
.aa-place .addr-meta .off { color: var(--label-3); }
.aa-scope { margin-top: 8px; font-size: var(--fs-s); color: var(--unknown); }

.aa-facts { margin-top: 28px; }
.aa-facts:empty { display: none; }
.aa-facts header h3 { font-size: var(--fs-m); font-weight: 600; }
.aa-facts header p { font-size: var(--fs-s); color: var(--label-2); }
.aa-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.aa-field { display: grid; gap: 6px; min-width: 0; }
.aa-field.aa-wide { grid-column: 1 / -1; }
.aa-lab { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: var(--fs-s); font-weight: 500; color: var(--label-2); }
.aa-n { font-size: 13px; font-weight: 400; color: var(--label-3); white-space: nowrap; }
.aa-n.res { color: var(--unknown); }
.aa-n.dep { color: var(--soon); }
.aa-field input { width: 100%; height: 44px; border: 1px solid var(--sep); border-radius: 10px; padding: 0 12px; font-size: 16px; color: var(--label); background: var(--bg); }
.aa-field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.aa-field input:invalid:not(:placeholder-shown):not(:focus) { border-color: var(--unknown); }
.aa-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; padding: 2px; border-radius: 9px; background: #eeeef0; }
.aa-seg button { min-height: 36px; border: 0; background: none; border-radius: 7px; font-size: 14px; font-weight: 500; color: var(--label); cursor: pointer; }
.aa-seg button[aria-checked="true"] { background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .12); }

.aa-results { margin-top: 24px; transition: opacity .18s ease; }
.aa-results.aa-stale { opacity: .5; pointer-events: none; }
.aa-prompt { font-size: var(--fs-s); color: var(--unknown); }
.aa-prompt.ok { color: var(--applies); }
.aa-answers { margin-top: 16px; }

@media (max-width: 640px) {
  .aa-scrim { align-items: flex-end; }
  .aa-sheet { width: 100%; height: calc(100% - 24px - env(safe-area-inset-top)); border-radius: 14px 14px 0 0; animation-name: aa-up; }
  .aa-head { padding: 12px 12px 4px 16px; }
  .aa-x { width: 44px; height: 44px; }
  .aa-search { margin: 8px 16px; }
  .aa-body { padding: 12px 16px 24px; }
  .aa-nla { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 380px) { .aa-grid { grid-template-columns: 1fr; } }
@keyframes aa-up { from { transform: translateY(24px); opacity: 0; } }

/* building details: optional, behind one tap (the answers ask what they need) */
.aa-more { margin-top: 24px; border-top: 1px solid var(--sep-2); }
.aa-more > summary { display: flex; align-items: center; min-height: 48px; font-size: 15px; font-weight: 600; color: var(--accent); }
.aa-more .aa-facts { margin-top: 4px; }
.aa-sheet .topics.group { box-shadow: none; padding: 0; background: none; }
.aa-more .aa-facts header h3 { display: none; }
