/* NodeGravity Live Chat – visitor widget (bottom-left) */
.ngc { --ngc-ink: #0e2a5c; --ngc-text: #3b4566; --ngc-line: #e5eaf5; position: fixed; left: 24px; bottom: 32px; z-index: 99990; font: 400 14.5px/1.45 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ngc-text); }
.ngc *, .ngc *::before, .ngc *::after { box-sizing: border-box; }
.ngc svg { width: 20px; height: 20px; display: block; }
:root { --ngc-main: #0e2a5c; --ngc-accent: #f5b81c; } /* defaults – Settings colours are printed after this */

/* launcher */
.ngc-launch { position: relative; width: 68px; height: 68px; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: var(--ngc-main); background: linear-gradient(135deg, var(--ngc-accent), #e09a0b); box-shadow: 0 0 0 4px rgba(245, 184, 28, .18), 0 0 26px 6px rgba(245, 184, 28, .45), 0 14px 30px -10px rgba(224, 154, 11, .7), 0 4px 10px rgba(14, 42, 92, .15); animation: ngcGlow 2.8s ease-in-out infinite; transition: transform .25s cubic-bezier(.2, .7, .2, 1), box-shadow .25s; }
.ngc-launch:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 0 0 5px rgba(245, 184, 28, .25), 0 0 34px 10px rgba(245, 184, 28, .6), 0 16px 32px -10px rgba(224, 154, 11, .75); }
.ngc-launch:focus-visible { outline: 3px solid var(--ngc-main); outline-offset: 3px; }
.ngc-launch__ico { grid-area: 1 / 1; transition: transform .3s, opacity .3s; }
.ngc-launch__ico svg { width: 30px; height: 30px; stroke-width: 2.2; }
.ngc-launch__x { opacity: 0; transform: rotate(-90deg) scale(.6); }
.ngc.is-open .ngc-launch__chat { opacity: 0; transform: rotate(90deg) scale(.6); }
.ngc.is-open .ngc-launch__x { opacity: 1; transform: none; }
.ngc.is-open .ngc-launch { background: var(--ngc-main); color: #fff; box-shadow: 0 14px 30px -10px rgba(14, 42, 92, .6); animation: none; }
.ngc-launch__badge { position: absolute; top: -3px; right: -3px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: #ef4444; color: #fff; font: 700 12px/22px "Inter", sans-serif; box-shadow: 0 0 0 3px #fff; }
.ngc-launch__pulse { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 0 rgba(245, 184, 28, .55); animation: ngcRing 2.6s infinite; pointer-events: none; }
.ngc.is-open .ngc-launch__pulse { display: none; }

/* teaser bubble */
.ngc-teaser { position: absolute; left: 0; bottom: 84px; display: flex; align-items: flex-start; gap: 4px; width: max-content; max-width: 260px; padding: 12px 10px 12px 16px; border-radius: 16px 16px 16px 4px; background: #fff; box-shadow: 0 16px 36px -14px rgba(14, 42, 92, .35), 0 2px 6px rgba(14, 42, 92, .08); animation: ngcIn .45s cubic-bezier(.2, .7, .2, 1) both; }
.ngc-teaser[hidden] { display: none; }
.ngc-teaser__text { border: 0; background: none; padding: 0; text-align: left; font: 600 14px/1.4 inherit; color: var(--ngc-ink); cursor: pointer; }
.ngc-teaser__x { flex: none; width: 22px; height: 22px; border: 0; border-radius: 50%; background: #f1f4fa; color: #6b7593; display: grid; place-items: center; cursor: pointer; }
.ngc-teaser__x svg { width: 13px; height: 13px; }
@keyframes ngcIn { from { opacity: 0; transform: translateY(10px) scale(.96); } }

/* panel */
.ngc-panel { position: absolute; left: 0; bottom: 86px; width: 370px; height: min(600px, calc(100vh - 150px)); display: flex; flex-direction: column; overflow: hidden; border-radius: 20px; background: #f6f8fc; box-shadow: 0 30px 70px -20px rgba(14, 42, 92, .45), 0 4px 14px rgba(14, 42, 92, .1); opacity: 0; transform: translateY(14px) scale(.97); transform-origin: bottom left; transition: opacity .22s, transform .25s cubic-bezier(.2, .7, .2, 1); }
.ngc-panel[hidden] { display: none; }
.ngc-panel.is-in { opacity: 1; transform: none; }
.ngc-head { position: relative; display: flex; align-items: center; gap: 12px; padding: 16px 12px 16px 16px; background: radial-gradient(80% 140% at 100% 0%, rgba(245, 184, 28, .28), transparent 60%), var(--ngc-main); color: #fff; }
.ngc-avatar { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: rgba(255, 255, 255, .14); border: 2px solid rgba(255, 255, 255, .5); }
.ngc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ngc-head__txt { flex: 1; min-width: 0; }
.ngc-head__txt b { display: block; font: 700 16px/1.25 "Plus Jakarta Sans", "Inter", sans-serif; color: #fff; }
.ngc-head__txt small { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: rgba(255, 255, 255, .82); }
.ngc-dot { width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; flex: none; }
.ngc-dot.is-on { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .25); }
.ngc-hbtn { width: 34px; height: 34px; flex: none; border: 0; border-radius: 10px; background: transparent; color: #fff; display: grid; place-items: center; cursor: pointer; }
.ngc-hbtn:hover { background: rgba(255, 255, 255, .12); }
.ngc-hbtn[hidden] { display: none; }
.ngc-menu { position: absolute; right: 12px; top: 64px; z-index: 3; display: grid; padding: 6px; border-radius: 12px; background: #fff; box-shadow: 0 16px 36px -14px rgba(14, 42, 92, .4); }
.ngc-menu[hidden] { display: none; }
.ngc-menu button { padding: 9px 12px; border: 0; border-radius: 8px; background: none; text-align: left; font: 500 13.5px inherit; color: var(--ngc-ink); cursor: pointer; }
.ngc-menu button:hover { background: #f3f6fc; }
.ngc-menu button[hidden] { display: none; }

.ngc-body { flex: 1; min-height: 80px; overflow-y: auto; padding: 16px 14px 6px; scroll-behavior: smooth; overscroll-behavior: contain; }
.ngc-list { display: grid; gap: 10px; }
.ngc-msg { display: grid; justify-items: start; gap: 3px; max-width: 86%; animation: ngcIn .3s ease both; }
.ngc-msg__who { font-size: 11.5px; font-weight: 600; color: #6b7593; padding-left: 4px; }
.ngc-msg__b { padding: 10px 14px; border-radius: 16px 16px 16px 4px; background: #fff; color: var(--ngc-ink); box-shadow: 0 1px 2px rgba(14, 42, 92, .06); white-space: pre-wrap; word-break: break-word; }
.ngc-msg__b a { color: inherit; text-decoration: underline; }
.ngc-msg__t { font-size: 11px; color: #94a3b8; padding: 0 4px; }
.ngc-msg.is-visitor { justify-self: end; justify-items: end; }
.ngc-msg.is-visitor .ngc-msg__b { border-radius: 16px 16px 4px 16px; background: var(--ngc-main); color: #fff; }
.ngc-msg.is-sending { opacity: .6; }
.ngc-msg.is-failed .ngc-msg__b { background: #dc2626; cursor: pointer; }
.ngc-msg__err { font-size: 11.5px; color: #dc2626; }
.ngc-msg__who svg { width: 13px; height: 13px; margin: -2px 4px 0 0; vertical-align: middle; color: var(--ngc-accent); stroke: currentColor; }
.ngc-msg.is-bot .ngc-msg__b { background: #fff; border-left: 3px solid var(--ngc-accent); }
.ngc-msg.is-bot .ngc-msg__b a { color: var(--ngc-main); font-weight: 600; word-break: break-all; }
.ngc-msg.is-system { justify-self: center; max-width: 92%; padding: 6px 12px; border-radius: 99px; background: #e9eef8; color: #586380; font-size: 12.5px; text-align: center; }
.ngc-again { justify-self: center; margin-top: 6px; padding: 9px 18px; border: 0; border-radius: 99px; background: var(--ngc-accent); color: var(--ngc-main); font: 700 13.5px inherit; cursor: pointer; }
.ngc-typing { display: inline-flex; gap: 4px; margin: 6px 0 4px; padding: 11px 14px; border-radius: 16px 16px 16px 4px; background: #fff; }
.ngc-typing[hidden] { display: none; }
.ngc-typing span { width: 7px; height: 7px; border-radius: 50%; background: #a3aec6; animation: ngcDot 1.2s infinite; }
.ngc-typing span:nth-child(2) { animation-delay: .15s; }
.ngc-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes ngcDot { 30% { transform: translateY(-4px); background: var(--ngc-main); } }

/* pre-chat form */
.ngc-form { display: grid; gap: 10px; padding: 14px 16px 12px; background: #fff; border-top: 1px solid var(--ngc-line); max-height: 62%; overflow-y: auto; }
.ngc-form[hidden] { display: none; }
.ngc-form__note { margin: 0; font-size: 13px; color: var(--ngc-text); }
.ngc-form label { display: grid; gap: 4px; }
.ngc-form label span { font: 600 12.5px inherit; color: var(--ngc-ink); }
.ngc-form input, .ngc-form textarea { width: 100%; padding: 10px 12px; border: 1px solid #dbe2f0; border-radius: 10px; background: #fff; font: 14px inherit; color: var(--ngc-ink); resize: none; }
.ngc-form input:focus, .ngc-form textarea:focus, .ngc-compose textarea:focus { outline: 0; border-color: var(--ngc-main); box-shadow: 0 0 0 3px rgba(14, 42, 92, .12); }
.ngc-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; }
.ngc-form__err { margin: 0; padding: 8px 10px; border-radius: 8px; background: #fef2f2; color: #b91c1c; font-size: 12.5px; }
.ngc-form__err[hidden] { display: none; }
.ngc-form__go { display: flex; align-items: center; justify-content: center; gap: 8px; height: 46px; border: 0; border-radius: 12px; background: linear-gradient(90deg, #e09a0b, var(--ngc-accent)); color: var(--ngc-main); font: 700 15px inherit; cursor: pointer; transition: transform .2s; }
.ngc-form__go:hover { transform: translateY(-1px); }
.ngc-form__go:disabled { opacity: .6; cursor: wait; }
.ngc-form__go svg { width: 17px; height: 17px; }
.ngc-form__privacy { margin: 0; font-size: 11.5px; color: #8a93ad; text-align: center; }
.ngc-form__privacy a { color: inherit; }

/* composer */
.ngc-compose { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; background: #fff; border-top: 1px solid var(--ngc-line); }
.ngc-compose[hidden] { display: none; }
.ngc-compose textarea { flex: 1; min-height: 42px; max-height: 120px; padding: 10px 12px; border: 1px solid #dbe2f0; border-radius: 12px; font: 14.5px/1.4 inherit; color: var(--ngc-ink); resize: none; }
.ngc-send { width: 42px; height: 42px; flex: none; border: 0; border-radius: 12px; display: grid; place-items: center; background: var(--ngc-accent); color: var(--ngc-main); cursor: pointer; }
.ngc-send svg { width: 19px; height: 19px; }
.ngc-foot { padding: 6px; background: #fff; text-align: center; font-size: 11px; color: #a3aec6; }

/* stay clear of other fixed UI */
body:has(.ng-buybar.is-on) .ngc { bottom: 104px; }
.admin-bar .ngc-panel { height: min(600px, calc(100vh - 180px)); }

@media (max-width: 600px) {
	.ngc { left: 16px; bottom: 24px; }
	.ngc-launch { width: 60px; height: 60px; }
	.ngc-launch__ico svg { width: 27px; height: 27px; }
	.ngc.is-open { left: 0; right: 0; bottom: 0; top: 0; }
	.ngc.is-open .ngc-launch { display: none; }
	.ngc-panel { position: fixed; inset: 0; width: auto; height: 100%; border-radius: 0; }
	.ngc-teaser { max-width: calc(100vw - 40px); }
	.ngc-form { max-height: none; }
	.ngc-form input, .ngc-form textarea, .ngc-compose textarea { font-size: 16px; } /* no iOS zoom */
}
@media (prefers-reduced-motion: reduce) {
	.ngc-launch, .ngc-launch__pulse, .ngc-msg, .ngc-teaser, .ngc-typing span { animation: none; }
	.ngc-panel { transition: none; }
}
@media print { .ngc { display: none; } }

/* voice */
.ngc-mic { width: 42px; height: 42px; flex: none; border: 1px solid #dbe2f0; border-radius: 12px; display: grid; place-items: center; background: #fff; color: var(--ngc-main); cursor: pointer; }
.ngc-mic:hover { border-color: var(--ngc-main); }
.ngc-mic[hidden] { display: none; }
.ngc-mic svg { width: 19px; height: 19px; }
.ngc-hbtn svg { width: 20px; height: 20px; }
.ngc-compose { position: relative; }
.ngc-compose.is-recording > :not(.ngv-rec) { visibility: hidden; }
.ngv-rec { position: absolute; inset: 8px 12px; display: flex; align-items: center; gap: 10px; padding: 0 4px 0 6px; border-radius: 12px; background: #fff4f4; color: #9f1239; font-size: 13.5px; }
.ngv-rec button { width: 36px; height: 36px; flex: none; border: 0; border-radius: 10px; display: grid; place-items: center; cursor: pointer; }
.ngv-rec button svg { width: 18px; height: 18px; }
.ngv-rec__x { background: transparent; color: #9f1239; }
.ngv-rec__go { margin-left: auto; background: var(--ngc-accent, #f5b81c); color: var(--ngc-main, #0e2a5c); }
.ngv-rec__dot { width: 10px; height: 10px; border-radius: 50%; background: #e11d48; animation: ngvBlink 1s infinite; }
.ngv-rec__t { font-weight: 700; font-variant-numeric: tabular-nums; }
.ngv-rec__hint { color: #be123c; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ngv-rec.is-busy button { opacity: .4; pointer-events: none; }
.ngv-rec.is-busy .ngv-rec__dot { animation: none; background: #94a3b8; }
@keyframes ngvBlink { 50% { opacity: .25; } }
.ngc-msg__b.is-voice { min-width: 210px; }
.ngv-play { display: flex; align-items: center; gap: 10px; }
.ngv-play__btn { width: 34px; height: 34px; flex: none; border: 0; border-radius: 50%; display: grid; place-items: center; background: var(--ngc-accent, #f5b81c); color: var(--ngc-main, #0e2a5c); cursor: pointer; }
.ngv-play__btn svg { width: 14px; height: 14px; }
.ngv-play__bar { position: relative; flex: 1; height: 4px; border-radius: 4px; background: rgba(148, 163, 184, .45); cursor: pointer; }
.ngv-play__bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 4px; background: currentColor; }
.ngv-play__t { font-size: 12px; font-variant-numeric: tabular-nums; opacity: .85; }
.ngv-play.is-gone { opacity: .5; }
.ngc-msg__tr { display: block; margin-top: 6px; font-size: 13px; opacity: .85; font-style: italic; }
@media (prefers-reduced-motion: reduce) { .ngv-rec__dot { animation: none; } }

/* hands-free voice conversation */
.ngc-vbar { --lvl: 0; display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #fff; border-top: 1px solid var(--ngc-line); }
.ngc-vbar[hidden] { display: none; }
.ngc-vbar__orb { position: relative; width: 52px; height: 52px; flex: none; border: 0; border-radius: 50%; display: grid; place-items: center; background: var(--ngc-main); color: #fff; cursor: pointer; }
.ngc-vbar__orb svg { position: relative; z-index: 1; width: 22px; height: 22px; }
.ngc-vbar__ring { position: absolute; inset: 0; border-radius: 50%; background: var(--ngc-accent); opacity: .35; transform: scale(calc(1 + var(--lvl) * .45)); transition: transform .08s linear; }
.ngc-vbar[data-state="hearing"] .ngc-vbar__orb { background: #e11d48; }
.ngc-vbar[data-state="hearing"] .ngc-vbar__ring { background: #fb7185; }
.ngc-vbar[data-state="sending"] .ngc-vbar__ring, .ngc-vbar[data-state="thinking"] .ngc-vbar__ring { animation: ngcPulse 1.2s ease-in-out infinite; transform: none; }
.ngc-vbar[data-state="speaking"] .ngc-vbar__orb { background: var(--ngc-accent); color: var(--ngc-main); }
.ngc-vbar[data-state="speaking"] .ngc-vbar__ring { animation: ngcPulse 1.6s ease-in-out infinite; transform: none; }
.ngc-vbar[data-state="idle"] .ngc-vbar__orb { background: #94a3b8; }
@keyframes ngcPulse { 0%, 100% { transform: scale(1); opacity: .35; } 50% { transform: scale(1.35); opacity: .15; } }
.ngc-vbar__txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ngc-vbar__txt b { font-size: 15px; color: var(--ngc-ink); }
.ngc-vbar__txt small { font-size: 12.5px; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ngc-vbar__kb { flex: none; padding: 8px 14px; border: 1px solid #dbe2f0; border-radius: 99px; background: #fff; font: 600 13px inherit; color: var(--ngc-main); cursor: pointer; }
.ngc-vbar__kb:hover { border-color: var(--ngc-main); }
@media (prefers-reduced-motion: reduce) { .ngc-vbar__ring { animation: none !important; transition: none; } }
.ngc-opt { font-style: normal; font-weight: 400; color: #94a3b8; }

/* launcher glow */
@keyframes ngcGlow {
	0%, 100% { box-shadow: 0 0 0 4px rgba(245, 184, 28, .18), 0 0 22px 4px rgba(245, 184, 28, .38), 0 14px 30px -10px rgba(224, 154, 11, .7), 0 4px 10px rgba(14, 42, 92, .15); }
	50% { box-shadow: 0 0 0 6px rgba(245, 184, 28, .26), 0 0 36px 12px rgba(245, 184, 28, .6), 0 14px 30px -10px rgba(224, 154, 11, .7), 0 4px 10px rgba(14, 42, 92, .15); }
}
@keyframes ngcRing { 0% { box-shadow: 0 0 0 0 rgba(245, 184, 28, .55); } 70% { box-shadow: 0 0 0 18px rgba(245, 184, 28, 0); } 100% { box-shadow: 0 0 0 0 rgba(245, 184, 28, 0); } }

/* custom launcher image */
.ngc-launch__chat img { width: 34px; height: 34px; object-fit: contain; display: block; }
.ngc.has-img-cover .ngc-launch { overflow: visible; }
.ngc.has-img-cover .ngc-launch__chat { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; }
.ngc.has-img-cover .ngc-launch__chat img { width: 100%; height: 100%; object-fit: cover; }

/* button on the right */
.ngc.is-right { left: auto; right: 24px; }
.ngc.is-right .ngc-launch { margin-left: auto; }
.ngc.is-right .ngc-panel { left: auto; right: 0; transform-origin: bottom right; }
.ngc.is-right .ngc-teaser { left: auto; right: 0; border-radius: 16px 16px 4px 16px; }
@media (max-width: 600px) {
	.ngc.is-right { left: auto; right: 16px; }
}
/* Chat on the right: lift the theme's back-to-top button and contact dock above it. */
body:has(.ngc.is-right) .ng-totop { bottom: 112px; }
body:has(.ngc.is-right) .ng-dock { bottom: 174px; }
body:has(.ng-buybar.is-on):has(.ngc.is-right) .ng-totop { bottom: 184px; }
body:has(.ng-buybar.is-on):has(.ngc.is-right) .ng-dock { bottom: 246px; }
@media (max-width: 900px) {
	body:has(.ngc.is-right) .ng-totop { bottom: 110px; }
	body:has(.ngc.is-right) .ng-dock { bottom: 172px; }
}
@media (max-width: 600px) {
	body:has(.ngc.is-right) .ng-totop { bottom: 96px; }
	body:has(.ngc.is-right) .ng-dock { bottom: 158px; }
}
