/* ─── שאלו את פאי (floating site search) ─── sits above the news ticker */
.pa-root { position: fixed; left: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 950; font-family: var(--font); }
body.has-ticker .pa-root { bottom: calc(var(--nt-h) + 14px + env(safe-area-inset-bottom, 0px)); }
body.has-a11y-widget .pa-root { left: 84px; }
.pa-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.pa-fab { display: inline-flex; align-items: center; gap: 0.45rem; border: 0; border-radius: 999px; background: var(--primary); color: #fff; font: inherit; font-weight: 600; font-size: 0.95rem; padding: 0.7rem 1.1rem; min-height: 48px; box-shadow: var(--shadow-lg); cursor: pointer; }
.pa-fab:hover { background: var(--primary-light); }
.pa-fab:focus-visible, .pa-close:focus-visible, .pa-send:focus-visible, .pa-input:focus-visible, .pa-src a:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.pa-panel { position: absolute; left: 0; bottom: 60px; width: min(400px, calc(100vw - 36px)); max-height: min(560px, calc(100vh - 160px)); display: flex; flex-direction: column; background: #fff; border: 1.3px solid #D3DED8; border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; }
.pa-panel[hidden] { display: none; }
.pa-head { display: flex; justify-content: space-between; align-items: center; padding: 0.7rem 0.9rem; background: var(--primary); color: #fff; }
.pa-title { font-size: 1.02rem; margin: 0; color: #fff; }
.pa-close { border: 0; background: transparent; color: #fff; cursor: pointer; min-width: 36px; min-height: 36px; border-radius: 8px; }
.pa-intro { margin: 0; padding: 0.55rem 0.9rem; font-size: 0.8rem; color: var(--text-light); background: #F7FAF8; border-bottom: 1px solid var(--border); }
.pa-log { flex: 1; overflow-y: auto; padding: 0.7rem 0.9rem; display: flex; flex-direction: column; gap: 0.6rem; }
.pa-q { align-self: flex-start; background: #EDF5F0; color: var(--primary-dark); border-radius: 12px 12px 12px 4px; padding: 0.45rem 0.75rem; font-size: 0.9rem; max-width: 90%; }
.pa-a { font-size: 0.9rem; color: var(--text); line-height: 1.6; }
.pa-a p { margin: 0 0 0.4rem; }
.pa-src { list-style: none; margin: 0.25rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.pa-src li { border: 1px solid var(--border); border-radius: 10px; padding: 0.45rem 0.6rem; }
.pa-src a { font-weight: 600; color: var(--primary); text-decoration: none; }
.pa-src a:hover { text-decoration: underline; }
.pa-kind { display: inline-block; font-size: 0.7rem; font-weight: 700; color: #fff; background: #475569; border-radius: 999px; padding: 0 0.45rem; margin-inline-end: 0.3rem; vertical-align: 1px; }
.pa-n { color: #B45309; font-weight: 700; }
.pa-snip { display: block; font-size: 0.78rem; color: var(--text-light); margin-top: 0.15rem; }
.pa-form { display: flex; gap: 0.4rem; padding: 0.6rem 0.9rem; border-top: 1px solid var(--border); }
.pa-input { flex: 1; min-width: 0; font: inherit; font-size: 0.95rem; padding: 0.55rem 0.75rem; border: 1.5px solid var(--border); border-radius: 10px; min-height: 44px; }
.pa-send { border: 0; border-radius: 10px; background: var(--gold); color: #1a2e23; font: inherit; font-weight: 700; padding: 0 1rem; min-height: 44px; cursor: pointer; }
.pa-send[disabled] { opacity: 0.6; cursor: wait; }
.pa-note { margin: 0; padding: 0 0.9rem 0.55rem; font-size: 0.72rem; color: var(--text-light); }
@media (max-width: 640px) {
  .pa-root { left: 12px; }
  .pa-fab span { display: none; }
  .pa-fab { width: 52px; height: 52px; padding: 0; justify-content: center; }
  .pa-panel { position: fixed; left: 8px; right: 8px; width: auto; bottom: 76px; max-height: calc(100vh - 140px); }
}
@media print { .pa-root { display: none; } }
body.has-ticker .pa-panel { } @media (max-width: 640px) { body.has-ticker .pa-panel { bottom: calc(76px + var(--nt-h)); } }
/* AI chat mode */
.pa-new { border: 1px solid rgba(255,255,255,.5); background: transparent; color: #fff; font: inherit; font-size: .78rem; border-radius: 999px; padding: .15rem .65rem; cursor: pointer; margin-inline-start: auto; margin-inline-end: .5rem; }
.pa-new:hover { background: rgba(255,255,255,.15); }
.pa-a a.pa-cite { font-weight: 700; color: var(--primary); text-decoration: none; border-bottom: 1px dotted var(--primary); padding: 0 .1rem; }
.pa-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: .35rem 0 0; }
.pa-chip { border: 1.3px solid var(--primary); background: #fff; color: var(--primary); font: inherit; font-size: .8rem; border-radius: 999px; padding: .25rem .7rem; cursor: pointer; min-height: 32px; }
.pa-chip:hover { background: #EDF5F0; }
.pa-typing { color: var(--text-light); font-size: .85rem; }
.pa-links { margin: .35rem 0 0; padding-inline-start: 1.1rem; font-size: .88rem; }
