/* KNGX Care — visible FAB on Safari/WebKit. Do not rely on mask-composite. */
.kchat{position:fixed;right:max(1rem,env(safe-area-inset-right));bottom:max(1rem,env(safe-area-inset-bottom));z-index:240;pointer-events:none}
.kchat > *{pointer-events:auto}
/* Futuristic orb FAB (restored): dark disc, glowing core, inner + outer spinning rings, soft glow.
   Rings use a radial-gradient mask (Safari-safe) instead of mask-composite. */
@keyframes kchatSpin{to{transform:rotate(360deg)}}
@keyframes kchatGlow{0%,100%{opacity:.55;scale:.96}50%{opacity:.95;scale:1.06}}
@keyframes kchatPulse{0%,100%{opacity:.8;scale:1}50%{opacity:1;scale:1.04}}
@keyframes kchatOrbSpin{to{transform:rotate(360deg)}}
@keyframes kchatOrbSpinRev{to{transform:rotate(-360deg)}}
@keyframes kchatOrbBreath{0%,100%{opacity:.72;transform:scale(.96)}50%{opacity:1;transform:scale(1.04)}}
@keyframes kchatOrbHalo{0%,100%{opacity:.35;transform:scale(.92)}50%{opacity:.85;transform:scale(1.08)}}
@keyframes kchatOrbDash{to{transform:rotate(360deg)}}
@keyframes kchatOrbSwirl{to{transform:rotate(360deg)}}
@keyframes kchatOrbCore{0%,100%{filter:drop-shadow(0 0 .6rem rgba(34,197,94,.35))}50%{filter:drop-shadow(0 0 1.35rem rgba(74,222,128,.75))}}
.kchat-fab{
  position:relative;width:4.25rem;height:4.25rem;border-radius:50%;border:0;padding:0;cursor:pointer;
  background:radial-gradient(circle at 40% 35%,#163528 0%,#0b1210 62%,#050807 100%);color:#15803D;
  display:grid;place-items:center;isolation:isolate;overflow:visible;z-index:242;
  box-shadow:0 0 0 1px rgba(34,197,94,.35),0 0 28px rgba(34,197,94,.35),0 .6rem 1.4rem rgba(0,0,0,.35);
  transition:transform .18s
}
.kchat-fab:hover{transform:scale(1.06)}
.kchat-fab-core{
  display:block!important;width:1.05rem;height:1.05rem;border-radius:50%;position:relative;z-index:3;pointer-events:none;
  background:radial-gradient(circle,#86efac 0%,#22c55e 45%,#15803d 100%);
  box-shadow:0 0 16px rgba(74,222,128,.95),0 0 2px #bbf7d0
}
.kchat-fab-ring,.kchat-fab::before,.kchat-fab::after{
  content:"";display:block;position:absolute;border-radius:50%;border:0;pointer-events:none;
  -webkit-mask-composite:source-over;mask-composite:add
}
/* Ring 1 — inner, clockwise */
.kchat-fab-ring{
  inset:-3px;z-index:2;opacity:1;
  background:conic-gradient(from 0deg,#22c55e,#4ade80,rgba(74,222,128,.28) 40%,#86efac,#22c55e);
  -webkit-mask:radial-gradient(farthest-side,transparent calc(100% - 2.5px),#000 calc(100% - 2px));
  mask:radial-gradient(farthest-side,transparent calc(100% - 2.5px),#000 calc(100% - 2px));
  animation:kchatSpin 3.2s linear infinite
}
/* Ring 2 — outer, counter-clockwise */
.kchat-fab::before{
  inset:-9px;z-index:1;opacity:.9;
  background:conic-gradient(from 180deg,rgba(74,222,128,.3) 10%,#4ade80,rgba(74,222,128,.3) 45%,#22c55e,rgba(74,222,128,.3) 80%);
  -webkit-mask:radial-gradient(farthest-side,transparent calc(100% - 2.5px),#000 calc(100% - 2px));
  mask:radial-gradient(farthest-side,transparent calc(100% - 2.5px),#000 calc(100% - 2px));
  animation:kchatSpin 5.2s linear infinite reverse
}
.kchat-fab::after{
  inset:-16px;z-index:0;-webkit-mask:none;mask:none;
  background:radial-gradient(circle,rgba(34,197,94,.35) 0%,rgba(34,197,94,.08) 42%,transparent 68%);
  animation:kchatGlow 2.6s ease-in-out infinite
}
.kchat-fab:hover .kchat-fab-ring{animation-duration:2.1s}
.kchat-fab .kchat-ico-x{display:none;position:relative;z-index:4;width:1.35rem;height:1.35rem;stroke:#15803D}
.kchat.open .kchat-fab{background:transparent;box-shadow:none}
.kchat.open .kchat-fab .kchat-fab-core{display:none!important}
.kchat.open .kchat-fab .kchat-ico-x{display:block;box-sizing:content-box;padding:.35rem;background:#fff;border-radius:50%;box-shadow:0 .35rem .9rem rgba(16,20,24,.16)}
.kchat-scrim{display:none;position:fixed;inset:0;background:rgba(16,20,24,.4);z-index:230}
.kchat.open .kchat-scrim{display:block}
.kchat-scrim[hidden]{display:none!important}
.kchat-panel{
  position:fixed;right:max(1rem,env(safe-area-inset-right));bottom:5.6rem;width:min(24.5rem,calc(100vw - 1.5rem));
  height:min(38rem,calc(100dvh - 7rem));z-index:241;background:#fff;border-radius:1.35rem;
  border:1px solid #E5E7EB;box-shadow:0 1.5rem 3.5rem rgba(15,23,42,.22);display:flex;flex-direction:column;overflow:hidden
}
.kchat-panel[hidden]{display:none!important}
.kchat-head{display:flex;align-items:center;justify-content:space-between;gap:.65rem;padding:.95rem 1rem .35rem;background:#fff}
.kchat-head-title{font-size:1.12rem;font-weight:800;letter-spacing:-.02em;color:#111827}
.kchat-close{background:transparent;border:0;color:#6B7280;font-size:1.6rem;line-height:1;cursor:pointer;width:2.4rem;height:2.4rem;border-radius:.6rem}
.kchat-disc{margin:0;padding:0 1.15rem .65rem;font-size:.7rem;line-height:1.4;color:#9CA3AF;text-align:center}
.kchat-body{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:.5rem 1rem 1rem;display:flex;flex-direction:column;gap:.65rem;background:#fff}
/* Exact video swirl (green/yellow) + KNGX crown — no CSS fake ring */
.kchat-orb{
  position:relative;width:min(15rem,80%);min-height:12rem;aspect-ratio:1;margin:.2rem auto .4rem;pointer-events:none;flex-shrink:0;
  border-radius:50%;background:transparent!important;overflow:visible;isolation:isolate
}
.kchat-orb picture{display:block;width:100%;height:100%}.kchat-orb-anim{
  display:block!important;width:100%;height:100%;object-fit:contain;background:transparent!important;
  filter:drop-shadow(0 .25rem .9rem rgba(34,197,94,.2))
}
.kchat-orb i,.kchat-orb::before,.kchat-orb::after{display:none!important;content:none!important;background:none!important}
.kchat.open .kchat-orb{width:min(15rem,80%,34dvh);display:block!important}
.kchat-orb-mark{position:absolute;inset:0;display:grid!important;place-items:center;z-index:5;pointer-events:none;background:transparent!important;transform:none}
.kchat-crown-lg{display:block!important;width:3.35rem;height:3.35rem;object-fit:contain;background:transparent!important;margin:0;transform:translateY(4%);filter:drop-shadow(0 0 .7rem rgba(134,239,172,.95)) drop-shadow(0 0 .4rem rgba(250,204,21,.3))}

.kchat-welcome{display:flex;flex-direction:column;gap:.85rem}
.kchat-hi{margin:0;text-align:center;font-size:1.05rem;font-weight:700;color:#1F2937}
.kchat-quick{display:flex;flex-direction:column;gap:.55rem}
.kchat-quick button{width:100%;border:1px solid #E5E7EB;background:#F3F4F6;border-radius:1rem;padding:1rem 1.1rem;font:600 .92rem/1.3 Manrope,system-ui,sans-serif;cursor:pointer;display:flex;align-items:center;justify-content:space-between}
.kchat-quick button:hover{background:#ECFDF5;border-color:#BBF7D0}
.kchat-quick button span{color:#94A3B8;font-size:1.15rem}
.kchat-foot{display:flex;gap:.5rem;padding:.85rem .9rem .95rem;border-top:1px solid #F3F4F6;background:#fff}
.kchat-foot input{flex:1;min-width:0;height:2.85rem;padding:0 1.1rem;border:0;border-radius:999px;font:inherit;font-size:.92rem;background:#F3F4F6}
.kchat-foot input:focus{outline:none;background:#fff;box-shadow:inset 0 0 0 1.5px #86EFAC}
.kchat-send{width:2.85rem;height:2.85rem;border:0;border-radius:999px;background:#22C55E;color:#052e16;cursor:pointer;display:grid;place-items:center}
.kchat-send svg{width:1.1rem;height:1.1rem}
.kchat-st{display:none!important}
.kchat-bubble{max-width:88%;padding:.7rem .85rem;border-radius:1rem;font-size:.9rem;line-height:1.45}
.kchat-bubble.bot{background:#F8FAF9;border:1px solid #E5E7EB;color:#1F2937;border-bottom-left-radius:.3rem;align-self:flex-start}
.kchat-bubble.me{background:#22C55E;color:#052e16;align-self:flex-end;border-bottom-right-radius:.3rem;font-weight:600}
.kchat-body.chatting .kchat-orb,.kchat-body.chatting .kchat-hi,.kchat-body.chatting .kchat-quick{display:none}
.kchat-imgs{display:grid;gap:.45rem;margin-top:.55rem}
.kchat-imgs img{max-width:100%;border-radius:.75rem}
@media(max-width:56.25rem){
  .kchat-fab{width:3.25rem;height:3.25rem}
  .kchat-fab::after{inset:-8px;opacity:.45}
}
@media(max-width:40rem){
  .kchat.open .kchat-fab{display:none}
  .kchat-panel{right:0;left:0;bottom:0;width:100%;height:min(92dvh,45rem);border-radius:1.1rem 1.1rem 0 0}
  .kchat.open .kchat-orb{width:min(12.5rem,62%);width:min(12.5rem,62%,28dvh)}
}
@media(prefers-reduced-motion:reduce){
  .kchat-fab{transition:none}
  .kchat-fab-ring,.kchat-fab::before,.kchat-fab::after,.kchat-orb,.kchat-orb i,.kchat-orb::before,.kchat-orb::after{animation:none}
}


/* kngx-fab-force-visible — always show Care FAB (beats older transparent/ring-only rules) */
.kchat{pointer-events:none;z-index:240!important;overflow:visible!important}
.kchat > *{pointer-events:auto}
#kchat-fab.kchat-fab,.kchat-fab{
  display:grid!important;place-items:center!important;visibility:visible!important;opacity:1!important;
  position:relative!important;width:4.25rem!important;height:4.25rem!important;border-radius:50%!important;border:0!important;
  background:radial-gradient(circle at 40% 35%,#163528 0%,#0b1210 62%,#050807 100%)!important;color:#15803D!important;
  box-shadow:0 0 0 1px rgba(34,197,94,.35),0 0 28px rgba(34,197,94,.35),0 .6rem 1.4rem rgba(0,0,0,.35)!important;
  isolation:isolate;overflow:visible!important;cursor:pointer!important;z-index:242!important
}
.kchat-fab-core{display:block!important;width:1.05rem!important;height:1.05rem!important;border-radius:50%!important;position:relative!important;z-index:3!important;
  background:radial-gradient(circle,#86efac 0%,#22c55e 45%,#15803d 100%)!important;
  box-shadow:0 0 16px rgba(74,222,128,.95),0 0 2px #bbf7d0!important;opacity:1!important;visibility:visible!important}
.kchat.open #kchat-fab.kchat-fab,.kchat.open .kchat-fab{background:transparent!important;box-shadow:none!important}
.kchat.open .kchat-fab-core{display:none!important}
/* No glowing ring around the close X when assistant is open */
.kchat.open .kchat-fab-ring,
.kchat.open .kchat-fab::before,
.kchat.open .kchat-fab::after{
  display:none!important;opacity:0!important;animation:none!important;content:none!important;background:none!important
}
.kchat.open #kchat-fab.kchat-fab .kchat-fab-ring{display:none!important}
.kchat.open .kchat-fab .kchat-ico-x{
  display:block!important;box-sizing:content-box;padding:.4rem;background:#fff!important;border-radius:50%;
  box-shadow:0 .35rem .9rem rgba(16,20,24,.16);position:relative;z-index:5
}

@media(max-width:56.25rem){#kchat-fab.kchat-fab,.kchat-fab{width:3.25rem!important;height:3.25rem!important}}


/* While chat is open: hide FAB entirely so it cannot cover the send button.
   Panel header already has #kchat-close. */
.kchat.open #kchat-fab.kchat-fab,
.kchat.open .kchat-fab{
  display:none!important;visibility:hidden!important;opacity:0!important;
  pointer-events:none!important;width:0!important;height:0!important;overflow:hidden!important
}


/* Chat-open orb FX — force green vortex + static crown over app.css kills */
.kchat.open .kchat-orb{
  border-radius:50%!important;background:transparent!important;
  animation:kchatOrbCore 3.2s ease-in-out infinite!important
}
.kchat.open .kchat-orb::after{display:none!important}
.kchat.open .kchat-orb::before{display:none!important}
.kchat.open .kchat-orb i:first-child{display:none!important}
.kchat.open .kchat-orb i{display:none!important}
.kchat.open .kchat-orb-mark{
  animation:none!important;transform:none!important;background:transparent!important
}
.kchat.open .kchat-crown-lg{
  animation:none!important;transform:none!important;background:transparent!important;
  filter:drop-shadow(0 0 1rem rgba(255,255,255,.95)) drop-shadow(0 0 1.4rem rgba(74,222,128,.65))!important
}
@media(prefers-reduced-motion:reduce){
  .kchat.open .kchat-orb,
  .kchat.open .kchat-orb::before,
  .kchat.open .kchat-orb::after,
  .kchat.open .kchat-orb i:first-child{display:none!important}
}


