/* The Ask box (js/ask.js): a button in the top bar and a panel down the right-hand side. It is not a modal (no scrim), so the planner stays usable to its
   left; 340 px leaves 1000 px of a 1366 px screen. The panel is plain, in the assistant panel's colours: no gradients, no emoji, no sound.
   The BUTTON is the one exception (Sam, 26 Oct 2026: "a Siri like vibe so it sticks out"): a glowing orb and a slowly turning colour ring, still when the
   person has asked for less motion. In white and easipac lime (Sam: "skip the rainbow, make it white and green light"). */
@property --ask-a { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes ask-spin { to { --ask-a: 360deg; } }
@keyframes ask-glow { 0%, 100% { box-shadow: 0 0 10px 1px rgba(178,216,81,.55); } 50% { box-shadow: 0 0 15px 3px rgba(255,255,255,.5); } }
.top-icon.ask-btn { position: relative; isolation: isolate; width: auto; padding: 0 18px 0 12px; margin: 7px 8px; gap: 9px; font: inherit; font-size: 14px; font-weight: 700;
  border-radius: 20px; background: rgba(6,26,17,.55); box-shadow: 0 0 18px rgba(178,216,81,.3); opacity: 1; }
.top-icon.ask-btn::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; padding: 1.5px;
  background: conic-gradient(from var(--ask-a), #FFFFFF, #DDF0A8, #B2D851, #EEF8D2, #FFFFFF);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: ask-spin 4s linear infinite; }
.top-icon.ask-btn:hover { background: rgba(6,26,17,.75); box-shadow: 0 0 24px rgba(178,216,81,.5); }
.ask-orb { flex: none; position: relative; width: 20px; height: 20px; border-radius: 50%;
  background: conic-gradient(from var(--ask-a), #FFFFFF, #DDF0A8, #B2D851, #EEF8D2, #FFFFFF); animation: ask-spin 3s linear infinite, ask-glow 2.4s ease-in-out infinite; }
.ask-orb::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.95), rgba(255,255,255,.2) 45%, transparent 70%); }
.ask-btn .ask-btn-text { letter-spacing: .02em; }
.ask-btn.open { background: rgba(6,26,17,.9); }
.ask-btn:focus-visible { box-shadow: 0 0 0 2px #fff, 0 0 18px rgba(178,216,81,.5); }
@media (prefers-reduced-motion: reduce) { .ask-orb, .top-icon.ask-btn::before { animation: none; } }

/* 1005: over PLANNING's floating controls (the map's orders toggle is 1000), level with the assistant's panel, under every dialog (.scrim 1010, app.css), popover and toast */
.ask-panel { position: fixed; top: 54px; right: 0; bottom: 0; z-index: 1005; width: min(340px, 100vw); display: flex; flex-direction: column; box-sizing: border-box;
  background: var(--page); color: var(--text); border-left: 1px solid var(--line-strong); box-shadow: -4px 0 16px var(--sh-card); font-size: 13px; }
.ask-panel[hidden] { display: none; }
.ask-head { flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; border-bottom: 1px solid var(--line-soft); background: var(--blue-tint); }
.ask-title { flex: 1; min-width: 0; }
.ask-day { color: var(--muted-2); font-weight: 400; font-size: 12px; }
.ask-clear { background: none; border: 0; padding: 2px 6px; font: inherit; font-size: 12px; color: var(--blue-link); border-radius: 3px; }
.ask-clear:hover:not(:disabled) { text-decoration: underline; }
.ask-clear:disabled { color: var(--disabled); }
.ask-clear:focus-visible, .ask-starter:focus-visible { outline: 2px solid var(--blue-link); outline-offset: 2px; }
.ask-notice { flex: none; margin: 8px 12px 0; padding: 8px 10px; border: 1px solid var(--note-line); background: var(--warning-tint); color: var(--amber-text); border-radius: 4px; line-height: 1.35; }
.ask-notice[hidden] { display: none; }
.ask-log { flex: 1; min-height: 0; overflow: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; }
.ask-empty p { margin: 4px 0 10px; line-height: 1.4; color: var(--muted-2); }
.ask-starters { display: flex; flex-direction: column; gap: 6px; }
.ask-starter { text-align: left; background: var(--page); border: 1px solid var(--line-strong); border-radius: 4px; padding: 7px 10px; font: inherit; color: var(--blue-link); line-height: 1.3; }
.ask-starter:hover:not(:disabled) { background: var(--blue-tint); }
.ask-starter:disabled { color: var(--disabled); cursor: not-allowed; }
.ask-turn { display: flex; flex-direction: column; gap: 2px; max-width: 100%; }
.ask-who { font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted-2); font-weight: 700; }
.ask-text { padding: 7px 10px; border: 1px solid var(--line); border-radius: 4px; line-height: 1.4; overflow-wrap: anywhere; }
.ask-text p { margin: 0; }
.ask-text p + p, .ask-text p + ul, .ask-text p + ol, .ask-text ul + p, .ask-text ol + p { margin-top: 6px; }
.ask-text ul, .ask-text ol { margin: 0; padding-left: 18px; }
.ask-text li + li { margin-top: 2px; }
.ask-user .ask-text { background: var(--blue-tint); border-color: var(--blue-tint-2); color: var(--text-strong); white-space: pre-wrap; }
.ask-answer .ask-text { background: var(--page); }
.ask-note .ask-text { background: var(--danger-tint); border-color: var(--danger-line); color: var(--danger-ink); }
.ask-thinking .ask-text { color: var(--muted-2); }
.ask-foot { flex: none; padding: 8px 12px 10px; border-top: 1px solid var(--line-soft); background: var(--grid-head); }
.ask-box { display: flex; gap: 8px; align-items: flex-end; }
.ask-input { flex: 1; min-width: 0; resize: none; height: auto; max-height: 120px; }
.ask-send { flex: none; height: 32px; }
.ask-hint { margin: 6px 0 0; font-size: 11px; color: var(--muted); line-height: 1.35; }

/* A small job the answer proposes (js/ask.js, easiroute/askact.py), under the answer's words: the job in words and [Do it] [Cancel] while it waits, then the done line, or why it was not done.
   The card look is the assistant panel's; a cancelled or run-out card is greyed, a refused one is pale red, a done one pale green. */
.ask-acts { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.ask-act { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line-strong); border-radius: 4px; padding: 8px 10px; background: var(--grid-head); font-size: 13px; }
.ask-act-text { line-height: 1.4; color: var(--text-strong); overflow-wrap: anywhere; }
.ask-act-btns { display: flex; gap: 8px; }
.ask-act-state { font-size: 12px; line-height: 1.35; color: var(--muted-2); overflow-wrap: anywhere; }
.ask-act.is-working { opacity: .85; }
.ask-act.is-done { background: var(--success-tint); border-color: var(--ok-wash-line); }
.ask-act.is-done .ask-act-state { color: var(--text-strong); }
.ask-act.is-cancelled, .ask-act.is-expired { background: var(--page); border-style: dashed; }
.ask-act.is-cancelled .ask-act-text, .ask-act.is-expired .ask-act-text { color: var(--muted); }
.ask-act.is-failed { background: var(--danger-tint); border-color: var(--danger-line); }
.ask-act.is-failed .ask-act-state { color: var(--danger-ink); }
@media (max-width: 700px) { .ask-panel { width: 100vw; } }
/* Docked (9 Nov 2026, Sam: "push everything to the left rather than cover up the buttons"): while the panel is open the screen below the top bar
   is narrowed by the panel's width, so nothing is hidden under it. On a phone-width window it still covers the screen. */
@media (min-width: 701px) {
  body.ask-docked .view-host { margin-right: 340px; }
  body.ask-docked .ask-panel { box-shadow: none; }
}
