/* The EasiRoute assistant (js/assistant.js): a small chip under the amber attention bar and a slim panel it opens.
   Quiet by design: pale easipac green, no animation, no sound, hidden completely when there is nothing to say. */
/* max-width: the page is never narrower than 1100px (#app), so in a narrower window the row stops at the window's edge and the chip and the panel stay in view */
.assist-bar { position: relative; display: flex; justify-content: flex-end; padding: 3px 14px; background: var(--page); border-bottom: 1px solid var(--line-soft);
  box-sizing: border-box; max-width: 100vw; }
.assist-bar[hidden] { display: none; }
.assist-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--blue-tint); color: var(--navy); border: 1px solid var(--blue-tint-2); border-radius: 12px;
  padding: 1px 10px; min-height: 22px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.assist-chip:hover { background: var(--blue-tint-2); }
.assist-chip.open { border-color: var(--blue-link); }
.assist-chip:focus-visible, .assist-link:focus-visible, .assist-open:focus-visible { outline: 2px solid var(--blue-link); outline-offset: 2px; }
.assist-chip svg { color: var(--blue-link); }

/* z-index 1005: over PLANNING's floating controls (the map's orders toggle is 1000) and under every dialog (.scrim 1010, app.css), popover and toast */
.assist-panel { position: absolute; right: 12px; top: 100%; z-index: 1005; width: min(340px, calc(100vw - 24px)); max-height: min(70vh, calc(100vh - 150px));
  display: flex; flex-direction: column; background: var(--page); color: var(--text); border: 1px solid var(--line-strong); border-radius: 6px;
  box-shadow: 0 4px 16px var(--sh-card); font-size: 13px; }
.assist-panel[hidden] { display: none; }
.assist-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 8px 12px; border-bottom: 1px solid var(--line-soft); background: var(--blue-tint); border-radius: 6px 6px 0 0; }
.assist-date { color: var(--muted-2); font-weight: 400; }
.assist-body { overflow: auto; padding: 4px 12px 10px; }
.assist-h { margin: 10px 0 4px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); font-weight: 700; }
.assist-lines { list-style: none; margin: 0; padding: 0; }
.assist-lines li { padding: 5px 0; border-bottom: 1px solid var(--line-soft); line-height: 1.35; }
.assist-lines li:last-child { border-bottom: 0; }
.assist-link { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 0; font: inherit; color: var(--blue-link); cursor: pointer; line-height: 1.35; }
.assist-link:hover { text-decoration: underline; }
.assist-card { border: 1px solid var(--line); border-radius: 4px; padding: 8px 10px; margin: 6px 0; background: var(--grid-head); }
.assist-card-title { font-weight: 700; color: var(--text-strong); }
.assist-card-text { margin-top: 2px; line-height: 1.35; }
.assist-quote { margin: 6px 0 0; padding: 4px 8px; border-left: 3px solid var(--lime); background: var(--surface); color: var(--text-strong); font-style: italic; overflow-wrap: anywhere; }
.assist-quote-label { font-style: normal; color: var(--muted-2); }
.assist-detail { margin-top: 4px; font-size: 12px; color: var(--muted-2); }
.assist-open { background: none; border: 0; padding: 0; margin-top: 4px; font: inherit; font-size: 12px; color: var(--blue-link); cursor: pointer; text-decoration: underline; }
.assist-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.assist-recent { margin-top: 10px; font-size: 12px; }
.assist-recent summary { cursor: pointer; color: var(--muted-2); }
.assist-done { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line-soft); }
.assist-foot { margin: 8px 0 0; font-size: 11px; color: var(--muted); line-height: 1.35; }
@media (max-width: 700px) {
  /* a narrow window: the chip and the panel hang from the left edge, where the visible part of the page is */
  .assist-bar { padding: 3px 8px; justify-content: flex-start; }
  .assist-panel { left: 8px; right: auto; width: min(340px, 94vw); max-height: 70vh; }
}
@media (prefers-reduced-motion: no-preference) { .assist-chip { transition: background-color .12s; } }
