/* مساعد الاستقبال — مركز الهدف
   הפלטה זהה לאתר המרכז: navy #123763 · green #355B28 · olive #768743
   blue #0099DD · cream #F6EFE7 · sand #EEE3D4 · paper #FFFDFA */

:root{
  color-scheme: light;
  --navy:#123763; --navy-d:#0C2748; --navy-l:#1E5089;
  --green:#355B28; --olive:#768743; --olive-l:#93A45F;
  --blue:#0099DD; --blue-d:#026089;
  --cream:#F6EFE7; --sand:#EEE3D4; --paper:#FFFDFA;
  --ink:#1F2B36; --muted:#525E6B; --line:#E2D6C4;
  --f-disp:'Reem Kufi','Noto Kufi Arabic',system-ui,sans-serif;
  --f-body:'IBM Plex Sans Arabic','Segoe UI',system-ui,sans-serif;
  --wrap:44rem;
}
html[lang="he"]{
  --f-disp:'Secular One','Arial Hebrew',system-ui,sans-serif;
  --f-body:'IBM Plex Sans Hebrew','Segoe UI',system-ui,sans-serif;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0; background:var(--cream); color:var(--ink);
  font-family:var(--f-body); font-size:17px; line-height:1.75;
  display:flex; flex-direction:column; min-height:100dvh;
  -webkit-text-size-adjust:100%;
}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.skip{position:absolute;inset-inline-start:-9999px;top:0;z-index:20;background:var(--paper);
  color:var(--navy);padding:10px 16px;border-radius:0 0 8px 8px;font-weight:600}
.skip:focus{inset-inline-start:12px}
:focus-visible{outline:3px solid var(--blue); outline-offset:2px; border-radius:4px}

/* ── מכתבה: הכותרת העליונה ───────────────────────────────── */
.desk{background:var(--navy); color:#DDE7F1; border-bottom:3px solid var(--olive);
  position:sticky; top:0; z-index:10; padding-top:env(safe-area-inset-top)}
.desk-in{max-width:var(--wrap); margin:0 auto; padding:11px 16px;
  display:flex; align-items:center; gap:12px}
.mark{width:38px;height:38px;object-fit:contain;background:var(--paper);
  border-radius:9px;padding:3px;flex:none}
.who{display:flex;flex-direction:column;line-height:1.25;min-width:0}
.who-1{font-family:var(--f-disp);font-size:18px;font-weight:700;color:#fff;
  letter-spacing:.01em;white-space:nowrap;line-height:1.45}
.who-2{font-size:12.5px;color:#9FB6CE;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.desk-act{margin-inline-start:auto;display:flex;align-items:center;gap:8px;flex:none}
.ghost{background:transparent;color:#BFD2E5;border:1px solid #34557E;border-radius:999px;
  font:inherit;font-size:14px;padding:6px 13px;cursor:pointer}
.ghost:hover{background:#173F6E;color:#fff}
.call{display:inline-flex;align-items:center;gap:6px;background:var(--blue);color:#06243A;
  text-decoration:none;font-weight:600;font-size:14.5px;padding:7px 14px;border-radius:999px}
.call:hover{background:#33ADE4}

/* ── יומן השיחה ──────────────────────────────────────────── */
.log{flex:1 1 auto; overflow-y:auto; overscroll-behavior:contain;
  padding:22px 16px 8px; display:flex; flex-direction:column; gap:20px;
  width:100%; max-width:var(--wrap); margin:0 auto}

.welcome{border-block-end:1px solid var(--line); padding-bottom:22px}
.wl-eyebrow{margin:0 0 8px; font-size:13.5px; color:var(--olive-d,#59662F); color:#5C6A34; font-weight:500}
.welcome h1{font-family:var(--f-disp); font-weight:500; color:var(--navy);
  font-size:clamp(24px,5.6vw,31px); line-height:1.35; margin:0 0 12px; max-width:22ch}
.wl-lede{margin:0 0 20px; color:var(--muted); font-size:15.5px; line-height:1.7; max-width:52ch}
.chips{display:flex;flex-wrap:wrap;gap:9px}
.chip{background:var(--sand); border:1px solid var(--line); color:var(--navy);
  border-radius:10px; padding:9px 14px; font:inherit; font-size:14.5px; cursor:pointer;
  text-align:start; box-shadow:0 1px 0 #DCCDB6}
.chip:hover{background:#F3E8D9; border-color:var(--olive-l)}
.chip.job{border-inline-start:3px solid var(--blue)}

.msg{max-width:100%; white-space:normal}
.msg.user{align-self:flex-end; background:var(--navy); color:#EAF1F8; border-radius:14px 14px 4px 14px;
  padding:11px 16px; max-width:min(30rem,88%); font-size:16px; line-height:1.65}
.msg.bot{align-self:stretch; border-inline-start:3px solid var(--olive); padding-inline-start:15px;
  color:var(--ink)}
.msg.bot p{margin:0 0 .75em} .msg.bot p:last-child{margin-bottom:0}
.msg.bot ul{margin:.2em 0 .8em; padding-inline-start:1.15em}
.msg.bot li{margin-bottom:.3em}
.msg.bot strong{font-weight:600;color:var(--navy)}
.msg.bot a{color:var(--blue-d); text-underline-offset:3px;
  unicode-bidi:isolate; overflow-wrap:anywhere}
/* כל מספר, טלפון, כתובת ומייל — שמאל לימין ומבודד, גם בתוך פסקה בערבית
   או בעברית. בלי זה «04-835-5223» מוצג כ«5223-835-04». */
.ltr{direction:ltr; unicode-bidi:isolate; white-space:nowrap}
a.ltr{overflow-wrap:anywhere; white-space:normal}
.msg.bot .tel{font-weight:600; color:var(--navy); text-decoration:none;
  border-bottom:1.5px solid var(--blue)}
.msg.user .tel{color:#EAF1F8; text-decoration:none; border-bottom:1.5px solid var(--blue)}
.msg.user a{color:#CFE2F3}
.msg.bot.err{border-inline-start-color:#C9963C}
.msg.bot.live::after{content:'▍'; color:var(--olive); animation:blink 1s steps(2) infinite}
@keyframes blink{50%{opacity:0}}
.dots{display:inline-flex;gap:4px;align-items:center;height:1.6em}
.dots i{width:6px;height:6px;border-radius:50%;background:var(--olive-l);animation:bob 1.1s infinite}
.dots i:nth-child(2){animation-delay:.15s} .dots i:nth-child(3){animation-delay:.3s}
@keyframes bob{0%,60%,100%{opacity:.25;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}

/* ── הודעת מצב ───────────────────────────────────────────── */
.notice{max-width:var(--wrap);width:100%;margin:0 auto;padding:12px 16px;
  background:#FBF0DC;border-block:1px solid #E4CFA4;color:#6B4A12;font-size:14.5px}
.notice a{color:#6B4A12;font-weight:600}
.notice .tel,.fine .tel{color:inherit;font-weight:600;text-decoration:none;
  border-bottom:1.5px solid #C9963C}

/* ── שורת הכתיבה ─────────────────────────────────────────── */
.bar{background:var(--sand); border-top:1px solid var(--line); flex:none;
  padding:12px 16px calc(10px + env(safe-area-inset-bottom))}
.bar-in{max-width:var(--wrap);margin:0 auto;display:flex;align-items:flex-end;gap:9px}
#q{flex:1; font:inherit; font-size:16.5px; line-height:1.55; color:var(--ink);
  background:var(--paper); border:1px solid var(--line); border-radius:13px;
  padding:11px 15px; resize:none; max-height:8.5em; overflow-y:auto}
#q::placeholder{color:#8B9299}
#q:focus{border-color:var(--olive-l); outline:none; box-shadow:0 0 0 3px rgba(147,164,95,.25)}
#send{flex:none;width:46px;height:46px;border:none;border-radius:50%;background:var(--navy);
  color:#fff;cursor:pointer;display:grid;place-items:center}
#send:hover{background:var(--navy-l)}
#send:disabled{background:#9BA7B4;cursor:default}
#send svg{transform:scaleX(-1)}
html[dir="ltr"] #send svg{transform:none}
.fine{max-width:var(--wrap);margin:9px auto 0;font-size:12.5px;color:#6B7480;line-height:1.6}

@media (max-width:430px){
  body{font-size:16px}
  .who-1{font-size:16.5px}
  .who-2{font-size:11.5px}
  .call span{display:none}
  .call{padding:8px 11px}
  .ghost{padding:6px 10px;font-size:13.5px}
  .desk-in{gap:9px;padding:10px 13px}
}
@media (max-width:340px){
  .who-2{display:none}
}
@media (prefers-reduced-motion:reduce){
  *{animation:none !important; transition:none !important}
}

.welcome.done{display:none}
