/* pak-239-que pearl-queue (pque-): a message waiting to send while an answer is written. PRSXA + Pearl AI. */
.pque-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* ---------- the card above the message box ---------- */
.pque-card{max-width:720px;margin:0 auto 8px;box-sizing:border-box;border:1px solid var(--app-border,#e5e7eb);border-radius:14px;background:var(--app-bg,#fff);color:var(--app-text,#0f172a);box-shadow:var(--app-shadow-sm,0 1px 3px rgba(15,23,42,.06));padding:8px 8px 8px 10px;animation:pqueIn .18s ease-out}
.pque-card[hidden]{display:none}
.pque-row{display:flex;align-items:center;gap:10px;min-width:0}
.pque-ic{flex:0 0 32px;width:32px;height:32px;display:grid;place-items:center;border-radius:10px;background:var(--accent-soft,rgba(49,97,232,.1));color:var(--accent,#3161E8)}
.pque-card[data-held="1"] .pque-ic{background:rgba(217,119,6,.12);color:#b45309}
.pque-tx{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.pque-st{font-size:11.5px;font-weight:600;line-height:1.3;color:var(--app-text-dim,#64748b)}
.pque-msg{font-size:13.5px;line-height:1.4;color:var(--app-text,#0f172a);overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow-wrap:anywhere;word-break:break-word}
.pque-acts{flex:none;display:flex;align-items:center;gap:4px}
.pque-b{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 10px;border:1px solid var(--app-border,#e5e7eb);border-radius:999px;background:var(--app-bg,#fff);color:var(--app-text,#0f172a);font:inherit;font-size:12.5px;font-weight:600;cursor:pointer;white-space:nowrap}
.pque-b:hover{border-color:var(--accent,#3161E8);color:var(--accent,#3161E8)}
.pque-now{background:var(--accent,#3161E8);border-color:var(--accent,#3161E8);color:#fff}
.pque-now:hover{color:#fff;filter:brightness(1.08)}
.pque-b:disabled{opacity:.55;cursor:default;filter:none}
.pque-x{flex:none;width:30px;height:30px;display:grid;place-items:center;padding:0;border:0;border-radius:8px;background:transparent;color:var(--app-text-dim,#64748b);cursor:pointer}
.pque-x:hover{background:var(--accent-soft,rgba(49,97,232,.08));color:var(--app-text,#0f172a)}
.pque-b:focus-visible,.pque-x:focus-visible,.pque-add:focus-visible{outline:2px solid var(--accent,#3161E8);outline-offset:2px}
.pque-err{display:flex;align-items:flex-start;gap:7px;margin:8px 0 0;padding:7px 10px;border-radius:10px;background:rgba(208,69,58,.08);color:var(--bad,#d0453a);font-size:12.5px;line-height:1.45}
.pque-err[hidden]{display:none}
.pque-err svg{flex:none;margin-top:1px}
.pque-card.pque-bad{border-color:var(--bad,#d0453a)}

/* ---------- "send when this answer finishes" next to Stop (shows only while an answer is written and something is typed) ---------- */
.pque-add{display:none;flex:0 0 auto;width:36px;height:36px;border:1px solid var(--app-border,#e5e7eb);border-radius:50%;background:var(--app-bg,#fff);color:var(--accent,#3161E8);cursor:pointer;align-items:center;justify-content:center;padding:0}
.pque-add:hover{border-color:var(--accent,#3161E8);background:var(--accent-soft,rgba(49,97,232,.08))}
#composer.pec-busy.pque-typed .pque-add{display:inline-flex}

/* the floating "Latest" button sits above the card */
html.pque-on .pxs-jump{margin-bottom:var(--pque-h,60px)}

@keyframes pqueIn{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.pque-card{animation:none!important}}

/* ---------- dark (the card takes the message box colours; only the accents change) ---------- */
[data-theme="dark"] .pque-ic,.dark .pque-ic{background:var(--accent-bright-soft,rgba(133,165,240,.16));color:var(--accent-bright,#85A5F0)}
[data-theme="dark"] .pque-card[data-held="1"] .pque-ic,.dark .pque-card[data-held="1"] .pque-ic{background:rgba(251,191,36,.14);color:#fbbf24}
[data-theme="dark"] .pque-b:not(.pque-now):hover,.dark .pque-b:not(.pque-now):hover,[data-theme="dark"] .pque-add,.dark .pque-add{border-color:var(--app-border-hi,#3c4352);color:var(--accent-bright,#85A5F0)}
[data-theme="dark"] .pque-x:hover,.dark .pque-x:hover{background:var(--accent-bright-soft,rgba(133,165,240,.16))}
[data-theme="dark"] .pque-err,.dark .pque-err{background:rgba(249,112,102,.12);color:#f97066}
[data-theme="dark"] .pque-card.pque-bad,.dark .pque-card.pque-bad{border-color:#f97066}

/* ---------- phones ---------- */
@media (max-width:640px){
  .pque-card{padding:7px 6px 7px 8px;border-radius:12px}
  .pque-row{gap:8px}
  .pque-ic{flex-basis:28px;width:28px;height:28px;border-radius:8px}
  .pque-msg{font-size:13px;-webkit-line-clamp:1}
  .pque-edit span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  .pque-edit{width:32px;padding:0;justify-content:center}
  .pque-b,.pque-x{height:32px}
  .pque-x{width:32px}
}
@media (max-width:360px){
  .pque-now span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  .pque-now{width:32px;padding:0;justify-content:center}
}
