loopable / web /src /assistant /assistant.css
fsanyoto's picture
Deploy AIOS web (React glide grid + FastAPI slice)
81a8217 verified
Raw History Blame
28.2 kB
/* ---------------------------------------------------------------------------
assistant/assistant.css β€” the AI assistant's chat surface (owner item 2).
The shape is borrowed, reference by reference: ChatGPT's centred column and
in-field composer. One persistent conversation fills the page.
The palette follows Loopable's existing tokens.
EVERY FONT SIZE IS A `--lp-fs-*` TOKEN AND EVERY COLOUR A `--lp-*` TOKEN.
Wave-21 R5 is gated app-wide over every CSS file under src, and a literal
here reds `web_ui` for the whole tree. No emojis, no ALL-CAPS chrome
(DESIGN.md R6).
AND DO NOT WRITE A GLOB IN THIS COMMENT: a star-star followed by a slash is
the CSS comment terminator, and `lightningcss` then dies far from the cause.
--------------------------------------------------------------------------- */
.as-chat {
position: relative;
display: flex;
width: 100%;
height: 100%;
min-width: 0;
overflow: hidden;
}
.as-memory {
position: relative;
flex: 0 0 auto;
display: flex;
flex-direction: column;
width: min(40%, calc(var(--lp-content-inset) * 18));
min-width: 0;
box-sizing: border-box;
border-left: var(--lp-hairline-width) solid var(--lp-line);
background: var(--lp-surface);
color: var(--lp-ink);
font-size: var(--lp-fs-xs);
line-height: var(--lp-lh);
}
.as-memory:focus { outline: none; }
.as-memory-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--lp-home-tile-inset);
padding: var(--lp-home-tile-inset) var(--lp-content-inset);
background: var(--lp-surface-2);
color: var(--lp-ink);
}
.as-memory-head h2 {
margin: 0;
font-size: var(--lp-fs-sm);
font-weight: var(--lp-fw-semibold);
}
.as-memory-button {
border: 0;
background: transparent;
font: inherit;
color: inherit;
padding: var(--lp-home-pagination-gap) calc(var(--lp-home-pagination-gap) * 2);
border-radius: var(--lp-r-sm);
color: var(--lp-muted);
cursor: pointer;
}
/* R112: Memory is one small icon. The word stays in the DOM as the accessible text and is hidden
by an off-box text indent; the glyph is an alpha mask over currentColor, so it follows the theme. */
.as-memory-open {
position: relative;
flex: 0 0 auto;
width: var(--lp-home-pagination-control-size);
height: var(--lp-home-pagination-control-size);
padding: 0;
overflow: hidden;
white-space: nowrap;
text-indent: 200%;
}
.as-memory-open::before {
content: "";
position: absolute;
inset: 0;
margin: auto;
width: 16px;
height: 16px;
background-color: currentColor;
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 2.5h7l2 2v9h-9z'/%3E%3Cpath d='M5.8 6.5h4.4M5.8 9h4.4M5.8 11.5h2.6'/%3E%3C/svg%3E") center / contain no-repeat;
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 2.5h7l2 2v9h-9z'/%3E%3Cpath d='M5.8 6.5h4.4M5.8 9h4.4M5.8 11.5h2.6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.as-memory-open[aria-expanded="true"] { color: var(--lp-ink); }
.as-memory-erase { color: var(--lp-red-deep); }
.as-memory-button:disabled { opacity: var(--lp-home-disabled-opacity); cursor: not-allowed; }
.as-memory-button:focus-visible {
outline: calc(var(--lp-hairline-width) * 2) solid var(--lp-blue-deep);
outline-offset: var(--lp-hairline-width);
}
@media (hover: hover) and (pointer: fine) {
.as-memory-button:hover:enabled { background: var(--lp-wash); }
}
.as-memory-list {
flex: 1 1 auto;
min-height: 0;
overflow-y: auto;
overflow-anchor: none;
scrollbar-gutter: stable;
padding: var(--lp-content-inset);
}
.as-memory-group + .as-memory-group { margin-top: var(--lp-section-gap); }
.as-memory-group h3 {
margin: 0 0 var(--lp-home-pagination-gap);
color: var(--lp-muted);
font-size: var(--lp-fs-xs);
font-weight: var(--lp-fw-semibold);
}
.as-memory-group ul { list-style: none; margin: 0; padding: 0; }
.as-memory-row { padding: var(--lp-home-pagination-inset) 0; }
.as-memory-row + .as-memory-row { border-top: var(--lp-hairline-width) solid var(--lp-line); }
.as-memory-text { margin: 0; overflow-wrap: anywhere; }
.as-memory-source {
margin: var(--lp-home-pagination-gap) 0;
color: var(--lp-muted);
font-size: var(--lp-fs-2xs);
}
.as-memory-actions {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: var(--lp-home-pagination-gap);
min-height: var(--lp-home-pagination-control-size);
font-size: var(--lp-fs-2xs);
}
.as-memory-empty { margin: 0; color: var(--lp-muted); }
.as-memory-problem { color: var(--lp-red-deep); font-size: var(--lp-fs-2xs); }
.as-memory-status {
min-height: 1lh;
margin: 0;
padding: var(--lp-home-pagination-gap) var(--lp-content-inset);
color: var(--lp-muted);
font-size: var(--lp-fs-2xs);
}
.as-memory-skeleton {
height: calc(var(--lp-content-inset) * 3);
border-radius: var(--lp-r-sm);
background: var(--lp-wash);
}
@media (max-width: 767px) {
.as-chat:has(> .as-memory) { flex-direction: column; }
.as-chat:has(> .as-memory) .as-conversation {
flex: 1 1 55%;
height: auto;
min-height: 0;
}
.as-memory {
flex: 1 1 45%;
width: 100%;
min-height: 0;
border-left: 0;
border-top: var(--lp-hairline-width) solid var(--lp-line);
}
}
/* ── ChatGPT's column ─────────────────────────────────────────────────────── */
.as-conversation {
flex: 1 1 auto;
min-width: 0;
height: 100%;
display: flex;
flex-direction: column;
overflow: hidden;
}
/* One measure, used by the stream, the dock and the opening state, so the
composer does not shift sideways when the first answer arrives. */
.as-column {
width: 100%;
max-width: 760px;
margin: 0 auto;
padding: 0 24px;
box-sizing: border-box;
}
.as-stream {
flex: 1 1 auto;
min-height: 0;
overflow-y: auto;
padding: 26px 0 8px;
overflow-anchor: none;
scrollbar-gutter: stable;
}
.as-dock {
flex: 0 0 auto;
padding: var(--lp-panel-inset) 0 calc(var(--lp-panel-inset) * 2);
background: transparent;
}
.as-opening {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 48px 0 24px;
box-sizing: border-box;
text-align: center;
}
.as-opening-p {
max-width: 52ch;
margin: 0 0 20px;
color: var(--lp-muted);
font-size: var(--lp-fs-sm);
line-height: var(--lp-lh);
}
.as-suggestions {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: calc(var(--lp-home-pagination-gap) * 2);
}
.as-suggestion {
border: 0;
background: transparent;
font: inherit;
color: inherit;
padding: calc(var(--lp-home-pagination-gap) * 2) var(--lp-home-tile-inset);
border-radius: var(--lp-r-md);
background: var(--lp-surface-2);
color: var(--lp-ink);
font-size: var(--lp-fs-xs);
line-height: var(--lp-lh);
overflow-wrap: anywhere;
cursor: pointer;
}
.as-suggestion:disabled { opacity: var(--lp-home-disabled-opacity); cursor: not-allowed; }
.as-suggestion:focus-visible {
outline: calc(var(--lp-hairline-width) * 2) solid var(--lp-blue-deep);
outline-offset: var(--lp-hairline-width);
}
@media (hover: hover) and (pointer: fine) {
.as-suggestion:hover:enabled { background: var(--lp-line); }
}
/* ── the messages ─────────────────────────────────────────────────────────── */
.as-message { margin: 0 0 22px; }
.as-turn { margin-bottom: 22px; }
.as-tool-step {
color: var(--lp-muted);
font-size: var(--lp-fs-2xs);
margin: 0;
}
.as-answer-pending:empty { display: none; }
.as-turn:has(.as-answer-pending:empty) { display: none; }
.as-turn > .as-message { margin-bottom: 0; }
.as-turn.is-new { animation: as-turn-enter 180ms ease-out; }
.as-notice {
padding: var(--lp-home-tile-inset);
border: var(--lp-hairline-width) solid var(--lp-line);
border-radius: var(--lp-r-md);
background: var(--lp-surface);
color: var(--lp-ink);
font-size: var(--lp-fs-xs);
line-height: var(--lp-lh);
overflow-wrap: anywhere;
}
.as-notice-sender { margin: 0 0 var(--lp-home-pagination-gap); color: var(--lp-muted); font-size: var(--lp-fs-2xs); }
.as-notice-subject { margin: 0; font-size: var(--lp-fs-sm); font-weight: var(--lp-fw-semibold); }
.as-notice-body { margin: var(--lp-home-pagination-inset) 0 0; }
.as-notice-open { display: inline-block; margin-top: var(--lp-home-pagination-inset); color: var(--lp-blue-solid); }
.as-notice-open:focus-visible {
outline: calc(var(--lp-hairline-width) * 2) solid var(--lp-blue-deep);
outline-offset: var(--lp-hairline-width);
}
/* C6: Approve is the inbox card's primary choice. Not now stays the quiet confirm button. */
.as-notice .as-confirm-actions { margin-top: var(--lp-home-pagination-inset); }
.as-notice .as-notice-approve {
border-radius: var(--lp-r-md);
background: var(--lp-primary);
color: var(--lp-surface);
}
.as-notice .as-confirm-button:disabled { opacity: var(--lp-home-disabled-opacity); }
@media (hover: hover) and (pointer: fine) {
.as-notice .as-notice-approve:hover:not(:disabled) { background: var(--lp-primary-hover); }
}
/* C22's facts share one containment layer; the turn owns entry motion. */
.as-ping {
padding: 16px;
border: 1px solid var(--lp-line);
border-radius: var(--lp-r-md);
background: var(--lp-surface);
color: var(--lp-ink);
font-size: var(--lp-fs-xs);
line-height: var(--lp-lh);
overflow-wrap: anywhere;
}
.as-ping-label { margin: 0 0 4px; color: var(--lp-muted); font-size: var(--lp-fs-2xs); }
.as-ping-title { margin: 0; font-size: var(--lp-fs-sm); font-weight: 600; }
.as-ping-facts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 16px; margin-top: 12px; }
.as-ping-fact { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.as-ping-reason,
.as-ping-action { margin: 12px 0 0; }
.as-ping-assigned { margin: 8px 0 0; color: var(--lp-muted); font-size: var(--lp-fs-2xs); }
.as-ping-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 12px; }
.as-ping-button {
border: 0;
background: transparent;
font: inherit;
color: inherit;
display: inline-flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
min-height: 32px;
padding: 4px 8px;
border-radius: var(--lp-r-sm);
text-decoration: none;
cursor: pointer;
}
.as-ping-actions .as-ping-button { color: var(--lp-muted); }
.as-ping-button:disabled { opacity: 0.65; cursor: not-allowed; }
.as-ping-button:focus-visible { outline: 2px solid var(--lp-blue-solid); outline-offset: 2px; }
.as-ping-result { margin: 8px 0 0; color: var(--lp-muted); font-size: var(--lp-fs-2xs); }
.as-ping-problem { color: var(--lp-red-deep); }
.as-ping-digest { margin: 12px 0 0; padding: 0; list-style: none; }
.as-ping-ticket { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0; }
.as-ping-ticket + .as-ping-ticket { border-top: 1px solid var(--lp-line); }
.as-ping-ticket a { flex-shrink: 0; color: var(--lp-blue-solid); }
.as-ping-picker {
min-width: 200px;
max-width: 320px;
padding: 4px;
border: 1px solid var(--lp-line);
border-radius: var(--lp-r-md);
background: var(--lp-surface);
color: var(--lp-ink);
font-size: var(--lp-fs-xs);
line-height: var(--lp-lh);
animation: as-ping-picker-enter 180ms ease-out;
}
.as-ping-person { display: flex; width: 100%; justify-content: flex-start; text-align: left; overflow-wrap: anywhere; }
.as-ping-skeleton { height: 32px; border-radius: var(--lp-r-sm); background: var(--lp-surface-2); }
.as-ping-empty { margin: 0; padding: 8px; color: var(--lp-muted); }
@keyframes as-ping-picker-enter {
from { opacity: 0; transform: translateY(-4px); }
to { opacity: 1; transform: translateY(0); }
}
@media (hover: hover) and (pointer: fine) {
.as-ping-button:hover:not(:disabled) { background: var(--lp-surface-2); color: var(--lp-ink); }
}
@media (prefers-reduced-motion: reduce) {
.as-ping-picker { animation: none; }
}
@keyframes as-turn-enter {
from { opacity: 0; transform: translateY(4px); }
to { opacity: 1; transform: translateY(0); }
}
.as-divider {
display: flex;
align-items: center;
gap: 12px;
margin: 24px 0;
color: var(--lp-muted);
font-size: var(--lp-fs-2xs);
overflow-wrap: anywhere;
}
.as-divider::before,
.as-divider::after { content: ""; flex: 1; border-top: 1px solid var(--lp-line); }
.as-door {
margin: 0 0 6px;
color: var(--lp-muted);
font-size: var(--lp-fs-2xs);
}
.as-skeleton {
width: 65%;
height: 20px;
margin: 0 0 22px;
border-radius: var(--lp-r-md);
background: var(--lp-surface-2);
}
.as-skeleton--idle { visibility: hidden; }
.as-typing {
display: flex;
align-items: center;
gap: calc(var(--lp-hairline-width) * 4);
min-height: calc(var(--lp-fs-sm) * var(--lp-lh));
}
.as-typing-dot {
width: calc(var(--lp-hairline-width) * 6);
height: calc(var(--lp-hairline-width) * 6);
border-radius: var(--lp-r-pill);
background: var(--lp-muted);
opacity: 0.5;
animation: as-typing-dot calc(var(--lp-motion-feedback-duration) * 6)
var(--lp-motion-feedback-easing) infinite;
}
.as-typing-dot:nth-child(2) { animation-delay: var(--lp-motion-feedback-duration); }
.as-typing-dot:nth-child(3) { animation-delay: calc(var(--lp-motion-feedback-duration) * 2); }
@keyframes as-typing-dot {
0%, 100% { opacity: 0.5; transform: translateY(0); }
50% { opacity: 1; transform: translateY(calc(var(--lp-hairline-width) * -2)); }
}
@media (prefers-reduced-motion: reduce) {
.as-typing-dot { animation: none; opacity: 1; transform: none; }
}
.as-confirm {
margin-top: 12px;
padding: 12px;
border: 1px solid var(--lp-line);
border-radius: var(--lp-r-md);
font-size: var(--lp-fs-xs);
line-height: var(--lp-lh);
}
.as-confirm > p { margin: 0 0 8px; }
.as-confirm-actions { display: flex; gap: 8px; }
.as-confirm-button,
.as-retry {
border: 0;
background: transparent;
font: inherit;
color: inherit;
cursor: pointer;
}
.as-confirm-button {
min-height: 32px;
padding: 6px 12px;
border-radius: var(--lp-r-md);
color: var(--lp-ink);
}
.as-confirm-delete { background: var(--lp-red-deep); color: var(--lp-surface); }
.as-confirm-button:disabled,
.as-retry:disabled { opacity: 0.65; cursor: not-allowed; }
.as-confirm-button:focus-visible,
.as-retry:focus-visible { outline: 2px solid var(--lp-blue-solid); outline-offset: 2px; }
.as-retry { padding: 0; text-decoration: underline; }
.as-confirm-result { margin: 8px 0 0; font-size: var(--lp-fs-xs); color: var(--lp-muted); }
.as-confirm .as-problem { margin: 8px 0 0; }
.as-write-report {
display: flex;
flex-wrap: wrap;
align-items: baseline;
gap: 8px;
margin: 8px 0 0;
color: var(--lp-muted);
font-size: var(--lp-fs-2xs);
}
.as-write-target { overflow-wrap: anywhere; }
.as-write-report a { color: var(--lp-blue-solid); }
@media (hover: hover) and (pointer: fine) {
.as-confirm-button:hover:not(:disabled) { background: var(--lp-surface-2); }
.as-confirm-delete:hover:not(:disabled) { background: var(--lp-red-deep); opacity: 0.9; }
}
.as-message--user {
display: flex;
justify-content: flex-end;
}
/* R110: the user's turn is a brand purple bubble with white text. White on --lp-primary measures 7.7 to 1. */
.as-bubble {
max-width: 78%;
margin: 0;
padding: 9px 14px;
/* 20px is half the 39px one-line height: one line reads as a pill, more lines get large corners. */
border-radius: calc(var(--lp-r-lg) * 2);
background: var(--lp-primary);
color: var(--lp-surface);
font-size: var(--lp-fs-sm);
line-height: var(--lp-lh);
white-space: pre-wrap;
overflow-wrap: anywhere;
}
/* No bubble and no "Assistant" label: the reference prints the answer as the
page's own prose, and a role label on every turn is the thing that makes a
chat read like a transcript instead of a reply. */
.as-message-text {
margin: 0;
color: var(--lp-ink);
font-size: var(--lp-fs-sm);
line-height: var(--lp-lh);
white-space: pre-wrap;
overflow-wrap: anywhere;
}
.as-message--assistant.is-refusal .as-message-text { color: var(--lp-muted); }
.as-numeric {
display: flex;
align-items: baseline;
gap: 8px;
margin: 10px 0 0;
}
.as-numeric-label { color: var(--lp-muted); font-size: var(--lp-fs-2xs); }
.as-numeric-value { color: var(--lp-ink); font-size: var(--lp-fs-md); font-weight: 650; }
.as-preview {
display: flex;
flex-direction: column;
gap: 2px;
margin-top: 12px;
padding: 9px 13px;
border: 1px solid var(--lp-line);
border-radius: var(--lp-r-md);
background: var(--lp-surface);
font: inherit;
text-align: left;
cursor: pointer;
}
.as-preview:hover { background: var(--lp-surface-2); }
.as-preview-name { color: var(--lp-ink); font-size: var(--lp-fs-xs); font-weight: 600; }
.as-preview-meta { color: var(--lp-blue-solid); font-size: var(--lp-fs-2xs); font-weight: 600; }
/* S72-T16 (C7, R98): a made file is one chip under the answer. An image shows below it, bounded. */
.as-artifacts {
display: flex;
flex-direction: column;
gap: 8px;
margin-top: 12px;
}
.as-artifact {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 8px;
max-width: 100%;
}
.as-artifact-row {
display: flex;
align-items: center;
gap: 16px;
max-width: 100%;
padding: 9px 13px;
border: 1px solid var(--lp-line);
border-radius: var(--lp-r-md);
background: var(--lp-surface);
}
.as-artifact-row:hover { background: var(--lp-surface-2); }
.as-artifact-open {
display: flex;
flex-direction: column;
gap: 2px;
min-width: 0;
color: inherit;
text-decoration: none;
}
.as-artifact-download {
color: var(--lp-blue-solid);
font-size: var(--lp-fs-2xs);
font-weight: 600;
text-decoration: none;
}
.as-artifact-download:hover { text-decoration: underline; }
.as-artifact-open:focus-visible,
.as-artifact-download:focus-visible {
outline: 2px solid var(--lp-blue-deep);
outline-offset: 2px;
border-radius: var(--lp-r-sm);
}
.as-artifact-image {
display: block;
width: auto;
height: auto;
max-width: min(100%, 28rem);
max-height: 18rem;
border: 1px solid var(--lp-line);
border-radius: var(--lp-r-md);
background: var(--lp-surface);
object-fit: contain;
}
/* ── R20: the thumbs, which the server reads back into the next turn ───────── */
.as-rate {
display: flex;
align-items: center;
gap: 4px;
margin-top: 10px;
}
/* R112: the sources line and the two thumbs share one quiet row under the answer. */
.as-answer-foot {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 4px 10px;
margin-top: 10px;
}
.as-answer-foot .as-rate { margin-top: 0; }
.as-answer-foot .as-citation:hover { color: var(--lp-muted); text-decoration: none; }
/* The sentence is the toggle: it keeps the footer's quiet type and only darkens on hover. */
.as-answer-foot .as-sources-btn { font-weight: inherit; text-align: left; line-height: inherit; }
.as-answer-foot .as-sources-btn:focus-visible {
outline: calc(var(--lp-hairline-width) * 2) solid var(--lp-blue-deep);
outline-offset: var(--lp-hairline-width);
}
.as-rate-btn {
width: 26px;
height: 26px;
display: inline-flex;
align-items: center;
justify-content: center;
border: 0;
border-radius: 6px;
background: transparent;
color: var(--lp-muted);
cursor: pointer;
}
.as-rate-btn svg {
fill: none;
stroke: currentColor;
stroke-width: 1.3;
stroke-linecap: round;
stroke-linejoin: round;
}
.as-rate-btn:hover { background: var(--lp-surface-2); color: var(--lp-ink); }
.as-rate-btn.is-on { background: var(--lp-blue-tint); color: var(--lp-blue-solid); }
.as-rate-why-said {
margin-left: 4px;
color: var(--lp-muted);
font-size: var(--lp-fs-2xs);
}
.as-rate-why {
display: flex;
gap: 6px;
margin-top: 6px;
}
.as-rate-input {
flex: 1 1 auto;
min-width: 0;
padding: 6px 10px;
border: 1px solid var(--lp-line);
border-radius: var(--lp-r-md);
background: var(--lp-surface);
color: var(--lp-ink);
font: inherit;
font-size: var(--lp-fs-2xs);
}
.as-rate-input:focus { outline: none; border-color: var(--lp-blue-solid); }
.as-rate-send {
flex: 0 0 auto;
padding: 6px 12px;
border: 1px solid var(--lp-line);
border-radius: var(--lp-r-md);
background: var(--lp-surface);
color: var(--lp-ink);
font: inherit;
font-size: var(--lp-fs-2xs);
font-weight: 600;
cursor: pointer;
}
.as-rate-send:hover { background: var(--lp-surface-2); }
.as-sources-btn {
padding: 0;
border: 0;
background: transparent;
color: var(--lp-muted);
font: inherit;
font-size: var(--lp-fs-2xs);
font-weight: 600;
cursor: pointer;
}
.as-sources-btn:hover { color: var(--lp-ink); }
.as-sources-list {
display: flex;
flex-direction: column;
gap: 4px;
margin-top: 6px;
}
.as-citation {
color: var(--lp-muted);
font-size: var(--lp-fs-2xs);
line-height: var(--lp-lh);
text-decoration: none;
overflow-wrap: anywhere;
}
.as-citation:hover { color: var(--lp-blue-solid); text-decoration: underline; }
.as-working { margin: 0 0 22px; }
.as-problem {
margin: 0 0 10px;
color: var(--lp-red-deep);
font-size: var(--lp-fs-2xs);
}
/* ── the composer ─────────────────────────────────────────────────────────── */
.as-field {
border: 1px solid var(--lp-line);
border-radius: var(--lp-r-home-tile);
background: var(--lp-surface-2);
padding: var(--lp-panel-inset) var(--lp-panel-inset) var(--lp-panel-inset) calc(var(--lp-panel-inset) * 2);
box-shadow: var(--lp-panel-shadow, var(--lp-home-tile-shadow));
}
.as-field:focus-within {
outline: var(--lp-hairline-width) solid var(--lp-blue-deep);
outline-offset: var(--lp-hairline-width);
}
.as-prompt {
display: block;
width: 100%;
max-height: 180px;
border: 0;
outline: none;
padding: 0 8px 0 0;
background: transparent;
color: var(--lp-ink);
font: inherit;
font-size: var(--lp-fs-sm);
line-height: var(--lp-lh);
resize: none;
box-sizing: border-box;
}
.as-prompt::placeholder { color: var(--lp-muted); }
.as-field-foot {
display: flex;
align-items: center;
gap: 12px;
margin-top: 8px;
}
.as-send {
flex: 0 0 auto;
margin-left: auto;
width: var(--lp-home-pagination-control-size);
height: var(--lp-home-pagination-control-size);
display: inline-flex;
align-items: center;
justify-content: center;
border: 0;
border-radius: var(--lp-r-pill);
font: inherit;
background: var(--lp-primary);
color: var(--lp-surface);
cursor: pointer;
transition: transform var(--lp-motion-feedback-duration) var(--lp-motion-feedback-easing);
}
.as-send svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.as-send:active:enabled { transform: scale(0.96); }
.as-send:disabled { background: var(--lp-line); color: var(--lp-muted); cursor: default; }
.as-send:focus-visible {
outline: calc(var(--lp-hairline-width) * 2) solid var(--lp-blue-deep);
outline-offset: var(--lp-hairline-width);
}
@media (hover: hover) and (pointer: fine) {
.as-send:hover:enabled { background: var(--lp-primary-hover); }
}
@media (prefers-reduced-motion: reduce) {
.as-send { transition: none; }
.as-send:active:enabled { transform: none; }
}
.as-stop {
border: 0;
background: transparent;
font: inherit;
color: var(--lp-muted);
font-size: var(--lp-fs-2xs);
border-radius: var(--lp-r-sm);
padding: var(--lp-home-pagination-gap);
min-height: var(--lp-home-pagination-control-size);
cursor: pointer;
}
.as-stop:focus-visible { outline: var(--lp-hairline-width) solid var(--lp-blue-deep); }
.as-stop:disabled { opacity: var(--lp-home-disabled-opacity); cursor: not-allowed; }
@media (hover: hover) and (pointer: fine) {
.as-stop:hover { background: var(--lp-line); color: var(--lp-ink); }
}
/* ── Glean's chips ────────────────────────────────────────────────────────── */
.as-chips {
display: flex;
flex-wrap: wrap;
gap: 6px;
margin-top: 10px;
padding: 0 6px;
}
.as-chip {
display: inline-flex;
align-items: center;
gap: 6px;
max-width: 220px;
padding: 5px 11px;
border: 1px solid transparent;
border-radius: 999px;
background: var(--lp-surface-2);
color: var(--lp-ink);
font: inherit;
font-size: var(--lp-fs-2xs);
font-weight: 500;
cursor: pointer;
}
.as-chip:hover { border-color: var(--lp-line); }
.as-chip.is-selected { background: var(--lp-blue-tint); border-color: var(--lp-blue-tint); font-weight: 600; }
/* The one the answer will be built on, when more than one is picked (R3). */
.as-chip.is-target { border-color: var(--lp-blue-solid); }
.as-chip-mark {
flex: 0 0 auto;
display: inline-flex;
width: 14px;
height: 14px;
color: var(--lp-muted);
}
.as-chip-mark svg {
width: 14px;
height: 14px;
fill: none;
stroke: currentColor;
stroke-width: 1.4;
stroke-linecap: round;
stroke-linejoin: round;
}
.as-chip.is-selected .as-chip-mark { color: var(--lp-blue-solid); }
.as-chip-name {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* A source this caller holds and cannot ask (see AssistantPage's note): still visible, because
an artefact already built on it stays listed β€” but plainly not a door. */
.as-chip.is-blocked {
color: var(--lp-muted);
background: transparent;
border-color: var(--lp-line);
border-style: dashed;
cursor: default;
}
.as-chip.is-blocked .as-chip-mark { opacity: 0.5; }
.as-chip.is-blocked:hover { border-color: var(--lp-line); }
.as-chips-note {
flex: 1 0 100%;
margin: 2px 0 0;
color: var(--lp-muted);
font-size: var(--lp-fs-2xs);
}
.as-chips-empty {
margin: 2px 0 0;
color: var(--lp-muted);
font-size: var(--lp-fs-2xs);
}
/* Drafted semantic fields use the existing clarification card and chip anatomy. */
/* ⭐ A DRAFTED FIELD IS A CARD, NOT A PILL, AND THAT IS WHY THE RADIUS IS OVERRIDDEN HERE.
MEASURED on the first take of shots/W61-T30-admin.png: `.w45-chip` carries
`border-radius: var(--lp-r-pill)`, which is right for a one-word label and wrong for three
stacked lines. At this height the pill becomes an ellipse, its painted edge curves in under the
text, and neighbouring chips read as overlapping each other. A drafted field carries a label, a
role and type line and a value sample, so it is given a card radius, an even padding and a
shared width band instead. `agent-operator.css` belongs to another surface, so this overrides
rather than edits it. */
.as-draft-card .as-draft-field {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 2px;
flex: 0 1 200px;
min-width: 150px;
max-width: 240px;
border-radius: var(--lp-r-md);
padding: 8px 10px;
text-align: left;
white-space: normal;
overflow-wrap: anywhere;
transition: opacity 150ms ease-out, transform 150ms ease-out;
}
/* Controls in a row share height and baseline (DESIGN.md section 4). */
.as-draft-card .w45-chip-row { align-items: stretch; }
.as-draft-card .as-draft-field:active:not(:disabled) { transform: scale(0.98); }
.as-draft-card button:disabled { opacity: 0.65; cursor: not-allowed; }
.as-draft-card button:focus-visible { outline: 2px solid var(--lp-blue-solid); outline-offset: 2px; }
.as-draft-detail,
.as-draft-state {
color: var(--lp-muted);
font-size: var(--lp-fs-2xs);
line-height: var(--lp-lh);
}
.as-draft-state { margin: 8px 0; }
@media (prefers-reduced-motion: reduce) {
.as-turn.is-new { animation: none; }
.as-draft-card .as-draft-field { transition: none; }
.as-draft-card .as-draft-field:active:not(:disabled) { transform: none; }
}