/* Task Helper — place search on the maps (job-intake.md §19, BRIEF-784). Namespace: .thms-
 * App tokens (--card, --ink, --muted, --line, --accent, --err, --hover). class+element selectors so they
 * win over index.html's bare button/input rules. §14.7: visible focus ring, ≥ 44 px on touch. */
@import url('/overlay/maptools.css');   /* the ONE style for every map tool (BRIEF-872) — must stay the first rule */

/* Places control: its button's look and where the panel opens are maptools.css — nothing per control here. */
.thms-panel { background:var(--card); color:var(--ink);
              border:1px solid var(--line); border-radius:12px; box-shadow:0 6px 24px rgba(20,28,40,.25); padding:8px; font-size:14px; cursor:auto; }
.thms-row { display:flex; gap:6px; align-items:center; }
.thms-panel input.thms-q { flex:1 1 auto; min-width:0; width:auto; padding:8px 10px; font-size:16px; border-radius:8px; }   /* 16px: no iPhone zoom */
.thms-panel button.thms-go { flex:none; width:auto; padding:8px 12px; font-size:14px; }
.thms-panel button.thms-x { flex:none; width:36px; height:36px; padding:0; font-size:15px; background:transparent; color:var(--muted); border:0; }
.thms-panel button.thms-x:hover { background:var(--hover); color:var(--ink); }
.thms-list { list-style:none; margin:6px 0 0; padding:0; max-height:min(45vh, 320px); overflow:auto; }
.thms-list:empty { display:none; }
.thms-list li { display:grid; grid-template-columns:1fr auto; column-gap:8px; padding:8px; border-radius:8px; cursor:pointer; }
.thms-list li[aria-selected="true"], .thms-list li:hover { background:var(--hover); }
.thms-list li[aria-selected="true"] { box-shadow:inset 3px 0 0 var(--accent); }
.thms-main { font-weight:600; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.thms-rest { grid-column:1; font-size:12px; color:var(--muted); min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.thms-kind { grid-column:2; grid-row:1; align-self:start; font-size:11px; color:var(--muted); border:1px solid var(--line); border-radius:6px; padding:1px 6px; }
.thms-status { margin:6px 2px 0; font-size:13px; }
.thms-status:empty { display:none; }
.thms-status.thms-err { color:var(--err); font-weight:600; }
.thms-pin { animation:thms-pulse 1.4s ease-out 3; width:22px; height:22px; border-radius:50%; background:#e0245e; border:3px solid #fff; box-shadow:0 0 0 2px rgba(224,36,94,.35), 0 1px 4px rgba(0,0,0,.4); }
.thms-panel button:focus-visible, .thms-panel input:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
@media (pointer: coarse) {
  .thms-panel input.thms-q, .thms-panel button.thms-go { min-height:44px; }
  .thms-panel button.thms-x { width:44px; height:44px; }
  .thms-list li { min-height:44px; }
}

/* The Map view's one search: a dropdown under the top search box (Tasks, then Places). */
.thms-dd { position:fixed; z-index:1200; background:var(--card); color:var(--ink); border:1px solid var(--line); border-radius:12px;
           box-shadow:0 6px 24px rgba(20,28,40,.25); padding:6px; font-size:14px; max-height:min(60vh, 420px); overflow:auto; box-sizing:border-box; }
.thms-dd[hidden] { display:none; }
.thms-h { margin:6px 8px 2px; font-size:11px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:var(--muted); }
.thms-it { display:grid; grid-template-columns:1fr auto; column-gap:8px; padding:8px; border-radius:8px; cursor:pointer; min-height:36px; }
.thms-it[aria-selected="true"], .thms-it:hover { background:var(--hover); }
.thms-it[aria-selected="true"] { box-shadow:inset 3px 0 0 var(--accent); }
.thms-msg { margin:6px 8px; font-size:13px; color:var(--muted); }
@media (pointer: coarse) { .thms-it { min-height:44px; } }

/* GADDR: Google's required credit, shown only under Google's suggestions */
.thms-attr { margin:4px 8px 6px; font-size:11px; letter-spacing:.02em; color:var(--muted); text-align:right; }
.thms-attr[hidden] { display:none; }

@keyframes thms-pulse { 0% { box-shadow:0 0 0 2px rgba(224,36,94,.35), 0 1px 4px rgba(0,0,0,.4); } 70% { box-shadow:0 0 0 14px rgba(224,36,94,0), 0 1px 4px rgba(0,0,0,.4); } 100% { box-shadow:0 0 0 2px rgba(224,36,94,.35), 0 1px 4px rgba(0,0,0,.4); } }
@media (prefers-reduced-motion: reduce) { .thms-pin { animation:none; } }

/* PL3: a result a source greys (a lot hidden under a higher plan's copy of it): still there and pickable, but plainly second best */
.thms-it.thms-dim { opacity: .55; }
.thms-it.thms-dim .thms-main { font-style: italic; }
