/* Shared agent conversation styling: guide message, capability tags, chat composer, and question thread.
   Load after each page's own CSS. Pages may set --agent-avatar-bg and --agent-avatar-fg. */
.agent-msg { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 16px; }
.agent-avatar { display: grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px; color: var(--agent-avatar-fg, var(--ws-on-accent, #102219)); background: var(--agent-avatar-bg, var(--ws-accent, var(--accent, #bce8c5))); font-family: var(--ws-display, inherit); font-size: .6875rem; font-weight: 700; letter-spacing: .02em; box-shadow: 0 0 0 3px var(--ws-accent-soft, #bce8c51f); }
.agent-bubble { min-width: 0; padding: 12px 16px; border: 1px solid var(--ws-line, #ffffff20); border-radius: 4px 16px 16px 16px; background: var(--ws-surface, #19231c); }
.phase .agent-bubble p { margin: 0; color: var(--ws-text, #ecf0e9); font-size: .9375rem; line-height: 1.6; }
.phase .agent-bubble .agent-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 4px; font-family: var(--ws-display, inherit); font-size: .8125rem; font-weight: 600; }
.agent-state { display: inline-flex; align-items: center; gap: 6px; padding: 1px 9px; border: 1px solid color-mix(in srgb, var(--ws-accent, #bce8c5) 40%, transparent); border-radius: 999px; color: var(--ws-accent, var(--accent, #bce8c5)); background: var(--ws-accent-soft, #bce8c51f); font-family: var(--ws-body, inherit); font-size: .75rem; font-weight: 500; }
.agent-pulse { position: relative; width: 7px; height: 7px; border-radius: 50%; background: #5fe08a; }
.agent-pulse::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 1px solid #5fe08a; animation: agent-pulse 1.8s ease-out infinite; }
@keyframes agent-pulse { from { opacity: .9; transform: scale(.6); } to { opacity: 0; transform: scale(1.8); } }

.agent-skills { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 22px 52px; padding: 0; list-style: none; }
.agent-skills li { padding: 2px 10px 2px 8px; border: 1px dashed var(--ws-line-strong, #ffffff40); border-radius: 6px; color: var(--ws-muted, #b0bdb2); font-size: .8125rem; }
.agent-skills li::before { content: "✓"; margin-right: 6px; color: var(--ws-accent, var(--accent, #bce8c5)); }

/* Single-question pages: the submit button sits inside the field like a send button. */
.quick-questions:has(+ .composer-label) { margin-bottom: 14px; }
.composer-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.field.composer { align-items: center; padding-left: 4px; border-radius: 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.field.composer #location-submit { display: inline-flex; width: auto; flex-shrink: 0; gap: 6px; min-height: 44px; margin: 6px; padding: 0 16px; border-radius: 11px; }
.composer + .question-heading { margin: 10px 0 0; }

/* App-choice step: the visitor's input as a chat bubble, then the guide's reply. */
.thread { display: grid; gap: 14px; margin: 0 0 22px; }
.thread .user-bubble { justify-self: end; max-width: 85%; margin: 0; padding: 10px 16px; border: 0; border-radius: 16px 4px 16px 16px; color: var(--ws-on-accent, #102219) !important; background: var(--ws-accent, var(--accent, #bce8c5)); font-weight: 500; white-space: pre-line; }
.thread .agent-msg { margin: 0; }

@media (max-width: 480px) {
  .agent-skills { margin-left: 0; }
  .agent-avatar { width: 34px; height: 34px; border-radius: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .agent-pulse::after { animation: none; }
}
@media (forced-colors: active) {
  .agent-bubble, .thread .user-bubble, .agent-avatar { border: 1px solid CanvasText; }
}
