Repository navigation
Expand file tree
/
Copy pathmsgreply.css
More file actions
61 lines (59 loc) · 5.64 KB
/
Copy pathmsgreply.css
File metadata and controls
61 lines (59 loc) · 5.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/* ---------- Copy + Reply on chat bubbles, the reply pinned above the composer (msgreply.ts) ---------- */
.msgs .m .bubble{position:relative}
.msgs{overflow-x:clip} /* the buttons never make the chat scroll sideways (a focused button would scroll it into view) */
/* Keep the reply stack compact until its controls are shown. The revealed strip still
takes up layout space, so Copy / Reply never cover history, text or task cards. */
.msgs .m .bubble:has(>.mact){margin-bottom:6px;min-width:68px;--action-space:34px}
.msgs .m .bubble:has(>.mact .ma-task){min-width:102px}
/* Expanding the action strip must not make scroll anchoring move the hovered or
held bubble away from the pointer. Normal chat anchoring resumes on dismissal. */
.msgs:has(.bubble.macts,.bubble.ma-space,.mact :focus-visible){overflow-anchor:none}
@media(hover:hover){.msgs:has(.bubble:hover>.mact){overflow-anchor:none}}
.mact{position:absolute;top:100%;padding-top:2px;display:flex;gap:4px;opacity:0;pointer-events:none;transition:opacity .12s;white-space:nowrap;z-index:2;font-size:13px;line-height:1}
.m.agent .mact{left:0}
.m.user .mact{right:0;flex-direction:row-reverse}
.mact button{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:30px;height:30px;padding:0 7px;border-radius:999px;border:1px solid var(--line);background:var(--sheet);color:var(--mute);cursor:pointer;font:inherit;flex:none}
.mact button:hover{color:var(--ink);background:var(--hover)}
.mact button:focus-visible{outline:2px solid var(--accent);outline-offset:1px;color:var(--ink)}
.mact .mal{display:none}
.mact button.done{color:var(--live);border-color:color-mix(in srgb,var(--live) 45%,var(--line))}
/* the "Copied" tick says so in words for a moment, in a small label above it (the buttons keep their width) */
.mact button.done .mal{display:block;position:absolute;bottom:calc(100% + 5px);left:50%;transform:translateX(-50%);padding:3px 8px;border-radius:8px;background:var(--ink);color:var(--sheet);font-size:12px;font-weight:500;pointer-events:none;white-space:nowrap}
@media (hover:hover){.bubble:hover>.mact{opacity:1;pointer-events:auto}.msgs .m .bubble:has(>.mact):hover{margin-bottom:var(--action-space)}}
.bubble:has(>.mact :focus-visible)>.mact,.bubble.macts>.mact{opacity:1;pointer-events:auto}
.msgs .m .bubble:has(>.mact :focus-visible),.msgs .m .bubble.macts{margin-bottom:var(--action-space)}
/* Keep opened rails in place until the pointer leaves the conversation. Collapsing
an earlier rail while aiming at a later bubble would move its Copy / Reply target. */
.msgs .m .bubble.ma-space{margin-bottom:var(--action-space)}
/* Touch: a held bubble reveals only its controls. A normal tap leaves them hidden. */
@media (hover:none){
.msgs .m .bubble:has(>.mact){--action-space:48px;min-width:92px}
.msgs .m .bubble:has(>.mact .ma-task){min-width:140px}
.msgs .mact button{height:44px;min-width:44px}
}
@keyframes mapop{from{opacity:0;transform:translateY(4px) scale(.97)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.mact{transition:none}}
/* The quote above a sent reply: who + one line; tap → the original scrolls into view and flashes. */
.mq{display:inline-flex;align-items:center;gap:6px;max-width:min(86%,520px);margin:0 4px 4px;padding:3px 10px 3px 8px;border:0;border-left:3px solid color-mix(in srgb,var(--accent) 55%,transparent);border-radius:4px 10px 10px 4px;background:color-mix(in srgb,var(--ink) 5%,transparent);color:var(--mute);font:inherit;font-size:13px;line-height:1.35;cursor:pointer;text-align:left;min-width:0}
.mq:hover{color:var(--ink2);background:color-mix(in srgb,var(--ink) 8%,transparent)}
.mq:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
.mq svg{flex:none;opacity:.8}
.mq .mqw{font-weight:600;flex:none;color:var(--ink2)}
.mq .mqt{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.m.mr-flash>.bubble,.m.mr-flash>.reply-slot>.bubble,.m.mr-flash>.acard,.m.mr-flash .gu-reply{animation:mrflash 1.6s ease}
@keyframes mrflash{0%,35%{box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 45%,transparent)}100%{box-shadow:0 0 0 3px transparent}}
/* The pinned reply above the composer: who + the first lines + ✕. */
.rq{max-width:760px;margin:0 auto}
.rq:empty{display:none}
.rqin{display:flex;align-items:stretch;gap:4px;margin:0 6px 8px;padding:6px 6px 6px 10px;background:var(--sheet);border:1px solid var(--line);border-radius:16px;box-shadow:var(--lift);animation:mapop .14s ease-out}
.rqq{flex:1;min-width:0;display:flex;align-items:flex-start;gap:8px;border:0;background:none;padding:2px 4px 2px 0;font:inherit;color:inherit;text-align:left;cursor:pointer;border-radius:10px}
.rqq:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
.rqico{flex:none;display:grid;place-items:center;width:22px;height:22px;margin-top:1px;color:var(--accent)}
.rqtx{min-width:0;flex:1;display:flex;flex-direction:column;gap:1px;border-left:3px solid color-mix(in srgb,var(--accent) 55%,transparent);padding-left:9px}
.rqtx b{font-size:13px;font-weight:600;color:var(--ink2)}
.rqtx span{font-size:14px;line-height:1.35;color:var(--mute);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.rqx{flex:none;align-self:center;display:grid;place-items:center;width:32px;height:32px;border:0;border-radius:50%;background:none;color:var(--mute);cursor:pointer}
.rqx:hover{background:var(--hover);color:var(--ink)}
.rqx:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
@media (max-width:767px){.rqin{margin:0 2px 6px}.rqx{width:40px;height:40px}}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}