/* Reply to a message (reply-fill.js): the quote line above an answer, the "Replying to" bar, the Reply button on posts.
   Tokens only; no new colours. */

/* ---------- the quote line: part of the chat, not a card ---------- */
.rf-quote{display:flex;align-items:baseline;gap:8px;width:fit-content;max-width:100%;min-width:0;margin:2px 0 3px;padding:0 0 0 8px;border:0;border-left:2px solid var(--line-strong);border-radius:0;background:none;color:var(--text-muted);font:400 var(--fs-small)/18px var(--font-body);text-align:left;overflow:hidden}
.rf-q-who{flex:none;font:500 var(--fs-label)/18px var(--font-mono);color:var(--text-muted)}
.rf-q-arrow{display:inline-block}
.rf-q-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
button.rf-quote{position:relative;cursor:pointer;transition:color var(--motion-fast),border-color var(--motion-fast)}
button.rf-quote::after{content:"";position:absolute;inset:-8px -4px}
button.rf-quote:hover{color:var(--text);border-left-color:var(--accent)}
button.rf-quote:hover .rf-q-who{color:var(--accent-text)}
button.rf-quote:focus-visible{outline:2px solid var(--accent-text);outline-offset:2px}
.post .rf-quote{margin-top:6px;margin-bottom:0}
.post .rf-quote + .body{margin-top:4px}

/* the original, when you jump to it: same wash and rule mention-fill uses for "you were tagged" */
.msg.rf-flash,.post.rf-flash{background:var(--accent-wash);box-shadow:inset 3px 0 0 var(--accent)}
@media (prefers-reduced-motion:no-preference){
  .msg.rf-flash,.post.rf-flash{animation:rf-flash 1.5s ease-out}
}
@keyframes rf-flash{0%,55%{background:var(--accent-wash);box-shadow:inset 3px 0 0 var(--accent)}100%{background:transparent;box-shadow:inset 3px 0 0 transparent}}

/* ---------- the Reply button on a chat message: like the room's own tool buttons ---------- */
.msg-tools .rf-reply-btn{font:600 14px/1 var(--font-body)}

/* ---------- the Reply button on a forum post: sits beside Tag ---------- */
.rf-post-btn{font:500 11px/18px var(--font-mono);padding:0 8px;border-radius:var(--r-sm);background:transparent;color:var(--text-muted);border:1px solid var(--line-strong);cursor:pointer;opacity:.75;transition:color var(--motion-fast),border-color var(--motion-fast),opacity var(--motion-fast)}
.post:hover .rf-post-btn,.rf-post-btn:focus-visible{opacity:1}
.rf-post-btn:hover{color:var(--accent-text);border-color:var(--accent-line);opacity:1}
.rf-post-btn:focus-visible{outline:2px solid var(--accent-text);outline-offset:2px}

/* ---------- the bar above the box ---------- */
.rf-bar{display:flex;align-items:center;gap:8px;min-height:36px;padding:2px 8px 2px 16px;border-top:1px solid var(--line);background:var(--surface-1);color:var(--text-muted);font:400 var(--fs-small)/20px var(--font-body)}
.rf-bar-text{flex:1;min-width:0;display:flex;align-items:baseline;gap:8px}
.rf-bar-who{flex:none;max-width:60%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text);font-weight:500}
.rf-bar-ex{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rf-bar-x{position:relative;flex:none;min-width:36px;min-height:36px;padding:0;border:0;border-radius:var(--r-sm);background:none;color:var(--text-muted);font:500 14px/1 var(--font-body);cursor:pointer}
.rf-bar-x:hover{color:var(--text);background:var(--surface-2)}
.rf-bar-x:focus-visible{outline:2px solid var(--accent-text);outline-offset:-2px}
.rf-bar.rf-thread{margin:0 0 8px;padding-left:12px;border:1px solid var(--line);border-radius:var(--r-sm)}

@media (max-width:820px),(orientation:landscape) and (max-height:500px) and (max-width:950px){
  .rf-bar{padding-left:12px;font-size:16px;line-height:22px}
  .rf-bar-x{min-width:44px;min-height:44px;font-size:16px}
  .rf-q-who,.rf-quote{font-size:13px}
  .rf-post-btn{position:relative}
  .rf-post-btn::after{content:"";position:absolute;inset:-13px -6px}
}
@media (prefers-reduced-motion:reduce){.rf-post-btn,button.rf-quote{transition:none}}

/* a short screen (keyboard up, or a phone on its side): the bar is one slim line; the X keeps a 44px tap area by reaching upward and sideways */
@media (max-height:420px){
  .rf-bar,.rf-bar.rf-thread{min-height:30px;height:30px;padding:0 4px 0 12px;font-size:13px;line-height:20px}
  .rf-bar.rf-thread{margin-bottom:4px}
  .rf-bar-x{min-width:30px;min-height:30px;width:30px;height:30px;font-size:13px}
  .rf-bar-x::after{content:"";position:absolute;top:-14px;bottom:0;left:-14px;right:0}
}
