/* Response annotations: the one definition (Felix's approved r3 prototype, annotations.css). */
.response-annotation-host{--an-hl:color-mix(in srgb,#d29922 34%,transparent);--an-hl-sel:color-mix(in srgb,#d29922 28%,transparent);--an-hl-on:color-mix(in srgb,#d29922 46%,transparent);--an-hl-draft:color-mix(in srgb,#d29922 20%,transparent)}
.response-annotation-host::selection,.response-annotation-host *::selection{background:color-mix(in srgb,#d29922 28%,transparent)}
/* Highlight in amber: saved 34%, open or hovered 46%, draft 20%. A sent note fades to a thin underline. */
.response-annotation-host mark.response-annotation-mark{background:var(--an-hl);color:inherit;border-radius:3px;padding:0 1px;cursor:pointer;transition:background .15s}
.response-annotation-host mark.response-annotation-mark.is-draft{background:var(--an-hl-draft)}
.response-annotation-host mark.response-annotation-mark.is-on,.response-annotation-host mark.response-annotation-mark.is-pulse{background:var(--an-hl-on)}
.response-annotation-host mark.response-annotation-mark.is-sent{background:none;border-radius:0;padding:0;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px;text-decoration-color:color-mix(in srgb,var(--text) 38%,transparent)}
.response-annotation-host mark.response-annotation-mark.is-sent.is-on,.response-annotation-host mark.response-annotation-mark.is-sent:hover{text-decoration-color:var(--accent);background:none}
/* The number is a superscript in the text colour in every state, so the text never moves. */
.response-annotation-host sup.response-annotation-number{display:inline;min-width:0;height:auto;padding:0 1px;margin-left:1px;border-radius:0;background:none;color:inherit;font-size:10px;font-weight:700;line-height:0;vertical-align:super;cursor:pointer;font-variant-numeric:tabular-nums}
.response-annotation-host sup.response-annotation-number.is-draft{opacity:.6;cursor:default}
.response-annotation-host sup.response-annotation-number.is-sent{font-weight:600}
.response-annotation-host sup.response-annotation-number.is-sent.is-on{color:var(--accent)}
/* The Add note chip: the same surface and roundness as the card. */
.response-annotation-toolbar{position:fixed;z-index:10000;display:inline-flex;align-items:center;box-sizing:border-box;height:30px;padding:0;border:1px solid var(--nlc-overlay-border);border-radius:15px;background:var(--nlc-overlay-surface);box-shadow:0 6px 18px var(--k-fx-001);font:12.5px -apple-system,BlinkMacSystemFont,'Segoe UI',system-ui,sans-serif;color:var(--text)}
.response-annotation-toolbar:hover{background:color-mix(in srgb,var(--accent) 10%,var(--nlc-overlay-surface))}
.response-annotation-toolbar__annotate{display:inline-flex;align-items:center;gap:6px;height:100%;padding:0 12px 0 10px;border:0;border-radius:15px;background:none;color:inherit;font:inherit;cursor:pointer}
.response-annotation-toolbar__annotate:hover,.response-annotation-toolbar__annotate:focus-visible{background:none;outline:none}
.response-annotation-toolbar svg{width:14px;height:14px;flex:none;color:var(--accent)}
/* One card for an annotation: the editor, the card shown on hover and the list all use it. */
.nlc-overlay-surface.nlc-overlay-surface.response-annotation-composer{position:fixed;z-index:10000;box-sizing:border-box;width:320px;max-width:calc(100vw - 16px);padding:0 !important;border:1px solid var(--nlc-overlay-border);border-radius:18px !important;background:var(--nlc-overlay-surface);box-shadow:0 10px 28px var(--k-fx-001) !important;overflow:hidden;color:var(--text);font:14px/1.45 -apple-system,BlinkMacSystemFont,'Segoe UI',system-ui,sans-serif}
.nlc-overlay-surface.nlc-overlay-surface.response-annotation-composer.response-annotation-list{max-height:min(60vh,420px);overflow-y:auto;padding:0 !important;border-radius:18px !important}
.response-annotation-composer__field,.response-annotation-card,.annotation-hover-card .response-annotation-card{display:flex;align-items:flex-start;gap:8px;box-sizing:border-box;min-height:40px;padding:6px 6px 6px 14px}
.response-annotation-card+.response-annotation-card{border-top:1px solid var(--nlc-overlay-border)}
.response-annotation-composer__number,.response-annotation-card__number{flex:none;width:12px;padding-top:6px;color:var(--text-dim);font-size:11px;font-weight:500;line-height:16px;font-variant-numeric:tabular-nums}
.response-annotation-composer__input{flex:1;min-width:0;box-sizing:border-box;height:28px;min-height:28px;max-height:128px;padding:4px 0;font:13.5px/20px -apple-system,BlinkMacSystemFont,'Segoe UI',system-ui,sans-serif;color:var(--text);overflow-y:auto}
.response-annotation-card__comment{flex:1;min-width:0;padding:4px 0;font:13.5px/20px -apple-system,BlinkMacSystemFont,'Segoe UI',system-ui,sans-serif;color:var(--text);overflow-wrap:anywhere;white-space:pre-wrap}
.response-annotation-card__comment.is-empty{color:var(--text-dim)}
.response-annotation-card__time{flex:none;padding:6px 8px 0 0;font-size:11px;line-height:16px;color:var(--text-dim)}
.response-annotation-card__actions{flex:none;display:flex;gap:2px}
.response-annotation-card__actions button{display:grid;place-items:center;width:28px;height:28px;padding:0;border:0;border-radius:50%;background:none;color:var(--text-dim);cursor:pointer}
.response-annotation-card__actions button:hover{background:var(--border);color:var(--text)}
.response-annotation-card__actions .response-annotation-card__delete:hover{color:var(--danger)}
.response-annotation-card svg,.response-annotation-composer svg{width:14px;height:14px;flex:none;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.response-annotation-composer__send,.response-annotation-composer__send:hover,.response-annotation-composer__send:focus-visible{color:var(--on-fill-text,#fff)}
.response-annotation-composer__send{background:var(--accent-dim)}
.response-annotation-composer__send:hover,.response-annotation-composer__send:focus-visible{background:var(--accent)}
.response-annotation-composer__error{padding:0 14px 8px}
/* The notes tile in the composer: a pen, "N annotations" and a cross; hovering it lists every note above it. */
#image-preview .response-annotation-pending{position:relative;display:inline-flex;align-items:center;gap:6px;box-sizing:border-box;width:auto;max-width:var(--attach-chip-max);height:30px;padding:0 6px 0 10px;border:1px solid var(--border);border-radius:15px;background:color-mix(in srgb,var(--text) 4%,transparent);font:12.5px -apple-system,BlinkMacSystemFont,'Segoe UI',system-ui,sans-serif;color:var(--text);white-space:nowrap}
#image-preview .response-annotation-pending:hover,#image-preview .response-annotation-pending:focus-within{border-color:color-mix(in srgb,var(--accent) 55%,var(--border))}
#image-preview .response-annotation-pending .response-annotation-pending__open{display:inline-flex;align-items:center;gap:6px;width:auto;height:auto;padding:0;border:0;border-radius:0;background:none;box-shadow:none;font:inherit;color:inherit}
#image-preview .response-annotation-pending .response-annotation-pending__icon{flex:none;width:14px;height:14px;background:none;color:var(--accent)}
#image-preview .response-annotation-pending .pdf-attachment-name{font:inherit;max-width:none}
#image-preview .response-annotation-pending .response-annotation-pending__clear{position:static;display:grid;place-items:center;width:20px;height:20px;padding:0;border:0;border-radius:50%;background:none;color:var(--text-dim);cursor:pointer}
#image-preview .response-annotation-pending .response-annotation-pending__clear:hover{background:var(--border);color:var(--text)}
#image-preview .response-annotation-pending .response-annotation-pending__clear svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round}
#image-preview .response-annotation-pending:hover::after{content:'';position:absolute;left:0;right:0;bottom:100%;height:8px}
.annotation-hover-card{bottom:calc(100% + 6px);width:320px;max-width:min(320px,calc(100vw - 24px));padding:0;border:1px solid var(--nlc-overlay-border);border-radius:18px;background:var(--nlc-overlay-surface);box-shadow:0 10px 28px var(--k-fx-001);overflow:hidden;color:var(--text);font:14px/1.45 -apple-system,BlinkMacSystemFont,'Segoe UI',system-ui,sans-serif}
/* Annotation removed, with an Undo for 4 seconds, beside the tile. */
#image-preview .response-annotation-undo-chip{display:inline-flex;align-items:center;gap:6px;box-sizing:border-box;height:30px;min-height:30px;padding:0 12px;border:1px solid var(--border);border-radius:15px;background:color-mix(in srgb,var(--text) 4%,transparent);font:12.5px -apple-system,BlinkMacSystemFont,'Segoe UI',system-ui,sans-serif;color:var(--text-dim);white-space:nowrap}
#image-preview .response-annotation-undo-chip button{color:var(--accent);font:inherit;font-weight:600}
/* The clear cross on the notes tile is the plain cross: the red badge the shipped attachment tile draws is not part of it. */
#image-preview .response-annotation-pending .response-annotation-pending__clear::after{content:none}
/* A sent note's card row takes the reader to its text in the reply, which flashes. */
.response-annotation-card.is-jump{cursor:pointer}
.response-annotation-host mark.response-annotation-mark.is-flash{background:var(--an-hl-on);border-radius:3px}
/* The notes chip above a sent message reads like the tile above the composer in every theme: the bubble's white text and fill colour are not for it. */
#messages .msg.user .response-annotation-sent .response-annotation-sent__open{color:var(--text)}
#messages .msg.user .response-annotation-sent .response-annotation-sent__icon{background:none;color:var(--accent)}
/* Hovering a card row lights its text in the reply, a sent note's too (its highlight is a plain underline at rest). */
.response-annotation-host mark.response-annotation-mark.is-sent.is-pulse{background:var(--an-hl-on);border-radius:3px}
.response-annotation-card__quote,.response-annotation-card__note{display:block}
.response-annotation-card__quote{color:var(--text-dim);font-style:italic}
/* The card a sent message's notes chip opens (Felix's approved r3 prototype, G5): a header, then one row per note with its number, the time it was sent,
   a dim pen and trash (a sent note cannot be changed), the quoted passage and the note. It opens above the chip, as the composer's list does.
   The surface is r3's: a flat card with a thin border and no shadow, filled a shade off the page (3% of the text colour over the background, opaque because it floats over the conversation),
   so it reads the same way in dark and in light. All from theme tokens. */
.response-annotation-sent .annotation-hover-card.response-annotation-sentcard{width:380px;max-width:min(380px,calc(100vw - 24px));border:1px solid var(--border);border-radius:12px;background:color-mix(in srgb,var(--text) 3%,var(--bg));box-shadow:none}
.response-annotation-sentcard__header{padding:8px 12px 0;font-size:11.5px;line-height:1.45;color:var(--text-dim)}
.annotation-hover-card .response-annotation-card.is-sent-row{flex-direction:column;align-items:stretch;gap:6px;min-height:0;padding:10px 12px}
.is-sent-row .response-annotation-card__head{display:flex;align-items:center;gap:8px}
.is-sent-row .response-annotation-card__number{display:inline-grid;place-items:center;box-sizing:border-box;width:auto;min-width:18px;height:18px;padding:0 5px;border:1px solid color-mix(in srgb,var(--text) 16%,transparent);border-radius:999px;color:var(--text-dim);font-size:11px;font-weight:700;line-height:1}
.is-sent-row .response-annotation-card__time{flex:1;min-width:0;padding:0;font-size:11.5px;line-height:1.45}
.is-sent-row .response-annotation-card__actions{margin-left:auto}
.is-sent-row .response-annotation-card__actions button{width:26px;height:26px}
.is-sent-row .response-annotation-card__actions button:disabled,.is-sent-row .response-annotation-card__actions button:disabled:hover{opacity:.35;cursor:default;background:none;color:var(--text-dim)}
.is-sent-row .response-annotation-card__quote{padding-left:8px;border-left:2px solid color-mix(in srgb,var(--text) 30%,transparent);font-size:13px;line-height:1.45;font-style:normal;color:var(--text-dim);overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.is-sent-row .response-annotation-card__comment{flex:none;padding:0;font:14px/1.4 -apple-system,BlinkMacSystemFont,'Segoe UI',system-ui,sans-serif}
/* BUIL-2026-12-01-10, designer's catch on the walk of 5 Dec 2026: the opened card of a sent chip sits fully inside the visible chat area.
   response-annotations.js decides where (data-card-place on the chip, --sentcard-room and --sentcard-dx on the card): above the chip when it fits there, else below it,
   else as tall as the room with its own scroll. The 8px bridge keeps the chip hovered while the mouse crosses the gap into the card. */
.response-annotation-sent[data-card-place="below"] .annotation-hover-card{bottom:auto;top:calc(100% + 6px)}
.response-annotation-sent .annotation-hover-card[data-capped]{max-height:var(--sentcard-room);overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain}
.response-annotation-sent .annotation-hover-card{translate:var(--sentcard-dx,0) 0}
.response-annotation-sent:hover::after,.response-annotation-sent:focus-within::after{content:'';position:absolute;left:0;right:0;bottom:100%;height:8px}
.response-annotation-sent[data-card-place="below"]:hover::after,.response-annotation-sent[data-card-place="below"]:focus-within::after{bottom:auto;top:100%}
