/* pak-239-sel Pearl Select (psel-). Shared by PRSXA and Pearl AI. The bar shown when words of an answer are selected. */
html.psel-on .pnx-sel{display:none!important} /* the older select bar of pearl-next.js is replaced while this file runs */
.psel{position:fixed;z-index:10066;left:0;top:0;max-width:calc(100vw - 16px);display:flex;flex-direction:column;gap:6px;padding:4px;border-radius:12px;background:#101828;color:#fff;box-shadow:0 10px 30px rgba(16,24,40,.35);font-family:inherit;font-size:13px;line-height:1.3;animation:pselIn .12s ease-out}
.psel[hidden]{display:none}
.psel-bar{display:flex;gap:2px;flex-wrap:nowrap}
.psel-b{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:32px;padding:0 10px;border:0;border-radius:8px;background:transparent;color:inherit;font:inherit;font-weight:600;white-space:nowrap;cursor:pointer}
.psel-b svg{flex:none}
.psel-b:hover,.psel-b:focus-visible,.psel-b[aria-expanded="true"]{background:rgba(255,255,255,.14);outline:0}
.psel-b:focus-visible{box-shadow:0 0 0 2px var(--accent-bright,#85A5F0)}
.psel-b.is-done{color:#86efac}
.psel-short{display:none}
.psel-msg{padding:2px 8px 4px;color:#fecaca;font-size:12.5px;max-width:340px}
.psel-msg[hidden]{display:none}
.psel-rw{display:flex;flex-direction:column;gap:7px;padding:6px 6px 4px;border-top:1px solid rgba(255,255,255,.12);width:330px;max-width:calc(100vw - 32px);box-sizing:border-box}
.psel-rw[hidden]{display:none}
.psel-rw-l{font-weight:600;font-size:12.5px;color:rgba(255,255,255,.85)}
.psel-rw-row{display:flex;gap:6px}
.psel-rw-in{flex:1;min-width:0;height:34px;padding:0 10px;border:1px solid rgba(255,255,255,.22);border-radius:8px;background:rgba(255,255,255,.08);color:#fff;font:inherit;font-size:13.5px;outline:0}
.psel-rw-in::placeholder{color:rgba(255,255,255,.5)}
.psel-rw-in:focus{border-color:var(--accent-bright,#85A5F0);box-shadow:0 0 0 3px rgba(133,165,240,.25)}
.psel-rw-in.is-bad{border-color:#f87171;box-shadow:0 0 0 3px rgba(248,113,113,.25)}
.psel-go{flex:none;display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border:0;border-radius:8px;background:var(--accent,#3161E8);color:#fff;cursor:pointer}
.psel-go:hover{filter:brightness(1.08)}
.psel-go:focus-visible{outline:2px solid var(--accent-bright,#85A5F0);outline-offset:2px}
.psel-err{color:#fca5a5;font-size:12.5px;margin-top:-2px}
.psel-err[hidden]{display:none}
.psel-chips{display:flex;flex-wrap:wrap;gap:6px}
.psel-chip{height:30px;padding:0 12px;border:1px solid rgba(255,255,255,.22);border-radius:999px;background:transparent;color:#fff;font:inherit;font-size:12.5px;font-weight:600;cursor:pointer}
.psel-chip:hover,.psel-chip:focus-visible{background:rgba(255,255,255,.12);outline:0;border-color:rgba(255,255,255,.4)}
.psel-rw-note{font-size:11.5px;color:rgba(255,255,255,.6)}
/* dark pages get a light bar, like the old one */
html[data-theme="dark"] .psel{background:#f2f4f7;color:#101828;box-shadow:0 10px 30px rgba(0,0,0,.5)}
html[data-theme="dark"] .psel-b:hover,html[data-theme="dark"] .psel-b:focus-visible,html[data-theme="dark"] .psel-b[aria-expanded="true"]{background:rgba(16,24,40,.08)}
html[data-theme="dark"] .psel-b:focus-visible{box-shadow:0 0 0 2px var(--accent,#3161E8)}
html[data-theme="dark"] .psel-b.is-done{color:#15803d}
html[data-theme="dark"] .psel-msg{color:#b42318}
html[data-theme="dark"] .psel-rw{border-top-color:rgba(16,24,40,.12)}
html[data-theme="dark"] .psel-rw-l{color:#344054}
html[data-theme="dark"] .psel-rw-in{background:#fff;border-color:#d0d5dd;color:#101828}
html[data-theme="dark"] .psel-rw-in::placeholder{color:#98a2b3}
html[data-theme="dark"] .psel-rw-in:focus{border-color:var(--accent,#3161E8);box-shadow:0 0 0 3px rgba(49,97,232,.18)}
html[data-theme="dark"] .psel-rw-in.is-bad{border-color:#d92d20;box-shadow:0 0 0 3px rgba(217,45,32,.15)}
html[data-theme="dark"] .psel-err{color:#b42318}
html[data-theme="dark"] .psel-chip{border-color:#d0d5dd;color:#101828}
html[data-theme="dark"] .psel-chip:hover,html[data-theme="dark"] .psel-chip:focus-visible{background:rgba(16,24,40,.06);border-color:#98a2b3}
html[data-theme="dark"] .psel-rw-note{color:#667085}
/* touch: 40px targets; narrow screens: short labels so the four fit */
.psel.is-touch .psel-b{height:40px;min-width:40px;padding:0 11px}
.psel.is-touch .psel-go,.psel.is-touch .psel-rw-in{height:40px}
.psel.is-touch .psel-go{width:40px}
.psel.is-touch .psel-chip{height:40px;padding:0 14px}
@media (pointer:coarse){.psel-b{height:40px;min-width:40px}.psel-go{width:40px;height:40px}.psel-rw-in{height:40px;font-size:16px}.psel-chip{height:40px}}
@media (max-width:600px){
  .psel-full{display:none}.psel-short{display:inline}
  .psel-rw-in{font-size:16px} /* no zoom on phones */
  .psel.is-rw{width:calc(100vw - 16px);box-sizing:border-box}
  .psel.is-rw .psel-rw{width:auto;max-width:none}
}
@keyframes pselIn{from{opacity:0;transform:translateY(3px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.psel{animation:none}}
