/* Agent launcher handoff (AGENT_LAUNCHER_PATTERN.md): the intro line, the answers summary, one tile per AI app,
   the fading "Prompt prepared" toast, and the "Prompt copied" confirmation. Load after workspace.css and the
   page's theme; colors come from the theme's --ws-* variables. The confirmations use the same green everywhere. */

/* "You'll chat with the agent in your own AI app." */
.agent-intro > p.handoff-note { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 0; color: var(--ws-muted, #cfe7e2); font-size: .9375rem; line-height: 1.55; }
.handoff-note svg { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--ws-accent, #aee9a9); }
.handoff-note strong { color: var(--ws-text, #fff); font-weight: 700; }
.phase-lead { margin: -14px 0 22px; color: var(--ws-muted, #cfe7e2); line-height: 1.6; }

/* The visitor's answers in one or two lines, with Edit. */
.answers-summary { display: flex; align-items: flex-start; gap: 12px; margin: -6px 0 22px; padding: 12px 14px; border: 1px solid var(--ws-line, #ffffff26); border-radius: 12px; background: var(--ws-surface, #ffffff08); }
.answers-summary .selected-location { flex: 1; min-width: 0; margin: 0; padding: 0; border: 0; background: none; color: var(--ws-muted, #cfe7e2) !important; font-size: .875rem; font-weight: 400; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; }
.answers-edit { flex: none; min-height: 32px; padding: 0 4px; border: 0; background: none; color: var(--ws-accent, #aee9a9); font: inherit; font-size: .875rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* One clear choice per app: the tile copies and opens; "Copy prompt only" is a small link under it. */
.harness-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; border: 0; }
.harness-grid > .app-choice { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 0; border: 0; background: none; box-shadow: none; }
.harness-grid > .app-choice > a { display: flex; flex: 1; align-items: center; gap: 12px; min-height: 72px; padding: 16px; border: 1px solid var(--ws-line-strong, #ffffff57); border-radius: 12px; background: var(--ws-surface, #ffffff0a); color: var(--ws-text, #fff); font-weight: 700; text-decoration: none; transition: border-color .18s, background .18s, transform .18s; }
.harness-grid > .app-choice > a:hover { border-color: var(--ws-accent, #aee9a9); background: var(--ws-accent-soft, #ffffff14); transform: translateY(-1px); }
.harness-grid > .app-choice > a[aria-disabled="true"] { opacity: .6; transform: none; }
.app-mark { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 10px; background: var(--ws-accent, #aee9a9); color: var(--ws-on-accent, #0b2130); }
.app-mark svg { width: 20px; height: 20px; }
.harness-grid > .app-choice small { display: block; margin-top: 2px; color: var(--ws-muted, #cfe7e2); font-size: .8125rem; font-weight: 400; line-height: 1.45; }
.app-arrow { width: 18px; height: 18px; margin-left: auto; flex: none; color: var(--ws-accent, #aee9a9); }
.harness-grid > .app-choice > .copy-prompt { display: inline-block; width: auto; min-height: 36px; margin: 0; padding: 0 4px; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--ws-muted, #cfe7e2); font: inherit; font-size: .8125rem; font-weight: 600; text-align: left; text-decoration: underline; text-underline-offset: 3px; align-self: flex-start; cursor: pointer; }
.harness-grid > .app-choice > .copy-prompt:hover { background: none; color: var(--ws-text, #fff); }
.harness-grid > .app-choice > .copy-prompt.is-copied { background: none; box-shadow: none; color: #86efac; text-decoration: none; }
.harness-grid > .app-choice > .copy-prompt:disabled { opacity: .5; cursor: default; }

/* "Prompt copied for <app>": one quiet confirmation line. */
.handoff { display: flex; align-items: center; gap: 14px; margin: 16px 0 0; padding: 14px 16px; border: 1px solid #86efac4d; border-radius: 12px; background: #86efac14; animation: handoff-in .3s cubic-bezier(.2, .7, .2, 1) both; }
.handoff[hidden] { display: none; }
.handoff-check { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; background: #86efac; color: #0b2a1f; }
.handoff-check svg { width: 18px; height: 18px; }
.handoff-body { flex: 1; min-width: 0; }
.handoff-body p { margin: 0; }
.handoff-title { color: var(--ws-text, #fff); font-weight: 700; }
#handoff-text { color: var(--ws-muted, #cfe7e2); font-size: .875rem; line-height: 1.5; }
#handoff-copy { flex: none; min-height: 36px; padding: 0 14px; border: 1px solid #86efac80; border-radius: 999px; background: none; color: var(--ws-text, #fff); font: inherit; font-size: .8125rem; font-weight: 700; cursor: pointer; }
#handoff-copy:hover { background: #86efac1f; }
.has-handoff #status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* "Prompt prepared": fades in when the app step opens, holds 3 seconds, fades out over 1.2 seconds. */
.prompt-toast { position: fixed; top: 88px; left: 50%; z-index: 60; display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 12px; border: 1px solid #86efac66; border-radius: 14px; background: #0b2a2ff2; box-shadow: 0 18px 50px #0007; color: #d1e7e0; font-size: .875rem; line-height: 1.4; transform: translateX(-50%); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.prompt-toast[hidden] { display: none; }
.prompt-toast > svg { width: 32px; height: 32px; padding: 7px; flex: none; border-radius: 50%; background: #86efac; color: #0b2a1f; }
.prompt-toast strong { display: block; color: #fff; font-size: 1rem; }
.prompt-toast.is-showing { animation: toast-in .35s cubic-bezier(.2, .7, .2, 1) both; }
.prompt-toast.is-leaving { animation: toast-out 1.2s ease-in-out both; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes toast-out { from { opacity: 1; } to { opacity: 0; transform: translate(-50%, -6px); } }
@keyframes handoff-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

@media (max-width: 560px) {
  .harness-grid { grid-template-columns: 1fr; }
  .handoff { flex-wrap: wrap; }
  #handoff-copy { margin-left: 46px; }
  .prompt-toast { top: 76px; width: calc(100% - 24px); }
}
@media (prefers-reduced-motion: reduce) {
  .prompt-toast.is-showing, .prompt-toast.is-leaving, .handoff { animation: none; }
  .harness-grid > .app-choice > a:hover { transform: none; }
}
@media (forced-colors: active) {
  .handoff, .answers-summary, .prompt-toast, .harness-grid > .app-choice > a { border: 1px solid CanvasText; }
}
