/* Naturalma Floating Assistant by BigBullDesign — isolated styling */
#nfa-root,
#nfa-root *,
#nfa-root *::before,
#nfa-root *::after {box-sizing:border-box}
#nfa-root {
  --nfa-green:#1d5a3d; --nfa-dark:#103b29; --nfa-wa:#25d366;
  --nfa-desktop-size:56px; --nfa-mobile-size:48px;
  --nfa-bottom:26px; --nfa-side:22px; --nfa-bottom-mobile:20px; --nfa-side-mobile:14px;
  --nfa-gap:11px; --nfa-banner-gap:16px; --nfa-cookie-offset:0px;
  position:fixed; z-index:10900;
  bottom:max(calc(var(--nfa-bottom) + env(safe-area-inset-bottom, 0px)), var(--nfa-cookie-offset));
  transition:bottom .32s cubic-bezier(.2,.65,.3,1);
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  color:#203b2d; line-height:1.45;
}
#nfa-root.nfa-position-right {right:calc(var(--nfa-side) + env(safe-area-inset-right, 0px))}
#nfa-root.nfa-position-left {left:calc(var(--nfa-side) + env(safe-area-inset-left, 0px))}
#nfa-root .nfa-dock-controls {display:flex; flex-direction:column; align-items:center; gap:var(--nfa-gap); padding:0; margin:0}
#nfa-root .nfa-control {
  display:flex !important; flex:0 0 auto; align-items:center; justify-content:center;
  width:var(--nfa-desktop-size); height:var(--nfa-desktop-size);
  min-width:var(--nfa-desktop-size); min-height:var(--nfa-desktop-size);
  padding:0 !important; margin:0; cursor:pointer;
  border-radius:18px !important; border:1px solid transparent !important;
  text-decoration:none !important; box-shadow:0 10px 28px rgba(9,49,32,.16),0 3px 7px rgba(0,0,0,.075);
  position:relative; isolation:isolate; outline-offset:4px; line-height:1;
  transform:translateZ(0); transition:transform .19s ease, box-shadow .19s ease, background .19s ease;
}
#nfa-root .nfa-control > svg {width:25px; height:25px; display:block; flex-shrink:0}
#nfa-root .nfa-privacy {background:#ffffff !important; color:var(--nfa-green) !important; border-color:#d7e6db !important}
#nfa-root .nfa-whatsapp {background:var(--nfa-wa) !important; color:#ffffff !important}
#nfa-root .nfa-chatbot {background:linear-gradient(145deg,var(--nfa-green) 0%,var(--nfa-dark) 100%) !important; color:#ffffff !important; border-color:rgba(222,196,123,.48) !important}
#nfa-root .nfa-chatbot::after {content:""; position:absolute; top:7px; right:7px; width:7px; height:7px; border-radius:100%; background:#e7c480; box-shadow:0 0 0 2px var(--nfa-dark)}
@media(hover:hover) and (pointer:fine) {
  #nfa-root .nfa-control:hover {transform:translateY(-3px); box-shadow:0 14px 34px rgba(9,49,32,.24),0 5px 9px rgba(0,0,0,.09)}
  #nfa-root .nfa-control:hover .nfa-tooltip {opacity:1; visibility:visible; transform:translateY(-50%) translateX(0)}
}
#nfa-root .nfa-control:focus-visible, #nfa-root .nfa-chat-panel button:focus-visible, #nfa-root .nfa-chat-panel a:focus-visible, #nfa-root .nfa-chat-panel input:focus-visible {outline:3px solid #d1a64e !important; outline-offset:3px}
#nfa-root .nfa-tooltip {
  position:absolute; display:block; pointer-events:none;
  top:50%; right:calc(100% + 13px); transform:translateY(-50%) translateX(5px);
  white-space:nowrap; background:#143b2b; color:white; font-size:12px; font-weight:700;
  padding:8px 11px; border-radius:9px; opacity:0; visibility:hidden;
  transition:opacity .2s,transform .2s,visibility .2s;
  box-shadow:0 6px 18px rgba(0,0,0,.19);
}
#nfa-root.nfa-position-left .nfa-tooltip {right:auto; left:calc(100% + 13px); transform:translateY(-50%) translateX(-5px)}
#nfa-root.nfa-no-tooltip .nfa-tooltip {display:none}
#nfa-root .nfa-chat-panel[hidden] {display:none !important}
#nfa-root .nfa-chat-panel {
  position:absolute; display:flex; flex-direction:column; bottom:0;
  right:calc(100% + 16px); width:360px;
  max-height:min(560px,calc(100dvh - 46px)); overflow:hidden;
  border-radius:20px; background:#fff; border:1px solid #dce5dc;
  box-shadow:0 24px 78px rgba(6,36,22,.24),0 4px 18px rgba(0,0,0,.09);
}
#nfa-root.nfa-position-left .nfa-chat-panel {right:auto; left:calc(100% + 16px)}
#nfa-root .nfa-chat-header {
  background:linear-gradient(120deg,var(--nfa-dark),var(--nfa-green)); color:#fff;
  display:flex; align-items:center; gap:11px; padding:16px 14px;
}
#nfa-root .nfa-chat-brand {width:57px; height:46px; background:#fff; border-radius:10px; display:flex; align-items:center; justify-content:center; overflow:hidden; flex-shrink:0; padding:4px}
#nfa-root .nfa-chat-brand img {max-width:100%; height:auto; max-height:100%; object-fit:contain}
#nfa-root .nfa-fallback-logo {font-size:28px; font-weight:900; color:var(--nfa-green)}
#nfa-root .nfa-chat-heading {flex:1; min-width:0; display:grid; gap:2px}
#nfa-root .nfa-chat-heading strong {font-size:15px; line-height:1.2; font-weight:800; color:#fff}
#nfa-root .nfa-chat-heading small {font-size:11px; color:rgba(255,255,255,.76)}
#nfa-root .nfa-chat-close {border:0 !important; background:rgba(255,255,255,.13) !important; border-radius:9px; color:#fff !important; width:33px; height:33px; font-size:25px; font-weight:400; display:grid; place-items:center; cursor:pointer; padding:0; line-height:1}
#nfa-root .nfa-chat-close:hover {background:rgba(255,255,255,.24) !important}
#nfa-root .nfa-chat-content {min-height:150px; flex:1 1 auto; overflow-y:auto; padding:17px 16px 13px; background:#fafbf8}
#nfa-root .nfa-messages {display:flex; flex-direction:column; gap:10px; margin:0 0 12px}
#nfa-root .nfa-message {max-width:94%; font-size:13px; line-height:1.5; padding:10px 12px; border-radius:13px; overflow-wrap:anywhere}
#nfa-root .nfa-message.nfa-assistant {align-self:flex-start; background:#ecf4ed; color:#274332; border-bottom-left-radius:3px}
#nfa-root .nfa-message.nfa-user {align-self:flex-end; background:var(--nfa-green); color:#fff; border-bottom-right-radius:3px}
#nfa-root .nfa-quick-heading {font-size:12px; color:#5c7064; font-weight:650; margin:0 0 9px}
#nfa-root .nfa-quick-questions {display:flex; gap:7px; flex-wrap:wrap}
#nfa-root .nfa-quick-questions button {background:white; border:1px solid #cfdfd2; border-radius:999px; color:var(--nfa-green); padding:7px 10px; line-height:1.3; font-size:12px; font-weight:700; cursor:pointer}
#nfa-root .nfa-quick-questions button:hover {background:#eaf3ed}
#nfa-root .nfa-chat-form {display:flex; margin:0; padding:12px 12px 7px; gap:8px; border-top:1px solid #e5eae5; background:#fff}
#nfa-root .nfa-chat-form input {background:#fbfcfa; border:1px solid #cfdcd3; border-radius:11px; color:#1b3524; min-width:0; width:100%; height:40px; padding:0 12px; font-size:13px; flex:1; box-shadow:none}
#nfa-root .nfa-chat-form button {width:42px; height:40px; display:grid; place-items:center; background:var(--nfa-green); border:0; color:#fff; border-radius:11px; cursor:pointer; flex-shrink:0}
#nfa-root .nfa-chat-form button svg {width:19px; height:19px}
#nfa-root .nfa-chat-footer {display:flex; justify-content:center; flex-wrap:wrap; gap:6px 10px; padding:7px 14px 3px; background:#fff}
#nfa-root .nfa-chat-footer a {color:var(--nfa-green); font-weight:750; font-size:11px; text-decoration:underline; text-underline-offset:3px}
#nfa-root .nfa-chat-note {margin:0; background:#fff; color:#82928a; font-size:10px; text-align:center; padding:6px 12px 11px}
#nfa-root .nfa-sr-only {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
/* Hide ONLY the old floating launcher, never hide the banner or dialog. */
body.nfa-hide-privacy-launcher #npc-floating {display:none !important}
body.npc-dialog-open #nfa-root {visibility:hidden; pointer-events:none}
@media(max-width:650px){
  #nfa-root {bottom:max(calc(var(--nfa-bottom-mobile) + env(safe-area-inset-bottom, 0px)), var(--nfa-cookie-offset)); --nfa-gap:9px}
  #nfa-root.nfa-position-right {right:calc(var(--nfa-side-mobile) + env(safe-area-inset-right, 0px))}
  #nfa-root.nfa-position-left {left:calc(var(--nfa-side-mobile) + env(safe-area-inset-left, 0px))}
  #nfa-root .nfa-control {width:var(--nfa-mobile-size); height:var(--nfa-mobile-size); min-width:var(--nfa-mobile-size); min-height:var(--nfa-mobile-size); border-radius:15px !important}
  #nfa-root .nfa-control > svg {width:23px; height:23px}
  #nfa-root .nfa-tooltip {display:none}
  #nfa-root .nfa-chat-panel, #nfa-root.nfa-position-left .nfa-chat-panel {
    width:min(355px,calc(100vw - 28px));
    max-height:min(540px,calc(100dvh - 205px));
    left:auto; right:0; bottom:calc(var(--nfa-mobile-size) * 3 + 2 * var(--nfa-gap) + 14px)
  }
  #nfa-root.nfa-position-left .nfa-chat-panel {left:0;right:auto}
  #nfa-root.nfa-hide-mobile {display:none !important}
}
@media(prefers-reduced-motion:reduce){#nfa-root .nfa-control,#nfa-root .nfa-tooltip{transition:none !important}}
@media print {#nfa-root{display:none !important}}

/* Privacy-banner collision avoidance. The script measures #npc-banner dynamically. */
#nfa-root.nfa-cookie-compact .nfa-dock-controls {flex-direction:row;gap:8px}
#nfa-root.nfa-cookie-compact .nfa-chat-panel {bottom:calc(100% + 12px)}
#nfa-root.nfa-cookie-visible .nfa-chat-panel {max-height:min(540px,calc(100dvh - var(--nfa-cookie-offset) - 88px))}
@media(max-width:650px){
  #nfa-root.nfa-cookie-compact .nfa-control {border-radius:14px !important}
  #nfa-root.nfa-cookie-visible .nfa-chat-panel,#nfa-root.nfa-cookie-visible.nfa-position-left .nfa-chat-panel {bottom:calc(100% + 12px);max-height:min(470px,calc(100dvh - var(--nfa-cookie-offset) - 80px))}
}
@media(prefers-reduced-motion:reduce){#nfa-root{transition:none !important}}

/* IA: autorizacion explicita, estado de consulta y referencias de producto. */
#nfa-root .nfa-ai-consent[hidden]{display:none !important}
#nfa-root .nfa-ai-consent {display:flex;gap:8px;align-items:flex-start;padding:9px 14px;background:#f5f9f5;border-top:1px solid #e5eee5;font-size:11px;line-height:1.4;color:#456250;cursor:pointer}
#nfa-root .nfa-ai-consent input {flex-shrink:0;margin:3px 0 0;accent-color:var(--nfa-green)}
#nfa-root .nfa-typing {align-self:flex-start;background:#edf3ed;color:#59715d;padding:10px 12px;font-size:12px;border-radius:12px;animation:nfaPulse 1.8s ease-in-out infinite}
@keyframes nfaPulse{0%,100%{opacity:.6}50%{opacity:1}}
#nfa-root .nfa-sources {display:flex;flex-wrap:wrap;gap:5px;margin-top:7px;padding-top:8px;border-top:1px solid #cfe0d2}
#nfa-root .nfa-sources a {font-size:11px;font-weight:650;color:#195b3a;text-decoration:underline !important;line-height:1.3;overflow-wrap:anywhere}
#nfa-root .nfa-sources a:not(:last-child)::after{content:' · ';color:#778a7b;text-decoration:none}
#nfa-root .nfa-chat-form button:disabled{opacity:.45;cursor:wait}
#nfa-root .nfa-chat-content{scrollbar-width:thin}
@media (prefers-reduced-motion:reduce){#nfa-root .nfa-typing{animation:none}}
