/* CódigoX Asistente de Leads — sistema Órbita Técnica */
.cxa-root { --cxa-bg: #050505; --cxa-bg2: #0A0A0A; --cxa-bg3: #0E0F0E; --cxa-line: #1C1C1A; --cxa-line2: #2A2A28; --cxa-green: #00F58A; --cxa-white: #F4F4F0; --cxa-text: #C9C9C4; --cxa-muted: #8B8B86; --cxa-dim: #5E5E5A; --cxa-mono: 'IBM Plex Mono', 'SF Mono', Menlo, Consolas, monospace; --cxa-sans: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif; font-family: var(--cxa-mono); font-size: 13px; line-height: 1.6; color: var(--cxa-white); }
.cxa-root:not(.cxa-root--inline) { position: fixed; left: 24px; bottom: 24px; z-index: 9990; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.cxa-root--derecha:not(.cxa-root--inline) { left: auto; right: 24px; align-items: flex-end; }
.cxa-root *, .cxa-root *::before, .cxa-root *::after { box-sizing: border-box; }
.cxa-root a { text-decoration: none; }

/* Botón flotante */
.cxa-launcher { display: inline-flex; align-items: center; gap: 12px; background: #0B0B0A; border: 1px solid var(--cxa-line2); padding: 12px 16px; border-radius: 2px; color: var(--cxa-white); cursor: pointer; font-family: var(--cxa-mono); min-height: 44px; transition: border-color .15s; }
.cxa-launcher:hover { border-color: var(--cxa-green); }
.cxa-launcher__label { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.cxa-launcher__text { font-size: 12px; color: var(--cxa-muted); }
.cxa-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cxa-green); flex: 0 0 auto; box-shadow: 0 0 0 0 rgba(0,245,138,.5); animation: cxa-pulse 2.4s infinite; }
@keyframes cxa-pulse { 0% { box-shadow: 0 0 0 0 rgba(0,245,138,.45); } 70% { box-shadow: 0 0 0 8px rgba(0,245,138,0); } 100% { box-shadow: 0 0 0 0 rgba(0,245,138,0); } }
.cxa-root.is-open .cxa-launcher { border-color: var(--cxa-green); }

/* Panel */
.cxa-panel { width: 380px; max-width: calc(100vw - 32px); background: var(--cxa-bg); border: 1px solid var(--cxa-line2); border-radius: 2px; display: none; flex-direction: column; overflow: hidden; box-shadow: 0 24px 64px rgba(0,0,0,.6); }
.cxa-root.is-open .cxa-panel { display: flex; }
.cxa-panel--inline { display: flex; width: 100%; max-width: 640px; margin: 0 auto; box-shadow: none; }
.cxa-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--cxa-line); background: var(--cxa-bg2); }
.cxa-head__titles { display: flex; flex-direction: column; gap: 4px; }
.cxa-label { font-size: 10px; letter-spacing: .16em; color: var(--cxa-green); text-transform: uppercase; }
.cxa-title { margin: 0; font-family: var(--cxa-sans); font-weight: 700; font-size: 16px; line-height: 1.05; text-transform: uppercase; letter-spacing: -.01em; color: var(--cxa-white); }
.cxa-head__right { display: flex; align-items: center; gap: 12px; }
.cxa-status { display: flex; align-items: center; gap: 6px; font-size: 10px; letter-spacing: .12em; color: var(--cxa-dim); }
.cxa-status .cxa-dot { animation: none; width: 6px; height: 6px; }
.cxa-close { background: none; border: 1px solid var(--cxa-line2); color: var(--cxa-muted); width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 2px; }
.cxa-close:hover { color: var(--cxa-white); border-color: var(--cxa-green); }
.cxa-progress { height: 2px; background: var(--cxa-line); }
.cxa-progress i { display: block; height: 2px; background: var(--cxa-green); transition: width .3s; }
.cxa-messages { padding: 16px; display: flex; flex-direction: column; gap: 12px; max-height: 340px; min-height: 180px; overflow-y: auto; }
.cxa-panel--inline .cxa-messages { max-height: 420px; }
.cxa-msg { display: grid; grid-template-columns: 14px 1fr; gap: 10px; align-items: start; }
.cxa-msg__p { color: var(--cxa-green); font-size: 13px; line-height: 1.6; }
.cxa-msg__text { font-size: 13px; color: var(--cxa-text); line-height: 1.6; overflow-wrap: anywhere; }
.cxa-msg--user .cxa-msg__text { color: var(--cxa-white); }
.cxa-msg--user .cxa-msg__p { color: var(--cxa-dim); }
.cxa-typing .cxa-msg__text i { display: inline-block; width: 9px; height: 15px; background: var(--cxa-green); vertical-align: text-bottom; animation: cxa-blink 1s steps(1) infinite; }
@keyframes cxa-blink { 50% { opacity: 0; } }
.cxa-options { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px; }
.cxa-options:empty { display: none; }
.cxa-option { font-family: var(--cxa-mono); font-size: 12px; color: var(--cxa-white); background: var(--cxa-bg2); border: 1px solid var(--cxa-line2); padding: 10px 14px; border-radius: 2px; cursor: pointer; min-height: 40px; display: inline-flex; align-items: center; transition: border-color .15s, color .15s; }
.cxa-option:hover { border-color: var(--cxa-green); color: var(--cxa-green); }
.cxa-option--primary { background: var(--cxa-green); color: var(--cxa-bg); border-color: var(--cxa-green); font-weight: 600; letter-spacing: .04em; }
.cxa-option--primary:hover { background: var(--cxa-white); border-color: var(--cxa-white); color: var(--cxa-bg); }
.cxa-form { display: flex; gap: 8px; padding: 16px; border-top: 1px solid var(--cxa-line); margin-top: 12px; }
.cxa-form[hidden] { display: none; }
.cxa-input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border: 1px solid var(--cxa-line2); background: var(--cxa-bg2); color: var(--cxa-white); font-family: var(--cxa-mono); font-size: 13px; border-radius: 2px; outline: none; }
.cxa-input:focus { border-color: var(--cxa-green); }
.cxa-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.cxa-send { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; background: var(--cxa-green); color: var(--cxa-bg); border: 0; border-radius: 2px; font-family: var(--cxa-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; cursor: pointer; }
.cxa-send:hover { background: var(--cxa-white); }
.cxa-foot { padding: 10px 16px 14px; font-size: 11px; color: var(--cxa-dim); border-top: 1px solid var(--cxa-line); }
.cxa-options:empty + .cxa-form { margin-top: 0; }
@media (max-width: 600px) {
	.cxa-root:not(.cxa-root--inline), .cxa-root--derecha:not(.cxa-root--inline) { right: 12px; bottom: 12px; left: 12px; align-items: stretch; }
	.cxa-launcher { justify-content: center; }
	.cxa-launcher__text { display: none; }
	.cxa-panel { width: 100%; max-width: none; }
	.cxa-messages { max-height: 45vh; }
}
