/* Nurse Path World — site assistant widget (bottom-LEFT; app banner uses bottom-right) */
.npw-ask-fab{
  position:fixed; z-index:70;
  /* Physical LEFT always — app promo banner + AdSense anchor sit bottom-RIGHT */
  left:max(14px, env(safe-area-inset-left));
  right:auto;
  bottom:max(18px, env(safe-area-inset-bottom));
  width:56px; height:56px; border-radius:50%;
  border:0; cursor:pointer;
  background:linear-gradient(145deg, var(--night2,#0A3B42), var(--night,#05262B));
  color:#fff; box-shadow:var(--sh2), 0 0 0 3px rgba(94,234,212,.25);
  display:flex; align-items:center; justify-content:center;
  font:800 22px/1 var(--npw-font-h, Tajawal, sans-serif);
  transition:transform .15s ease, box-shadow .15s;
}
.npw-ask-fab:hover{ transform:translateY(-2px) }
.npw-ask-fab[hidden],.npw-ask-panel[hidden]{ display:none!important }
.npw-ask-fab:focus-visible{ outline:none; box-shadow:var(--npw-ring) }
/* Lift above AdSense anchor / app banner when body has those classes */
body.npw-app-banner-on .npw-ask-fab,
body.npw-ads-anchor-on .npw-ask-fab{ bottom:max(86px, calc(env(safe-area-inset-bottom) + 72px)) }
body.npw-app-banner-on .npw-ask-panel,
body.npw-ads-anchor-on .npw-ask-panel{ bottom:max(86px, calc(env(safe-area-inset-bottom) + 72px)) }

.npw-ask-panel{
  position:fixed; z-index:71;
  left:max(12px, env(safe-area-inset-left));
  right:auto;
  bottom:max(84px, calc(env(safe-area-inset-bottom) + 72px));
  width:min(400px, calc(100vw - 24px));
  max-height:min(560px, calc(100vh - 120px));
  background:var(--card,#fff); color:var(--ink,#0B2530);
  border:1px solid var(--line,#E4E0D5); border-radius:20px;
  box-shadow:var(--sh2); display:flex; flex-direction:column; overflow:hidden;
  font-family:var(--npw-font-b, "Readex Pro", Tajawal, sans-serif);
}
.npw-ask-hd{
  display:flex; align-items:center; gap:10px; padding:12px 14px;
  background:linear-gradient(120deg, var(--night,#05262B), var(--night2,#0A3B42));
  color:#E9F5F3;
}
.npw-ask-hd strong{ flex:1; font:800 15px/1.3 var(--npw-font-h, Tajawal, sans-serif) }
.npw-ask-hd button{
  background:transparent; border:0; color:#B9E6DF; cursor:pointer;
  font-size:20px; line-height:1; padding:4px 8px; border-radius:8px;
}
.npw-ask-hd button:hover{ background:rgba(255,255,255,.08) }
.npw-ask-sub{ font-size:11.5px; opacity:.85; margin:2px 0 0 }
.npw-ask-msgs{
  flex:1; overflow:auto; padding:12px 14px; display:flex; flex-direction:column; gap:10px;
  background:var(--bg,#F6F4EE);
}
.npw-ask-bubble{
  max-width:95%; padding:10px 12px; border-radius:14px; font-size:14px; line-height:1.65;
  overflow-wrap:anywhere;
}
.npw-ask-bubble.user{
  align-self:flex-end; background:var(--teal,#0A6B6E); color:#fff;
  border-bottom-left-radius:4px;
}
html[dir="rtl"] .npw-ask-bubble.user{ border-bottom-left-radius:14px; border-bottom-right-radius:4px }
.npw-ask-bubble.bot{
  align-self:flex-start; background:var(--card,#fff); border:1px solid var(--line);
  border-bottom-right-radius:4px;
}
html[dir="rtl"] .npw-ask-bubble.bot{ border-bottom-right-radius:14px; border-bottom-left-radius:4px }
.npw-ask-bubble.bot h1,.npw-ask-bubble.bot h2,.npw-ask-bubble.bot h3{ font-size:14.5px; margin:.4em 0; color:var(--teal-deep) }
.npw-ask-bubble.bot p{ margin:.35em 0 }
.npw-ask-bubble.bot ul{ margin:.35em 0; padding-inline-start:1.2em }
.npw-ask-bubble.bot a{ color:var(--teal); text-decoration:underline }
.npw-ask-sources{ display:flex; flex-wrap:wrap; gap:6px; margin-top:8px }
.npw-ask-sources a{
  font-size:12px; padding:4px 10px; border-radius:999px;
  background:var(--teal-tint,#E1F2EE); color:var(--teal-deep,#063A40);
  text-decoration:none; border:1px solid var(--line);
}
.npw-ask-sources a:hover{ background:var(--mint-soft,#B9E6DF) }
.npw-ask-form{
  display:flex; gap:8px; padding:10px 12px; border-top:1px solid var(--line);
  background:var(--card);
}
.npw-ask-form textarea{
  flex:1; resize:none; min-height:42px; max-height:96px;
  border:1px solid var(--line); border-radius:12px; padding:8px 10px;
  font:inherit; font-size:14px; background:var(--bg); color:var(--ink);
}
.npw-ask-form button[type=submit]{
  border:0; border-radius:12px; padding:0 14px; cursor:pointer;
  background:var(--amber,#FFB72E); color:var(--amber-ink,#2A1A00);
  font:800 14px var(--npw-font-h, Tajawal, sans-serif);
}
.npw-ask-form button[type=submit]:disabled{ opacity:.55; cursor:wait }
.npw-ask-hp{ position:absolute; left:-9999px; opacity:0; height:0; width:0 }
.npw-ask-hint{ font-size:11.5px; color:var(--muted,#4A5F66); padding:0 14px 10px; background:var(--card) }
.npw-ask-typing{ font-size:13px; color:var(--muted); font-style:italic }

/* Full /ask page */
.npw-ask-page{ max-width:720px; margin:0 auto }
.npw-ask-page .npw-ask-panel{
  position:static; width:100%; max-height:none; inset:auto; box-shadow:var(--sh1);
}
.npw-ask-chips{ display:flex; flex-wrap:wrap; gap:8px; margin:14px 0 0 }
.npw-ask-chips button{
  border:1px solid var(--line); background:var(--card); border-radius:999px;
  padding:7px 12px; font:600 13px var(--npw-font-b); cursor:pointer; color:var(--ink);
}
.npw-ask-chips button:hover{ border-color:var(--teal); color:var(--teal-deep) }

@media (max-width:480px){
  .npw-ask-panel{ width:calc(100vw - 16px); left:8px; right:auto; max-height:min(70vh, 520px) }
}
