/* ════════════════════════════════════════════════════════════════════════
   MATRIX V87.8 — Floating 3D Robot Companion · v907
   • Chest button raised (real chest position)
   • All actions handled by synthetic FABs (no legacy click conflicts)
   • MSG fans out to 4 sub-buttons (IA, WA, RioMaxx, Essentials)
   • NIVEL info popover with user details
   • v907: tooltips white-bg+black-text in light theme;
           "invisible box" eliminated via canvas transparency hardening;
           robot pegado 100% al borde inferior (bottom:-200, height:420);
           chest button hover/focus states neutralised (no visible frame).
═════════════════════════════════════════════════════════════════════════ */

/* ANTI-DUPLICATE — only when our floating robot is mounted.
   v915 — exclude #fxl-robot-spline (our direct-embed spline-viewer). */
body.fxl-robot-mounted > spline-viewer:not(#fxl-robot-spline),
body.fxl-robot-mounted .cmsw-hero,
body.fxl-robot-mounted .cmsw-hero__scene,
body.fxl-robot-mounted .cmsw-hero spline-viewer:not(#fxl-robot-spline),
body.fxl-robot-mounted .cmsw-hero__scene spline-viewer:not(#fxl-robot-spline),
body.fxl-robot-mounted [data-fxl-robot-widget]:not(#fxl-robot),
body.fxl-robot-mounted iframe[src*="cms/widget/robot"]:not(#fxl-robot-iframe) {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  pointer-events: none !important;
}

/* v919 — Direct-embed con ASPECTO más ancho (no más grande).
   Lección de v917: aumentar tamaño proporcional → robot más grande, mismo recorte.
   Solución correcta: ASPECTO más wide (1.08) en vez de la altura.
   - width:  260 (vs 240 original = +8% más ancho horizontalmente)
   - height: 240 (vs 300 original = -20% más bajo verticalmente)
   - aspect: 260/240 = 1.08 (vs original 0.8 = MUCHO más ancho relativo)
   - resultado: robot visualmente MÁS PEQUEÑO + mucho más espacio horizontal
                para que la cámara Spline framee los brazos sin recortar.
   Math: feet en canvas y ≈ 60% del height = 240 × 0.60 = 144
         bottom = height - feet_y = 240 - 144 = 96
         + 4px buffer = bottom: -100 */
spline-viewer#fxl-robot-spline {
  position: fixed !important;
  bottom: -100px !important;
  right: -12px !important;          /* extra horizontal para el brazo derecho */
  top: auto !important;
  left: auto !important;
  width: 260px !important;
  height: 240px !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 0 !important;
  z-index: 99 !important;
  pointer-events: auto !important;
  display: block !important;
  overflow: visible !important;     /* defense — no clipping del canvas */
  contain: none !important;
  cursor: pointer !important;       /* v918 — affordance: el robot es clickeable */
  transition: filter 240ms cubic-bezier(.22,1,.36,1);
}
/* v918 — hover glow sutil en el robot (sin botón visible, pero cue de interactividad) */
spline-viewer#fxl-robot-spline:hover {
  filter: drop-shadow(0 0 14px rgba(0,229,255,0.55))
          drop-shadow(0 0 28px rgba(124,58,237,0.35));
}
spline-viewer#fxl-robot-spline:active {
  filter: drop-shadow(0 0 10px rgba(0,229,255,0.85))
          drop-shadow(0 0 20px rgba(255,43,214,0.45));
}
/* v919 — mobile: misma proporción wide (~1.08 aspect). */
@media (max-width: 640px) {
  spline-viewer#fxl-robot-spline {
    width: 220px !important; height: 200px !important; bottom: -82px !important; right: -10px !important;
  }
}
@media (max-width: 380px) {
  spline-viewer#fxl-robot-spline {
    width: 190px !important; height: 170px !important; bottom: -68px !important; right: -8px !important;
  }
}
/* Hide Spline default loader/badge via ::part (in case shadow DOM CSS misses) */
spline-viewer#fxl-robot-spline::part(badge),
spline-viewer#fxl-robot-spline::part(loader),
spline-viewer#fxl-robot-spline::part(progress),
spline-viewer#fxl-robot-spline::part(progress-bar),
spline-viewer#fxl-robot-spline::part(loading-text),
spline-viewer#fxl-robot-spline::part(spinner),
spline-viewer#fxl-robot-spline::part(error) {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  width: 0 !important; height: 0 !important;
  pointer-events: none !important;
}

/* ── ROBOT — FULL VIEWPORT canvas + small visible robot bottom-right
   THE "CUADRO INVISIBLE" FIX: iframe covers entire viewport so mouse
   events naturally fall on the spline canvas anywhere on the page.
   The spline-viewer INSIDE the iframe is positioned small bottom-right
   via injected CSS — so visually the robot is small but the canvas
   reaches every corner for mouse tracking.                              */
#fxl-robot {
  position: fixed;
  inset: 0;                        /* full viewport */
  z-index: 2147483646;             /* max z-index minus 1 (chest is +1) */
  pointer-events: none;            /* don't block page interaction */
  user-select: none;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  contain: none !important;
}

#fxl-robot-iframe {
  position: absolute;
  inset: 0;                        /* fill #fxl-robot = full viewport */
  width: 100%;
  height: 100%;
  border: 0 !important;
  border-width: 0 !important;
  border-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  display: block;
  pointer-events: none;            /* DOESN'T block page clicks */
  border-radius: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  color-scheme: normal;
  clip: auto !important;
  clip-path: none !important;
  /* MATRIX V87.8 v=907 — strip any inherited frame/highlight from AdminLTE */
  filter: none !important;
  -webkit-filter: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

/* ── CHEST BUTTON — TRANSPARENT FULL ROBOT AREA + cyan visual indicator
   Instead of a tiny button at a fixed pixel position (which misaligns
   when the robot animates), the entire spline-viewer area becomes a
   click target. The visible cyan glow is rendered via ::before pseudo
   element at the chest position, but click is captured anywhere over
   the robot. This guarantees the button works regardless of robot pose. */
/* MATRIX V87.8 v=918 — chest button ELIMINADO.
   El <spline-viewer> es ahora el único click target. Mantenemos esta regla
   como un kill-switch defensivo (oculta cualquier render residual del
   chest button por si alguna versión cacheada del JS lo creara). */
#fxl-robot-chest {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  position: fixed !important;
  bottom: 0 !important;
  right: 0 !important;
  margin: 0 !important;
  z-index: 2147483646 !important;   /* MAX − 1 (FABs at MAX = above chest) */
  border: 0 !important;
  border-width: 0 !important;
  border-style: none !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  padding: 0 !important;
  display: block !important;
  font-size: 0 !important;
  outline: 0 !important;
  outline-offset: 0 !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
}
/* MATRIX V87.8 v=907 — kill ANY visible state from inherited button styles */
#fxl-robot-chest:hover,
#fxl-robot-chest:focus,
#fxl-robot-chest:active,
#fxl-robot-chest:focus-visible,
#fxl-robot-chest:focus-within {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}
/* v918 — chest button removed; click target is now the <spline-viewer>.
   When panel is open, clicking the robot again CLOSES the panel via the
   togglePanel() handler in JS. No CSS change needed for this behavior. */
/* MATRIX V87.8 v=916 — al abrir el panel, ocultar el ⚡ del pecho.
   Los 4 FABs (NIVEL/TEMA/MENSAJES/VOZ) ya cumplen la función visual del botón. */
body.fxl-robot-panel-open #fxl-robot-chest::before {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateX(-50%) scale(0.4) !important;
  animation: none !important;
  transition: opacity 200ms cubic-bezier(.22,1,.36,1),
              transform 200ms cubic-bezier(.22,1,.36,1) !important;
}
/* Hide the FA bolt icon — replaced with ::before glow */
#fxl-robot-chest > i { display: none !important; }
/* MATRIX V87.8 v=917 — cyan glow recalibrado al robot agrandado.
   Canvas 340×400 + bottom:-165: top vh-235. Pecho (tercio superior) ≈ vh-160.
   left: 47% para compensar el right:-25 del canvas (centra sobre el robot real). */
#fxl-robot-chest::before {
  content: '⚡';
  position: absolute;
  bottom: 160px;       /* On chest of the larger robot */
  left: 47%;           /* slight offset to compensate for right:-25 of canvas */
  transform: translateX(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 0 6px rgba(255,255,255,0.95);
  display: grid;
  place-items: center;
  pointer-events: none;
  box-shadow:
    inset 0 1px 2px rgba(255,255,255,0.85),
    inset 0 -2px 6px rgba(0,0,0,0.55),
    0 0 12px rgba(0,229,255,0.75),
    0 0 24px rgba(0,229,255,0.45),
    0 4px 10px rgba(0,0,0,0.40);
  transition: transform 0.14s cubic-bezier(.22,1,.36,1), box-shadow 0.20s ease;
  animation: fxl-robot-chest-pulse 2.2s ease-in-out infinite;
  will-change: box-shadow;
}
#fxl-robot-chest:hover::before {
  transform: translateX(-50%) scale(1.20);
  box-shadow:
    inset 0 1px 2px rgba(255,255,255,0.95),
    inset 0 -2px 6px rgba(0,0,0,0.55),
    0 0 18px rgba(0,229,255,0.95),
    0 0 36px rgba(0,229,255,0.65),
    0 6px 14px rgba(0,0,0,0.50);
}
#fxl-robot-chest:active::before { transform: translateX(-50%) scale(0.92); }
@keyframes fxl-robot-chest-pulse {
  0%, 100% {
    box-shadow:
      inset 0 1px 2px rgba(255,255,255,0.85),
      inset 0 -2px 6px rgba(0,0,0,0.55),
      0 0 12px rgba(0,229,255,0.75),
      0 0 24px rgba(0,229,255,0.45),
      0 4px 10px rgba(0,0,0,0.40);
  }
  50% {
    box-shadow:
      inset 0 1px 2px rgba(255,255,255,0.95),
      inset 0 -2px 6px rgba(0,0,0,0.55),
      0 0 18px rgba(0,229,255,1.0),
      0 0 38px rgba(0,229,255,0.75),
      0 4px 10px rgba(0,0,0,0.40);
  }
}
:root[data-theme-effective="light"] #fxl-robot-chest {
  background:
    radial-gradient(circle at 30% 28%, #f0faff 0%, #38bdf8 25%, #0284c7 60%, #075985 90%, #0c4a6e 100%);
}

/* ── HIDE LEGACY FABs ALWAYS — we use synth buttons ─────────────────
   The robot's chest panel replaces these: NIVEL, theme, msg, voice mic.
   In PosCustom module, #fxl-msg-hamburger is the cloud button that
   fans out 4 messaging buttons; we replace it with the robot's MSG
   fanout (IA, WA, RioMaxx, Essentials) accessed via chest panel.       */
.fxl-fab-nivel,
#fxl-fab-theme,
.fxl-fab-theme,
#voice-mic-btn,
.fxl-msg-hamburger-icon,
#fxl-msg-hamburger-icon,
.fxl-msg-hamburger,
#fxl-msg-hamburger,
#fxl-msg-hamburger-pulse,
.fxl-msg-pulse,
.fxl-robot-synth {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Also hide the entire PosCustom messaging launchers when our robot is mounted
   (those individual launchers are now reachable via the robot panel → MSG → fanout). */
body.fxl-robot-mounted #ai-msg-launcher,
body.fxl-robot-mounted #wa-chat-launcher,
body.fxl-robot-mounted #riomaxx-msg-launcher,
body.fxl-robot-mounted #ess-msg-launcher,
body.fxl-robot-mounted #faxil-quick-actions {
  display: none !important;
}

/* ── SYNTH BUTTONS — visible when panel open ──────────────────────── */
body.fxl-robot-panel-open .fxl-robot-synth {
  display: grid !important;
  place-items: center !important;
  position: fixed !important;
  right: 110px !important;
  width: 48px !important;
  height: 48px !important;
  border-radius: 50% !important;
  z-index: 2147483647 !important;   /* MAX — above chest button (which is MAX-1) */
  cursor: pointer !important;
  pointer-events: auto !important;
  border: 1px solid rgba(0,229,255,0.40) !important;
  background: rgba(15,23,42,0.95) !important;
  color: #00e5ff !important;
  box-shadow: 0 8px 20px rgba(0,0,0,0.45), 0 0 14px rgba(0,229,255,0.30) !important;
  font-size: 16px !important;
  animation: fxl-robot-fab-pop 0.26s cubic-bezier(.22,1,.36,1) backwards !important;
  transition: transform 0.14s ease, box-shadow 0.18s ease !important;
}
body.fxl-robot-panel-open .fxl-robot-synth:hover {
  transform: translateX(-3px) scale(1.10) !important;
  box-shadow: 0 12px 28px rgba(0,0,0,0.55), 0 0 22px rgba(0,229,255,0.55) !important;
}
body.fxl-robot-panel-open #fxl-robot-synth-crown { bottom: 200px !important; right: 110px !important; animation-delay: 0.00s !important; }
body.fxl-robot-panel-open #fxl-robot-synth-theme { bottom: 144px !important; right: 110px !important; animation-delay: 0.04s !important; }
body.fxl-robot-panel-open #fxl-robot-synth-msg   { bottom:  88px !important; right: 110px !important; animation-delay: 0.08s !important; }
body.fxl-robot-panel-open #fxl-robot-synth-mic   { bottom:  32px !important; right: 110px !important; animation-delay: 0.12s !important; }

/* Crown icon → gold */
body.fxl-robot-panel-open #fxl-robot-synth-crown i { color: #fbbf24 !important; -webkit-text-fill-color: #fbbf24 !important; }

/* Light mode synth FABs — all 4 must be uniform: white BG + black icon */
:root[data-theme-effective="light"] body.fxl-robot-panel-open .fxl-robot-synth,
:root[data-theme-effective="light"] body.fxl-robot-panel-open #fxl-robot-synth-crown,
:root[data-theme-effective="light"] body.fxl-robot-panel-open #fxl-robot-synth-theme,
:root[data-theme-effective="light"] body.fxl-robot-panel-open #fxl-robot-synth-msg,
:root[data-theme-effective="light"] body.fxl-robot-panel-open #fxl-robot-synth-mic {
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
  border: 1px solid rgba(0,0,0,0.15) !important;
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
  box-shadow: 0 6px 16px rgba(0,0,0,0.18) !important;
}
:root[data-theme-effective="light"] body.fxl-robot-panel-open .fxl-robot-synth i,
:root[data-theme-effective="light"] body.fxl-robot-panel-open .fxl-robot-synth svg,
:root[data-theme-effective="light"] body.fxl-robot-panel-open #fxl-robot-synth-crown i,
:root[data-theme-effective="light"] body.fxl-robot-panel-open #fxl-robot-synth-theme i,
:root[data-theme-effective="light"] body.fxl-robot-panel-open #fxl-robot-synth-msg i,
:root[data-theme-effective="light"] body.fxl-robot-panel-open #fxl-robot-synth-mic i {
  color: #000000 !important;
  fill: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
}

/* Tooltips on hover — MATRIX V87.8 v=907
   Always visible (not just on hover) so users see the message label of each FAB.
   In light theme: white-bg + black-text for high contrast.                     */
body.fxl-robot-panel-open .fxl-robot-synth::after {
  content: attr(data-fxl-tip);
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15,23,42,0.96);
  color: #ffffff;
  font: 700 10px/1.3 'Courier New',monospace;
  letter-spacing: 0.06em;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 1;                 /* ALWAYS VISIBLE (was: 0 + on hover) */
  pointer-events: none;
  transition: opacity 0.12s ease, transform 0.16s ease;
  border: 1px solid rgba(0,229,255,0.35);
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
  text-transform: uppercase;
  z-index: 2147483647;
}
body.fxl-robot-panel-open .fxl-robot-synth:hover::after {
  transform: translateY(-50%) translateX(-2px);
}
/* MATRIX V87.8 v=907 — light theme: WHITE BG + BLACK TEXT */
:root[data-theme-effective="light"] body.fxl-robot-panel-open .fxl-robot-synth::after,
html[data-theme-effective="light"] body.fxl-robot-panel-open .fxl-robot-synth::after,
[data-theme-effective="light"] body.fxl-robot-panel-open .fxl-robot-synth::after {
  background: #ffffff !important;
  color: #000000 !important;
  border: 1px solid rgba(0,0,0,0.20) !important;
  box-shadow: 0 6px 18px rgba(0,0,0,0.18), 0 1px 2px rgba(0,0,0,0.10) !important;
  -webkit-text-fill-color: #000000 !important;
}

/* Pop-in animation */
@keyframes fxl-robot-fab-pop {
  0%   { transform: translateX(48px) scale(0.40); opacity: 0; }
  60%  { transform: translateX(0)    scale(1.06); opacity: 1; }
  100% { transform: translateX(0)    scale(1.00); opacity: 1; }
}

/* ══════════════════════════════════════════════════════════════════════
   MSG FANOUT — 4 sub-buttons (IA, WA, RioMaxx, Essentials)
   ══════════════════════════════════════════════════════════════════════ */
#fxl-robot-msg-fanout {
  position: fixed;
  right: 170px;
  bottom: 88px;
  z-index: 99999;
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(15,23,42,0.96);
  border: 1px solid rgba(0,229,255,0.30);
  border-radius: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.55), 0 0 22px rgba(0,229,255,0.25);
  transform: scale(0.40) translateX(20px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s cubic-bezier(.22,1,.36,1), opacity 0.20s ease;
  transform-origin: right center;
}
#fxl-robot-msg-fanout.is-open {
  transform: scale(1) translateX(0);
  opacity: 1;
  pointer-events: auto;
}
:root[data-theme-effective="light"] #fxl-robot-msg-fanout {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.12);
  box-shadow: 0 16px 40px rgba(0,0,0,0.20);
}
.fxl-rmf-btn {
  width: 50px; height: 64px;
  border-radius: 12px;
  border: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
  transition: transform 0.15s ease, box-shadow 0.20s ease;
  animation: fxl-robot-fab-pop 0.28s cubic-bezier(.22,1,.36,1) backwards;
}
.fxl-rmf-btn i,
.fxl-rmf-btn span {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  fill: #ffffff !important;
}
.fxl-rmf-btn i { font-size: 18px; }
.fxl-rmf-btn:hover { transform: translateY(-3px) scale(1.06); }
.fxl-rmf-btn span { line-height: 1; letter-spacing: 0.04em; }
/* In LIGHT mode the universal contrast layer would force span/i to black —
   override it back to white for these intentionally colored gradient buttons */
:root[data-theme-effective="light"] .fxl-rmf-btn,
:root[data-theme-effective="light"] .fxl-rmf-btn i,
:root[data-theme-effective="light"] .fxl-rmf-btn span {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  fill: #ffffff !important;
}
.fxl-rmf-ia      { background: linear-gradient(135deg, #00b894, #00695c); box-shadow: 0 4px 14px rgba(0,184,148,0.45); }
.fxl-rmf-wa      { background: linear-gradient(135deg, #25D366, #128C7E); box-shadow: 0 4px 14px rgba(37,211,102,0.45); }
.fxl-rmf-riomaxx { background: linear-gradient(135deg, #5f27cd, #341f97); box-shadow: 0 4px 14px rgba(95,39,205,0.45); }
.fxl-rmf-ess     { background: linear-gradient(135deg, #4361ee, #3a0ca3); box-shadow: 0 4px 14px rgba(67,97,238,0.45); }

#fxl-robot-msg-fanout .fxl-rmf-btn:nth-child(1) { animation-delay: 0.00s; }
#fxl-robot-msg-fanout .fxl-rmf-btn:nth-child(2) { animation-delay: 0.05s; }
#fxl-robot-msg-fanout .fxl-rmf-btn:nth-child(3) { animation-delay: 0.10s; }
#fxl-robot-msg-fanout .fxl-rmf-btn:nth-child(4) { animation-delay: 0.15s; }

/* ══════════════════════════════════════════════════════════════════════
   NIVEL POPOVER — user info
   ══════════════════════════════════════════════════════════════════════ */
.fxl-robot-popover {
  position: fixed;
  right: 170px;
  bottom: 200px;
  z-index: 99999;
  min-width: 260px;
  max-width: 320px;
  background: rgba(15,23,42,0.96);
  color: #ffffff;
  border: 1px solid rgba(0,229,255,0.45);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 18px 48px rgba(0,0,0,0.55), 0 0 24px rgba(0,229,255,0.30);
  padding: 12px 14px;
  font: 600 12px/1.5 'Courier New', monospace;
  animation: fxl-robot-popover-in 0.32s cubic-bezier(.22,1,.36,1);
  transform-origin: right bottom;
}
.fxl-rp-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px;
  color: #fbbf24;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(0,229,255,0.18);
  padding-bottom: 6px;
}
.fxl-rp-head i { font-size: 14px; }
.fxl-rp-body { display: flex; flex-direction: column; gap: 4px; }
.fxl-rp-row {
  display: flex; gap: 10px;
  padding: 3px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.fxl-rp-row:last-child { border-bottom: 0; }
.fxl-rp-key { color: rgba(0,229,255,0.80); min-width: 90px; font-size: 11px; }
.fxl-rp-val { color: #ffffff; flex: 1; font-size: 11px; word-break: break-word; }

:root[data-theme-effective="light"] .fxl-robot-popover {
  background: #ffffff;
  color: #000000;
  border: 1px solid rgba(0,0,0,0.12);
  box-shadow: 0 18px 48px rgba(0,0,0,0.20);
}
:root[data-theme-effective="light"] .fxl-rp-head {
  color: #b45309;
  border-bottom: 1px solid rgba(0,0,0,0.10);
}
:root[data-theme-effective="light"] .fxl-rp-row { border-bottom: 1px solid rgba(0,0,0,0.06); }
:root[data-theme-effective="light"] .fxl-rp-key { color: #4b5563; }
:root[data-theme-effective="light"] .fxl-rp-val { color: #000000; }

@keyframes fxl-robot-popover-in {
  0%   { transform: scale(0.50) translateY(20px); opacity: 0; }
  100% { transform: scale(1)    translateY(0);    opacity: 1; }
}

/* ══════════════════════════════════════════════════════════════════════
   Mobile responsive
   ══════════════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  /* Mobile: spline-viewer 180x220 → chest at upper-chest area */
  #fxl-robot-chest {
    right: 75px !important;
    bottom: 145px !important;
  }
  body.fxl-robot-panel-open .fxl-robot-synth {
    right: 80px !important;
    width: 42px !important;
    height: 42px !important;
  }
  #fxl-robot-msg-fanout { right: 140px; bottom: 76px; padding: 8px; }
  .fxl-rmf-btn { width: 44px; height: 56px; font-size: 10px; }
  .fxl-robot-popover { right: 140px; bottom: 180px; min-width: 220px; }
}
@media (max-width: 380px) {
  /* Small mobile: spline-viewer 150x180 → chest at upper-chest area */
  #fxl-robot-chest {
    right: 60px !important;
    bottom: 120px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  #fxl-robot-chest { animation: none; }
  body.fxl-robot-panel-open .fxl-robot-synth,
  .fxl-rmf-btn,
  .fxl-robot-popover { animation: none !important; }
  #fxl-robot-msg-fanout { transition: opacity 0.18s ease; transform: none; }
  #fxl-robot-msg-fanout.is-open { transform: none; }
}

/* ════════════════════════════════════════════════════════════════════════
   V79 F5.32 — IMPRESIÓN: ocultar el robot en cualquier print media.
   El robot sigue activo y visible en pantalla en TODO el sistema (módulo
   CMS + admin + POS). Esta regla SOLO actúa cuando el navegador entra en
   contexto de impresión (window.print, PDF export, print preview).
   No daña su posición/animación/UI normal — únicamente en papel.
═════════════════════════════════════════════════════════════════════════ */
@media print {
  /* Robot principal y su contenedor */
  #fxl-robot,
  #fxl-robot-iframe,
  #fxl-robot-chest,
  #fxl-robot-spline,
  spline-viewer#fxl-robot-spline,
  /* FABs sintéticos del robot (corona/theme/msg) */
  .fxl-robot-synth,
  #fxl-robot-synth-crown,
  #fxl-robot-synth-theme,
  #fxl-robot-synth-msg,
  /* Fanout de mensajería */
  #fxl-robot-msg-fanout,
  /* Popovers de NIVEL / acciones */
  .fxl-robot-popover,
  .fxl-rmf-btn,
  /* FABs heredados (legacy) */
  #fxl-fab-theme,
  .fxl-fab-theme,
  .fxl-fab-nivel,
  .fxl-msg-hamburger,
  #fxl-msg-hamburger,
  .fxl-msg-hamburger-icon,
  #fxl-msg-hamburger-icon,
  #fxl-msg-hamburger-pulse,
  .fxl-msg-pulse,
  /* Spline-viewer global cuando NO es nuestro fxl-robot-spline (paranoia) */
  body > spline-viewer {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
}
