/* NIFM Academy AI chat widget. Change the variables below to match the site. */
#nifm-chat-root{
  --nc-primary:#0f3b5f;      /* header, user bubbles, buttons */
  --nc-accent:#0e9f9a;       /* launcher, links, focus */
  --nc-bg:#ffffff;
  --nc-bot-bg:#f1f4f8;
  --nc-text:#1d2733;
  --nc-muted:#5d6b7a;
  --nc-bottom:50px;          /* raise this if it overlaps the WhatsApp / Call buttons */
  --nc-side:20px;
  --nc-z:2147483000;
  position:fixed;right:var(--nc-side);bottom:var(--nc-bottom);z-index:var(--nc-z);
  font:14px/1.45 system-ui,-apple-system,"Segoe UI",Roboto,"Noto Sans","Noto Sans Devanagari",Arial,sans-serif;
  color:var(--nc-text);
}
#nifm-chat-root *,#nifm-chat-root *::before,#nifm-chat-root *::after{box-sizing:border-box}
#nifm-chat-root [hidden]{display:none!important}

.nc-launch{display:flex;align-items:center;gap:8px;height:54px;padding:0 18px 0 15px;border:0;border-radius:27px;cursor:pointer;
  background:var(--nc-accent);color:#fff;font-weight:600; font-size: 15px; line-height:1; font-family:inherit;box-shadow:0 6px 20px rgba(15,59,95,.28);transition:transform .15s}
.nc-launch:hover{transform:translateY(-2px)}
.nc-launch:focus-visible,.nc-close:focus-visible,.nc-send:focus-visible,.nc-chip:focus-visible{outline:3px solid var(--nc-accent);outline-offset:2px}
.nc-open .nc-launch{display:none}

.nc-panel{position:absolute;right:0;bottom:0;width:380px;height:min(620px,calc(100vh - 50px));display:flex;flex-direction:column;
  background:var(--nc-bg);border-radius:16px;overflow:hidden;box-shadow:0 18px 50px rgba(15,35,60,.28)}
.nc-head{display:flex;align-items:center;gap:10px;padding:12px 12px 12px 14px;background:var(--nc-primary);color:#fff}
.nc-avatar{width:34px;height:34px;border-radius:50%;background:var(--nc-accent);display:grid;place-items:center;font-weight:700}
.nc-title{flex:1;display:flex;flex-direction:column;line-height:1.2}
.nc-title span{font-size:12px;opacity:.8}
.nc-close{width:34px;height:34px;border:0;border-radius:8px;background:transparent;color:#fff;font-size:26px;line-height:1;cursor:pointer}
.nc-close:hover{background:rgba(255,255,255,.12)}

.nc-log{flex:1;overflow-y:auto;padding:14px;display:flex;flex-direction:column;gap:10px;overscroll-behavior:contain}
.nc-msg{max-width:86%;padding:9px 12px;border-radius:14px;word-wrap:break-word;overflow-wrap:anywhere}
.nc-msg p{margin:0 0 6px}.nc-msg p:last-child{margin-bottom:0}
.nc-msg ul,.nc-msg ol{margin:4px 0 6px;padding-left:18px}.nc-msg li{margin:2px 0}
.nc-gap{height:4px}
.nc-bot{align-self:flex-start;background:var(--nc-bot-bg);border-bottom-left-radius:4px}
.nc-user{align-self:flex-end;background:var(--nc-primary);color:#fff;border-bottom-right-radius:4px}
.nc-bot a{color:var(--nc-primary);font-weight:600;text-decoration:underline;text-underline-offset:2px}

.nc-typing{display:flex;gap:4px;padding:12px 14px}
.nc-typing span{width:7px;height:7px;border-radius:50%;background:#9aa7b4;animation:nc-b 1s infinite}
.nc-typing span:nth-child(2){animation-delay:.15s}.nc-typing span:nth-child(3){animation-delay:.3s}
@keyframes nc-b{0%,80%,100%{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}

.nc-chips{display:flex;flex-wrap:wrap;gap:6px;padding:0 14px 10px}
.nc-chip{border:1px solid #cfd8e2;background:#fff;color:var(--nc-primary);border-radius:16px;padding:6px 11px;font:inherit;font-size:13px;cursor:pointer}
.nc-chip:hover{border-color:var(--nc-accent);background:#f3fbfa}
.nc-suggest{display:flex;flex-wrap:wrap;gap:6px;align-self:flex-start;max-width:94%}

.nc-form{display:flex;align-items:flex-end;gap:8px;padding:10px 12px;border-top:1px solid #e6ebf0}
.nc-form textarea{flex:1;resize:none;border:1px solid #cfd8e2;border-radius:10px;padding:9px 11px;font:inherit;max-height:110px;color:var(--nc-text);background:#fff}
.nc-form textarea:focus{outline:none;border-color:var(--nc-accent);box-shadow:0 0 0 3px rgba(14,159,154,.18)}
.nc-send{width:40px;height:40px;flex:none;border:0;border-radius:10px;background:var(--nc-primary);color:#fff;cursor:pointer;display:grid;place-items:center}
.nc-send:disabled{opacity:.5;cursor:default}
.nc-foot{font-size:11px;color:var(--nc-muted);text-align:center;padding:0 12px 9px}
.nc-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}

.nc-lead{max-width:94%;background:#fff;border:1px solid #dbe3ea}
.nc-lead form{display:flex;flex-direction:column;gap:7px;margin-top:6px}
.nc-lead label{display:flex;flex-direction:column;font-size:12px;color:var(--nc-muted);gap:3px}
.nc-lead input:not([type=checkbox]){border:1px solid #cfd8e2;border-radius:8px;padding:8px 9px;font:inherit;font-size:14px;color:var(--nc-text)}
.nc-lead input:focus{outline:none;border-color:var(--nc-accent)}
.nc-lead .nc-consent{flex-direction:row;align-items:flex-start;gap:6px;font-size:12px;line-height:1.35}
.nc-lead .nc-consent input{margin-top:2px}
.nc-hp{position:absolute!important;left:-9999px!important;width:1px;height:1px;opacity:0}
.nc-err{color:#b42318;font-size:12px}
.nc-err:empty{display:none}
.nc-submit{border:0;border-radius:9px;padding:10px;background:var(--nc-accent);color:#fff;font:600 14px/1 inherit;font-family:inherit;cursor:pointer}
.nc-submit:disabled{opacity:.6}

@media (max-width:480px){
  #nifm-chat-root{--nc-side:14px;--nc-bottom:14px}
  .nc-launch-label{display:none}
  .nc-launch{width:56px;height:56px;padding:0;justify-content:center;border-radius:50%}
  .nc-open{inset:0;right:0;bottom:0}
  .nc-open .nc-panel{position:fixed;inset:0;width:100%;height:100%;border-radius:0}
  .nc-form textarea{font-size:16px} /* stops iOS zoom */
}
@media (prefers-reduced-motion:reduce){.nc-launch,.nc-typing span{transition:none;animation:none}}
