/* Online NIFM chat assistant - widget styles. Everything is scoped to #nifmc-root. */
#nifmc-root {
  --nifmc-accent: #4285f4;
  --nifmc-ink: #161c2d;
  --nifmc-muted: #6d6d6d;
  --nifmc-line: #e9eaf0;
  --nifmc-soft: #f4f7fa;
  --nifmc-bottom: 50px;
  position: fixed;
  right: 20px;
  bottom: var(--nifmc-bottom);
  z-index: 1040;
  font-family: "Roboto", "Segoe UI", Arial, "Noto Sans Devanagari", sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: var(--nifmc-ink);
  text-align: left;
}
#nifmc-root.nifmc-left { right: auto; left: 16px; }
#nifmc-root.nifmc-open { z-index: 1046; }                      /* above the site's fixed bars, below its pop-up windows */
#nifmc-root *, #nifmc-root *::before, #nifmc-root *::after { box-sizing: border-box; }
#nifmc-root button, #nifmc-root input, #nifmc-root select { font: inherit; color: inherit; margin: 0; }
#nifmc-root p { margin: 0 0 6px; }
#nifmc-root p:last-child { margin-bottom: 0; }
#nifmc-root ul, #nifmc-root ol { margin: 4px 0 6px; padding-left: 18px; }
#nifmc-root li { margin: 0 0 3px; }

/* launcher */
#nifmc-root .nifmc-launcher {
  display: inline-flex; align-items: center; gap: 8px;
  float: right;
  border: 0; border-radius: 28px; padding: 11px 18px 11px 14px;
  background: var(--nifmc-accent); color: #fff; font-weight: 500; font-size: 15px;
  box-shadow: 0 6px 18px rgba(22, 28, 45, .28);
  cursor: pointer;
}
#nifmc-root.nifmc-left .nifmc-launcher { float: left; }
#nifmc-root .nifmc-launcher:hover { filter: brightness(1.06); }
#nifmc-root .nifmc-launcher:focus-visible, #nifmc-root .nifmc-chip:focus-visible, #nifmc-root .nifmc-send:focus-visible,
#nifmc-root .nifmc-close:focus-visible, #nifmc-root .nifmc-card:focus-visible, #nifmc-root .nifmc-submit:focus-visible { outline: 3px solid rgba(66, 133, 244, .45); outline-offset: 2px; }
#nifmc-root .nifmc-ic {
  width: 22px; height: 18px; border-radius: 6px 6px 6px 2px; background: #fff; position: relative; flex: 0 0 auto;
}
#nifmc-root .nifmc-ic::before, #nifmc-root .nifmc-ic::after {
  content: ""; position: absolute; left: 5px; right: 5px; height: 2px; border-radius: 2px; background: var(--nifmc-accent);
}
#nifmc-root .nifmc-ic::before { top: 5px; }
#nifmc-root .nifmc-ic::after { top: 10px; right: 9px; }
#nifmc-root.nifmc-open .nifmc-launcher { display: none; }

/* the small bubble next to the button: auto-open on phones, "Continue our chat", reminders */
#nifmc-root .nifmc-teaser {
  display: flex; align-items: flex-start; gap: 4px; clear: both; float: right; max-width: 260px; margin: 0 0 10px;
  border: 1px solid var(--nifmc-line); border-radius: 12px 12px 2px 12px; padding: 4px 4px 4px 0;
  background: #fff; box-shadow: 0 6px 18px rgba(22, 28, 45, .18); animation: nifmc-in .2s ease-out;
}
#nifmc-root.nifmc-left .nifmc-teaser { float: left; border-radius: 12px 12px 12px 2px; }
#nifmc-root .nifmc-teaser-body { border: 0; background: transparent; padding: 7px 4px 7px 12px; text-align: left; color: var(--nifmc-ink); cursor: pointer; line-height: 1.4; }
#nifmc-root .nifmc-teaser-x { border: 0; background: transparent; color: var(--nifmc-muted); font-size: 18px; line-height: 1; width: 28px; height: 28px; border-radius: 6px; cursor: pointer; flex: 0 0 auto; padding: 0; }
#nifmc-root .nifmc-teaser-x:hover { background: var(--nifmc-soft); }
#nifmc-root.nifmc-open .nifmc-teaser { display: none !important; }

/* panel */
#nifmc-root .nifmc-panel {
  display: none; flex-direction: column;
  width: 370px; max-width: calc(100vw - 24px);
  height: 560px; max-height: calc(100vh - var(--nifmc-bottom) - 24px);
  background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 14px 44px rgba(22, 28, 45, .30);
  border: 1px solid var(--nifmc-line);
}
#nifmc-root.nifmc-open .nifmc-panel { display: flex; }
#nifmc-root .nifmc-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 12px 12px 16px; background: var(--nifmc-ink); color: #fff; flex: 0 0 auto;
}
#nifmc-root .nifmc-titles { display: flex; flex-direction: column; min-width: 0; }
#nifmc-root .nifmc-titles strong { font-size: 15px; font-weight: 500; color: #fff; }
#nifmc-root .nifmc-titles span { font-size: 12px; color: #c9d1e0; }
#nifmc-root .nifmc-close {
  border: 0; background: transparent; color: #fff; font-size: 26px; line-height: 1; width: 34px; height: 34px; border-radius: 8px; cursor: pointer; padding: 0;
}
#nifmc-root .nifmc-close:hover { background: rgba(255, 255, 255, .14); }

#nifmc-root .nifmc-body { flex: 1 1 auto; overflow-y: auto; padding: 14px 12px 6px; background: var(--nifmc-soft); overscroll-behavior: contain; }
#nifmc-root .nifmc-row { display: flex; margin: 0 0 10px; }
#nifmc-root .nifmc-me { justify-content: flex-end; }
#nifmc-root .nifmc-bubble {
  max-width: 88%; padding: 9px 12px; border-radius: 12px 12px 12px 3px; background: #fff; border: 1px solid var(--nifmc-line);
  overflow-wrap: anywhere; word-break: break-word;
}
#nifmc-root .nifmc-me .nifmc-bubble { background: var(--nifmc-accent); border-color: var(--nifmc-accent); color: #fff; border-radius: 12px 12px 3px 12px; }
#nifmc-root .nifmc-new { animation: nifmc-in .18s ease-out; }
@keyframes nifmc-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
#nifmc-root a.nifmc-link { color: #1a56c4; text-decoration: underline; font-weight: 500; }
#nifmc-root a.nifmc-link:hover { color: #0c3f9c; }

/* course cards */
#nifmc-root .nifmc-cards { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
#nifmc-root a.nifmc-card {
  display: block; padding: 8px 10px; border: 1px solid var(--nifmc-line); border-left: 3px solid var(--nifmc-accent); border-radius: 8px;
  background: #fff; color: var(--nifmc-ink); text-decoration: none;
}
#nifmc-root a.nifmc-card:hover { background: #eef4fe; }
#nifmc-root .nifmc-card-t { display: block; font-weight: 500; }
#nifmc-root .nifmc-card-m { display: block; font-size: 12.5px; color: var(--nifmc-muted); margin-top: 2px; }
#nifmc-root .nifmc-card-m b { color: var(--nifmc-ink); font-weight: 500; }
#nifmc-root a.nifmc-more { display: inline-block; margin-top: 8px; color: #1a56c4; font-weight: 500; text-decoration: none; }
#nifmc-root a.nifmc-more::after { content: " \203A"; }
#nifmc-root a.nifmc-more:hover { text-decoration: underline; }

/* "looking that up" dots */
#nifmc-root .nifmc-typing .nifmc-bubble { display: inline-flex; gap: 4px; padding: 12px 14px; }
#nifmc-root .nifmc-typing i { width: 7px; height: 7px; border-radius: 50%; background: #9aa6bd; animation: nifmc-dot 1s infinite ease-in-out; }
#nifmc-root .nifmc-typing i:nth-child(2) { animation-delay: .15s; }
#nifmc-root .nifmc-typing i:nth-child(3) { animation-delay: .3s; }
#nifmc-root .nifmc-typing .nifmc-bubble { align-items: center; }
#nifmc-root .nifmc-think { margin-left: 6px; font-size: 12.5px; color: var(--nifmc-muted); }
/* an answer being typed out: tap to show it all */
#nifmc-root .nifmc-streaming .nifmc-bubble { cursor: pointer; }
/* "not sure which way to go?" */
#nifmc-root .nifmc-note .nifmc-bubble { background: #fff8e6; border-color: #f3dfa8; }
@keyframes nifmc-dot { 0%, 80%, 100% { opacity: .35; transform: none; } 40% { opacity: 1; transform: translateY(-3px); } }

/* quick replies */
#nifmc-root .nifmc-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px 2px; background: var(--nifmc-soft); flex: 0 0 auto; max-height: 96px; overflow-y: auto; }
#nifmc-root .nifmc-chip {
  border: 1px solid #c5d6f7; background: #fff; color: #1a56c4; border-radius: 16px; padding: 5px 11px; font-size: 13px; cursor: pointer; white-space: nowrap;
}
#nifmc-root .nifmc-chip:hover { background: #eef4fe; }
#nifmc-root .nifmc-chip.nifmc-chip-cb { border-color: var(--nifmc-accent); background: #eef4fe; font-weight: 500; }

/* input */
#nifmc-root .nifmc-inputrow { display: flex; gap: 8px; padding: 10px 12px; background: var(--nifmc-soft); flex: 0 0 auto; margin: 0; }
#nifmc-root .nifmc-input {
  flex: 1 1 auto; min-width: 0; height: 40px; border: 1px solid #cfd6e4; border-radius: 20px; padding: 0 14px; background: #fff; font-size: 16px; outline: none; box-shadow: none;
}
#nifmc-root .nifmc-input:focus { border-color: var(--nifmc-accent); box-shadow: 0 0 0 3px rgba(66, 133, 244, .18); }
#nifmc-root .nifmc-send { flex: 0 0 auto; height: 40px; border: 0; border-radius: 20px; padding: 0 16px; background: var(--nifmc-accent); color: #fff; font-weight: 500; cursor: pointer; }
#nifmc-root .nifmc-send:disabled { opacity: .55; cursor: default; }
#nifmc-root .nifmc-foot { padding: 0 12px 8px; background: var(--nifmc-soft); color: var(--nifmc-muted); font-size: 11.5px; line-height: 1.35; text-align: center; flex: 0 0 auto; }

/* call-back form */
#nifmc-root .nifmc-form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
#nifmc-root .nifmc-field { display: flex; flex-direction: column; gap: 3px; margin: 0; font-size: 12.5px; color: var(--nifmc-muted); font-weight: 400; }
#nifmc-root .nifmc-field input, #nifmc-root .nifmc-field select {
  width: 100%; height: 38px; border: 1px solid #cfd6e4; border-radius: 8px; padding: 0 10px; background: #fff; color: var(--nifmc-ink); font-size: 16px; outline: none; box-shadow: none;
}
#nifmc-root .nifmc-field input:focus, #nifmc-root .nifmc-field select:focus { border-color: var(--nifmc-accent); box-shadow: 0 0 0 3px rgba(66, 133, 244, .18); }
#nifmc-root .nifmc-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }
#nifmc-root .nifmc-err { color: #b3261e; font-size: 13px; min-height: 0; }
#nifmc-root .nifmc-submit { height: 40px; border: 0; border-radius: 8px; background: var(--nifmc-accent); color: #fff; font-weight: 500; cursor: pointer; }
#nifmc-root .nifmc-submit:disabled { opacity: .6; cursor: default; }
#nifmc-root .nifmc-small { font-size: 11.5px; color: var(--nifmc-muted); margin: 0; }
#nifmc-root .nifmc-consent { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--nifmc-muted); font-weight: 400; margin: 2px 0 0; cursor: pointer; }
#nifmc-root .nifmc-consent input { width: 18px; height: 18px; margin: 1px 0 0; flex: 0 0 auto; accent-color: var(--nifmc-accent); }

/* phones: the chat becomes a sheet over the page */
@media (max-width: 600px) {
  #nifmc-root { right: 10px; }
  #nifmc-root.nifmc-left { left: 10px; }
  #nifmc-root.nifmc-open { right: 0; left: 0; bottom: 0; top: 0; z-index: 2147483000; }      /* over the site's sticky header and bottom bar */
  html.nifmc-lock, html.nifmc-lock body { overflow: hidden !important; }
  #nifmc-root.nifmc-open .nifmc-panel { width: 100%; max-width: 100%; height: 100%; max-height: 100%; border-radius: 0; border: 0; }
  #nifmc-root .nifmc-launcher { padding: 10px 14px 10px 12px; font-size: 14px; }
  #nifmc-root .nifmc-teaser { max-width: calc(100vw - 40px); }
}
@media (prefers-reduced-motion: reduce) {
  #nifmc-root .nifmc-new, #nifmc-root .nifmc-typing i, #nifmc-root .nifmc-teaser { animation: none; }
}
@media print { #nifmc-root { display: none !important; } }
