/* chatbot-style.css — pixel-inspired, mobile-first, responsive
   Matches screenshots: rounded avatar, centered big avatar, pill chips, thin divider,
   subtle shadows, large rounded input, mobile modal full-height behavior.
*/

/* root vars */
:root {
  --accent: #ff7a18;
  --muted: #6b7280;
  --bg: #ffffff;
  --surface: #f8fafc;
  --chip-border: rgba(15,23,42,0.06);
  --soft: rgba(2,6,23,0.04);
  --radius-pill: 999px;
  --max-width: 420px;
  --modal-height: 86vh;
  --font-family: "Noto Sans", "Roboto", Arial, sans-serif;
}

* { box-sizing: border-box; -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; }
html,body { height:100%; margin:0; padding:0; font-family:var(--font-family); }

/* MINI BUTTON (floating pill) */
#ncg-mini-btn {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 999999;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-width:220px;
  max-width:320px;
  background:linear-gradient(180deg, #fff, #fff);
  border:2px solid var(--accent);
  padding:8px 12px;
  border-radius:28px;
  box-shadow: 0 10px 28px rgba(2,6,23,0.10);
  cursor:pointer;
}
.ncg-mini-left { display:flex; flex-direction:column; gap:2px; text-align:left; }
.ncg-mini-text { color:var(--accent); font-weight:700; font-size:14px; line-height:1; }
.ncg-mini-sub  { color:var(--muted); font-size:12px; line-height:1; }
.ncg-mini-avatar img { width:36px; height:36px; border-radius:50%; object-fit:cover; }

/* MODAL (mobile-first: full screen like screenshots) */
.ncg-modal {
  display:none;
  position: fixed;
  right: 6%;
  left: 6%;
  bottom: 8%;
  z-index: 999999;
  width: 88%;
  max-width: var(--max-width);
  height: var(--modal-height);
  background: var(--bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 40px 90px rgba(2,6,23,0.18);
  flex-direction: column;
}

/* show */
.ncg-modal[aria-hidden="false"] { display:flex; animation: ncg-slide .18s ease forwards; }
@keyframes ncg-slide {
  from { transform: translateY(8px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* header */
.ncg-modal-header {
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 14px;
  border-bottom:1px solid var(--soft);
}
.ncg-close { background:transparent; border:0; font-size:20px; color:#374151; cursor:pointer; line-height:1; }
.ncg-header-title { display:flex; align-items:center; gap:10px; }
.ncg-header-avatar { width:34px; height:34px; border-radius:50%; object-fit:cover; }
.ncg-header-text { font-weight:700; font-size:15px; color:#111827; }

/* modal body */
.ncg-modal-body {
  padding:14px 16px;
  overflow:auto;
  flex:1;
  text-align:center;
}

/* big centered avatar (prominent) */
.ncg-big-avatar-wrap { margin-top:6px; margin-bottom:8px; display:flex; justify-content:center; }
.ncg-big-avatar {
  width:88px; height:88px;
  border-radius:999px;
  border:6px solid #fff;
  box-shadow: 0 8px 28px rgba(2,6,23,0.06);
  object-fit:cover;
  display:block;
}

/* main help title — bold and centered */
.ncg-help-title {
  font-size:16px; font-weight:700; color:#111827; margin:8px 0 12px;
}

/* thin divider line */
.ncg-divider { width:100%; display:flex; justify-content:center; margin:8px 0 8px; }
.ncg-divider span { width:56%; display:block; height:1px; background:#f3f4f6; }

/* section label */
.ncg-section-label { color:var(--muted); font-size:13px; margin-bottom:12px; }

/* chips: vertical stack of rounded pills (like screenshot) */
.ncg-chips {
  display:flex;
  flex-direction:column;
  gap:10px;
  align-items:center;
  margin-bottom:12px;
}
.ncg-chip {
  display:inline-block;
  padding:8px 18px;
  border-radius: var(--radius-pill);
  background: #fff;
  border: 1px solid var(--chip-border);
  min-width: 180px;
  max-width: 94%;
  box-shadow: 0 8px 20px rgba(2,6,23,0.03);
  font-size:14px;
  color:#111827;
  text-align:center;
  font-weight:600;
  cursor:pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.ncg-chip:hover { transform: translateY(-3px); box-shadow: 0 14px 40px rgba(2,6,23,0.06); }

/* messages area */
.ncg-messages { display:flex; flex-direction:column; gap:10px; padding:4px 4px; text-align:left; }

/* message bubbles */
.ncg-msg { max-width:100%; }
.ncg-msg-text { padding:10px 12px; border-radius:12px; display:inline-block; line-height:1.4; }
.ncg-user .ncg-msg-text { background: linear-gradient(90deg,#ecfeff,#dbf4ff); color:#0c4a6e; }
.ncg-bot .ncg-msg-text { background: var(--surface); color:#0f172a; box-shadow: 0 6px 18px rgba(2,6,23,0.03); }

/* summary & source styling */
.ncg-summary { font-size:14px; font-weight:600; color:#111827; }
.ncg-source { margin-top:8px; font-size:13px; color:#374151; }
.ncg-source a { color:var(--accent); text-decoration:none; font-weight:600; }
.ncg-source a:hover { text-decoration:underline; }

/* footer — large rounded input with send circle */
.ncg-modal-footer {
  display:flex;
  gap:10px;
  padding:12px 14px;
  border-top:1px solid var(--soft);
  align-items:center;
  background: linear-gradient(180deg, rgba(255,255,255,0.4), rgba(255,255,255,0.6));
}
.ncg-input {
  flex:1;
  padding:14px 18px;
  border-radius:36px;
  border:1px solid #e6e9ef;
  background:#fbfbfc;
  font-size:15px;
  outline:none;
}
.ncg-send {
  width:46px;
  height:46px;
  border-radius:50%;
  border:0;
  background: linear-gradient(90deg,var(--accent), #ffb84a);
  color:#fff;
  font-size:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  box-shadow: 0 10px 22px rgba(255,155,60,0.18);
}

/* loading / empty text */
.ncg-loading, .ncg-empty { color:var(--muted); font-size:13px; }

/* small screens: full height modal like screenshots (top close visible) */
@media (max-width:520px){
  .ncg-modal {
    left:6%;
    right:6%;
    bottom:6%;
    top:6%;
    width:88%;
    height:88vh;
    border-radius:12px;
  }
  .ncg-big-avatar { width:72px; height:72px; }
  .ncg-header-avatar { width:30px; height:30px; }
  .ncg-help-title { font-size:15px; }
  .ncg-chip { min-width:150px; font-size:13px; padding:7px 16px; }
  .ncg-input { padding:12px 14px; font-size:14px; }
}

/* medium+ screens: keep modal narrower and centered */
@media (min-width: 700px){
  .ncg-modal { right: 24px; left: auto; bottom: 24px; top: auto; width: 360px; height: 560px; border-radius:12px; }
  .ncg-modal-body { padding:18px; }
  .ncg-chips { margin-bottom:16px; }
}

/* very large screens: small adjustments */
@media (min-width: 1100px){
  .ncg-modal { width: 420px; height: 600px; right: 36px; bottom: 36px; }
}

/* accessibility focus */
.ncg-chip:focus, .ncg-send:focus, #ncg-mini-btn:focus, .ncg-close:focus, .ncg-input:focus { outline: 3px solid rgba(255,122,24,0.12); outline-offset:2px; }

/* small visual polish to match screenshot spacing */
.ncg-modal-body .ncg-chips + .ncg-messages { margin-top:6px; }

/* ensure images don't overflow */
.ncg-modal img { max-width:100%; height:auto; display:block; }

.ncg-big-avatar-wrap img:not(:first-child) {
  display: none !important;
}

